JavaScript Haikus: My Adventures in Tiny Coding

This ad is not shown to multipass and full ticket holders
JSNation US
JSNation US 2025
November 17 - 20, 2025
New York, US & Online
See JS stars in the US biggest planetarium
Learn More
In partnership with Focus Reactive
Upcoming event
JSNation US 2025
JSNation US 2025
November 17 - 20, 2025. New York, US & Online
Learn more
Bookmark
GithubProject website
Rate this content

Discover the art of crafting extremely small JavaScript programs. In this talk you’ll learn principles and techniques behind crafting compact yet powerful scripts that are shorter than this description! Dive into the captivating world of minimalist coding, where we use these scripts to conjure art, games, tools, and a myriad of intriguing experiments.

This talk has been presented at JS GameDev Summit 2023, check out the latest edition of this JavaScript Conference.

FAQ

Common techniques in TinyCode include removing whitespace, using single-letter variables, avoiding if statements, and not using functions. These methods help in minimizing the code size.

Frank Forrest is a computer scientist with over 20 years of experience in the video game industry. He is currently focused on indie game development and creating generative art using JavaScript.

Twitter.net is a platform created in 2016 where users can share 140-character JavaScript demos. The website is open-source and features advanced functionalities for creating and sharing tiny code.

TinyCode originated from the demo scene in the early 80s, a computer arts subculture where people create demos composed of graphics and music. These demos run on older computers and emphasize compact, efficient code.

A live editor is highly useful for TinyCode. It provides instantaneous feedback, allows for real-time code execution, and includes tools for debugging, saving, and loading code. It also supports capturing GIFs and images.

TinyCode can be shared at demo parties or on websites like Shader Toy and Twitter.net. These platforms allow users to showcase their compact JavaScript creations.

Yes, TinyCode can be used to create small games. Input can be captured using events like onclick for mouse input or onkeydown for keyboard input. TinyCode can also be used to create interactive experiences.

Examples of TinyCode projects include generative art, fractal rendering, raycasting demos, cellular automata, and tiny games. Specific examples mentioned are a black hole effect, a mandelbrot rendering, and a city sunset scene.

Writing TinyCode is fun and relaxing, helps improve coding skills, and enables faster prototyping of ideas. It also offers the opportunity to be part of a community and participate in coding competitions.

TinyCode refers to the practice of writing very small, minimal JavaScript programs to create art, music, or other effects. This concept emphasizes brevity and efficiency in coding.

Frank Force
Frank Force
27 min
28 Sep, 2023

Comments

Sign in or register to post your comment.
Video Summary and Transcription
This Talk is about writing super tiny JavaScript programs, known as tiny code. It explores the concept of code golf and the use of a live editor for instant feedback. The Talk discusses various ways to share tiny code, including Twitter.net. It also covers creating graphics, games, and sound in a small space. The speaker highlights inspiring tweets and showcases examples of tiny code, including asemic writing. The future of tiny code includes new techniques, better browser support, and AI-assisted programming.

1. Introduction to Tiny Code

Short description:

Welcome to JavaScript HiCues. A talk all about my adventures in writing super tiny JavaScript programs. Today we're going to be focused on these super tiny tweet sized programs. Let's talk about tiny code. Shakespeare said, Brevity is the soul of wit. And that's kind of what tiny code is. But for code instead of the language, there's a lot of different ways to describe tiny code. Code golf is kind of the heart of tiny coding and it's about using programming tricks to save space. Javascript is great for this kind of thing because you can use a live editor. It's a web based tool where you can type in code and see it happen and execute right way in real time. It's got instantaneous feedback and it's a very visual way of programming.

Hi, everyone. Welcome to JavaScript HiCues. A talk all about my adventures in writing super tiny JavaScript programs.

First, a little about myself. My name's Frank Forrest. I have a bachelor's in computer science and I have over 20 years working in the video game industry all across the United States, some games that maybe you've played right now, I'm focused on indie game dev and creating generative art. Here are some of the games I made all with JavaScript. And I also do generative art, which, again, is made with JavaScript.

But today we're going to be focused on these super tiny tweet sized programs. I made over a thousand of them. And I want to share my secrets with you today. Let's talk about tiny code. So what is tiny code? Shakespeare said, Brevity is the soul of wit. And that's kind of what tiny code is. But for code instead of the language, there's a lot of different ways to describe tiny code. You can call it size coding, code golf, or just minifying. But ultimately, the goal is to create cool art, music or other types of effects. And create it with very small, minimal amount of code while you're having fun.

Now this all started with the demo scene in the early 80s. Maybe you've heard of it. It's kind of a computer arts subculture where people make demos that are composed of graphics and music. And they often run on older computers. They can be anywhere from 64 kilobytes down to even below 256 bytes. But those are using bytecode, so they're starting to slowly embrace languages like Javascript. Code golf is kind of the heart of tiny coding and it's about using programming tricks to save space. So for example, you'll squish your code down by removing whitespace, making variables single letters. Not using ifs and just not using functions and kind of fighting for every single byte you could possibly get to squeeze everything down. Javascript is great for this kind of thing because you can use a live editor. It's a web based tool where you can type in code and see it happen and execute right way in real time. It's got instantaneous feedback and it's a very visual way of programming.

2. Sharing Tiny Code on Twitter

Short description:

Using a live editor is great for capturing gifs and images, debugging, and iterating code. There are multiple ways to share tiny code, such as submitting it to a demo party or using websites like Shader Toy or Twitter.net. Twitter.net is an open-source platform for sharing 140-character JavaScript demos. It provides a default code template and automatic setup for animation. Minifying the code and making optimizations can significantly reduce its size. Twitter can also be run standalone with minimal code. It allows for creative remixes and the use of astral Unicode characters to store more bytes in a single tweet.

So I really love using a live editor for this kind of thing. You can even capture gifs and images with it and has some tools to help debug and save and load your code to make it easy to iterate with. There's a couple different ways you can share tiny code.

You can submit it to a demo party. Are there also websites that you can share your code on such as Shader Toy or Twitter.net, which we're going to be talking about today? What is Twitter? Twitter.net is a place where you can share 140-character JavaScript demos. It was created in 2016 and currently has over 20,000 tweets. The website itself is open source. And we're working on a new beta version that has some advanced features that I'll also be showing today.

So the basics of Twitter is when you start a new tweet, you'll be presented with this default bit of code that draws nine lines on the screen, it has them moving back and forth. Here's the code for that. It also will automatically set up a canvas and a loop for you so that the animation is really easy to get working. There are a couple of functions that are set up automatically for sine cosine tangent and to get an RGBA color. So for example, if you want to minify the default twitter program, you start out with the one on the left then you start making optimizations and minifications by removing the comments and squishing it down. Then you can make it even smaller by making some concessions, which change the output a tiny bit, but not in a very noticeable way. Like for example, changing the gap between those rectangles from 100 to 99. That saves a whole byte of space, and saving those bytes really adds up.

Twitter can also be run standalone. So if you wanted to make, say, an HTML file that is able to execute a tweet, it would look something like this. The tweet code is just that little bit in the center there. Everything else is setting up the Twitter interface in a canvas. Just a really minimal amount of code necessary to run one of these. It's pretty much banal JavaScript. We've done all kinds of fun remixes of the default tweet. Here are some of my favorite community remixes. I've also done a couple myself, all using the same kind of concept and exploring what we can do with just those nine vertical lines.

Something you might want to be aware of when using Twitter is that Twitter uses 140 characters, and each one of those characters can hold multiple bytes. We found a way to store two bytes in each one of these Unicode characters, and with the decoder also included, we're able to fit up to 194 bytes in a single tweet. You can imagine the way that works is you have these astral Unicode characters where they hold four bytes, but two of the bytes can be whatever you want. So the way that uncompression works is it calls escape on the Unicode character, removes the unnecessary stuff, then unescapes it and evaluates what's leftover. And it's really allowed us to push the limit of what's possible in a tweet.

3. Creating Tiny Graphics, Games, and Sound

Short description:

You can use a similar technique to pack image data. Most of what we'll be doing is using the 2d canvas API to draw geometric shapes, text and emojis. Random numbers are really key to this whole kind of art creation. You can even make tiny games that fit in this space. If you wanted to make Flappy Bird, fit in 244 bytes of pure HTML, it would look something like this. You can do tiny sound in that bit of space as well. On Twitter, there's a BiteBeat Music as possible. You can even use speech synthesis to create voices which have the ability to tweak pitch and volume too.

You can use a similar technique to pack image data. And I've experimented with that a little bit to create the Mona Duitza, a Mona Lisa fit in a tweet, and even a self-portrait and all kinds of, um, old school graphics, bitmap art. It's pretty fun to experiment with tiny graphics.

Most of what we'll be doing is using the 2d canvas API to draw geometric shapes, text and emojis. We can set the color in alpha and use features like shadow and shadow blur to do special effects. It's even possible to draw one pixel at a time to create super high definition raster graphics. So for example, the kind of functions we'll use are like fill rect, arc, setting fill style, drawing lines, that type of thing, and nearly everything is done using these very small set of functions.

There are other options also you can use for graphics such as HTML, CSS has some neat things you can do, and even making SVGs , and I managed to plot one of my tweets that uses an SVG. It was kind of a fun experiment. Random numbers are really key to this whole kind of art creation, and there is a math random, of course, which you can use to get random numbers between zero and one. But sometimes you need something like a seated random number, and you can accomplish that with like, doing sine of a value squared is a simple way to get a type of random result. And there's all different types of things you can do to get random-ish numbers, like using the mod operator, and you can even create a kind of fractal noise, Perlin noise type of effect with this, too. There are so many different types of algorithms that are possible in this space. It's kind of incredible. Really anything is possible. And that's what I'm going to be showing you today.

You can even make tiny games that fit in this space. I've experimented with that a bit, and I've made quite a variety of games, though getting input does take a bit of space. You can use like an onclick event. It's your smallest option to get mouse input. Maybe something like onkeydown to get keyboard input. Or it's possible to even get gamepad input within a pretty small space to create these super tiny games and interactive experiences. So for example, if you wanted to make Flappy Bird, fit in 244 bytes of pure HTML, it would look something like this. Basically you're going to create a canvas and then the rest of it is all JavaScript, getting your canvas context, setting up an interval, and a little bit of logic for the physics part of stuff, and the only input is using an onclick event. Then to draw stuff, there's a FillRect and a FillText part of it, and the rest of it is just the little bit of logic necessary to run the game. You can do tiny sound in that bit of space as well, though it's really hard to fit because the code to play the sound ends up taking up so much of the space there's not much left to determine what to actually play. Still, we've done a lot of that. On Twitter, there's a BiteBeat Music as possible. I've released entire album of BiteBeat Music on Twitter, and you can even use speech synthesis to create voices which have the ability to tweak pitch and volume too. So there's opportunities there.

4. Inspiring Tweets

Short description:

Let's talk about some of the Tweets that inspired me. Check out this incredible underwater Tweet by Pavel. I just love this one. It's so simple and kind of shows you the power of Twitter. Here's a raycasting demo. That's pretty incredible. I love this quarantine door one by Yanni. This flying paper airplane one is really great. I love this city traffic simulator by Tom Exor. The sea and the thing that I love the most is the little tiny cars that drive around the city and appear to interact with each other. Yantan did this smoky 3D structure using shadow effects to create a cloudy smoky 3D blur.

Let's talk about some of the Tweets that inspired me. Check out this incredible underwater Tweet by Pavel. I just love this one. It's so simple and kind of shows you the power of Twitter. Nearly everything you see here will be a for loop and then a fill style and a fill rect is kind of like how a lot of these Tweets work. Here's a raycasting demo. That's pretty incredible. Blew me away when I first saw it. I love this quarantine door one by Yanni. He's got a nice little optimization here to store fill rect into F and then use that to call fill rect multiple times a common technique you see on Twitter. This flying paper airplane one is really great. It's done in a little bit of different way where you have a function that does align to I love this city traffic simulator by Tom Exor. It's just mind-blowing how he managed to create this. The sea and the thing that I love the most is the little tiny cars that drive around the city and appear to interact with each other. Yantan did this smoky 3D structure. In this case, it's using the shadow effects to create a kind of a cloudy smoky 3D blur.

5. Exploring Tiny Code Examples

Short description:

Let's take a look at some of my tiny code examples and how they work. I've made over a thousand tiny code tweets in the past four years, covering a wide range of subjects. Space is a favorite, and I've created effects like a black hole and fractal rendering. Cellular automata is powerful, with effects like water and fire. I've also experimented with tiny cities and buildings, including a city sunset and a raycasting system. Tree scapes, like the tree lake scene, have been optimized to just 119 bytes.

So let's take a look at some of my tiny code examples and I can walk you through how they actually work. Here's the very first tweet that I did way back in 2019. Not my best work, but at the time it was and I've come a long way though. In fact, I've made over a thousand of them in the past four years. Here are some of the best ones I've done.

I've covered a wide range of subjects. Space is one of my favorites. So for example, to create a black hole type of effect, you can do that by iterating and setting a color and drawing these fill recs. In this case, it's starting from the bottom, iterating up and spiraling out and that color starts red and goes towards the white, and there's a special test for the very first rec to be drawn to draw that black in the background. You can do fractal rendering in this space very well. It lends itself greatly to tiny code. For example, a tiny mandelbrot rendering would look something like this. It's using the technique of rendering out one pixel at a time to do a super high-definition render.

Cellular automata is a very powerful effect. Here are a couple of the ones I've done. A lot of different results you can get such as a water or fire type of effects are more of a mathematical type of result. Here's a Sierpinski triangle that's drawn using a 1D cellular automata effect. It's storing the cells into an array and going through and updating all those cells based on the rule which is rule 90 in this case, but ultimately matters is the bits of that rule that are used to determine the next state of each cell. I've done so many different experiments with tiny little cities and buildings. I love that kind of thing. For example, this city sunset you can do by again, looping and setting the color, drawing fill racks. In this case it draws the background during the very first frame a little bit different than the buildings and each building is drawn by a grid of squares which alternate between black and colored for the windows and they kind of are shuffled and drawn from the top to the bottom to create a kind of cityscape type of effect. I really love how this one turned out. One of the more recent things we've been able to do in Twitter is ray casting to really push the limit of what is possible. I've even done a super high definition raycasting system in Twitter, like this tweet here that draws a city and has shadows and just textures as well, using that code on the right there. I've done all different types of tree scapes, like this tree lake scene. And with some help in the community, we managed to squeeze it down from 194 characters down to only 119 bytes. So, it's pretty interesting the way this one works and how it kind of generates a random number, for example. Definitely worth digging into. Drawing from the left to the right for the trees, the very first frame is where it draws the stars or the kind of reflection and vertical or horizontal lines.

6. Asemic Writing and the Future of TinyCode

Short description:

Asemic writing is a fun subject to explore on Twitter. Creating a super tiny writing system involves drawing a scribbly line with breaks and different coefficients. I've even fit tiny people by drawing four lines for their limbs. I've created optical illusions, landscapes, chaotic systems, physics simulations, trees, tunnels, 3D effects, animated words, and more. Writing TinyCode is fun, relaxing, and improves coding skills. Join the TinyCode movement by creating your own art in 140 characters and sharing it on social media. The future of TinyCode holds new techniques, better browser support, evolving JavaScript language, faster computers, and AI-assisted programming.

Asemic writing is where you have a writing that looks like it's realistic and mean something, but it's actually just fake. I mess around with that a lot in Twitter. I think it's kind of a fun subject.

So for example, if you want to make a super tiny writing system, I was able to squeeze it down to the core essentials here, kind of like deciding when you're going to have breaks in the writing is the very first line, and then starting and stopping that line using a fill begin path. And for the rest of it, we're just going to draw this scribbly type line, which is moving from the left to the right and top to the bottom, and kind of circling around with different coefficients.

I've even managed to fit super tiny people that are running and jumping and fighting and stuff like that. So a little tiny person you can fit in this space by thinking of them as like drawing four lines. For the four limbs, you're starting at the top of the head, drawing down, and each one of those lines is a series of points. So you have a head, shoulder, elbow, hand, and then very similar thing for the other arm is just kind of offset and the legs are a little bit longer, but ultimately using the same code.

I'll just blast through a couple more tweets just to give you a sense of the kind of stuff I've created. I've done optical illusions and even one optical illusion of the year for the dual axis rotation illusion, which I originally posted on Twitter. I've done so many different types of landscapes. They're a really fun thing to play around with. Chaotic systems can have really interesting results. I love how they're just like unpredictable. Physics simulations can fit really well in a tweet like particles or water bouncing things, or even kind of pseudo physics. I've done all different types of trees, everything from palm trees, bamboo, 3D stuff. Often I'm inspired by mathematical concepts for tweets to make geometric designs. I've done a lot of tunnels and 3D effects. I've done a whole series of words that are kind of like animated to show off that word. It's kind of a weird idea, but it was really fun to try to fit these in the tweet. There are so many more that I've done and other people have done. It's really worth checking out what is there on Twitter. It's just amazing what we've managed to do and continue to keep pushing out new ideas all the time.

Maybe you've watched this whole presentation and are thinking, why write TinyCode? Well, I could tell you, it's fun and relaxing. It's one of my favorite things to do. It will also really help you improve your coding skills. You'll be able to practice prototyping ideas and get much faster at just making things happen. And there's also a community that you can be a part of and even be challenged by competitions like the demo scene. Today, I have a challenge for you, which is to join the TinyCode movement by creating your own art in 140 characters and share it on social media with hashtag TinyCode.

What is the future of TinyCode? We're constantly discovering these cool new techniques to make new things possible and browser support is getting better too, which means it's going to look the same across different browsers and mobile devices. Of course, the JavaScript language is constantly evolving, which means that as new features get added we can maybe have more opportunities to fit things into that space. And computers are getting faster too, so we can do higher resolution output and more complex simulations using the same amount of code. And one of the newest things that's been happening is AI-assisted programming, which can help explain how this TinyCode works and maybe even write it. That's all I have to share with you today. I hope my talk inspires you to write your own TinyCode. As DaVinci said, simplicity is the ultimate sophistication. Thank you so much for watching my talk.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Scaling Up with Remix and Micro Frontends
Remix Conf Europe 2022Remix Conf Europe 2022
23 min
Scaling Up with Remix and Micro Frontends
Top Content
This talk discusses the usage of Microfrontends in Remix and introduces the Tiny Frontend library. Kazoo, a used car buying platform, follows a domain-driven design approach and encountered issues with granular slicing. Tiny Frontend aims to solve the slicing problem and promotes type safety and compatibility of shared dependencies. The speaker demonstrates how Tiny Frontend works with server-side rendering and how Remix can consume and update components without redeploying the app. The talk also explores the usage of micro frontends and the future support for Webpack Module Federation in Remix.
Impact: Growing as an Engineer
React Summit 2022React Summit 2022
26 min
Impact: Growing as an Engineer
Top ContentPremium
This Talk explores the concepts of impact and growth in software engineering. It emphasizes the importance of finding ways to make the impossible possible and the role of mastery in expanding one's sphere of impact. The Talk also highlights the significance of understanding business problems and fostering a culture of collaboration and innovation. Effective communication, accountability, and decision-making are essential skills for engineers, and setting goals and finding sponsors can help drive career growth. Feedback, goal setting, and stepping outside of comfort zones are crucial for personal development and growth. Taking responsibility for one's own growth and finding opportunities for impact are key themes discussed in the Talk.
Full Stack Components
Remix Conf Europe 2022Remix Conf Europe 2022
37 min
Full Stack Components
Top Content
RemixConf EU discussed full stack components and their benefits, such as marrying the backend and UI in the same file. The talk demonstrated the implementation of a combo box with search functionality using Remix and the Downshift library. It also highlighted the ease of creating resource routes in Remix and the importance of code organization and maintainability in full stack components. The speaker expressed gratitude towards the audience and discussed the future of Remix, including its acquisition by Shopify and the potential for collaboration with Hydrogen.
Debugging JS
React Summit 2023React Summit 2023
24 min
Debugging JS
Top Content
Watch video: Debugging JS
Debugging JavaScript is a crucial skill that is often overlooked in the industry. It is important to understand the problem, reproduce the issue, and identify the root cause. Having a variety of debugging tools and techniques, such as console methods and graphical debuggers, is beneficial. Replay is a time-traveling debugger for JavaScript that allows users to record and inspect bugs. It works with Redux, plain React, and even minified code with the help of source maps.
The Whimsical Potential of JavaScript Frameworks
React Summit US 2023React Summit US 2023
28 min
The Whimsical Potential of JavaScript Frameworks
Top Content
Watch video: The Whimsical Potential of JavaScript Frameworks
The speaker discusses the whimsical and detailed work of Stripe, particularly their interactive and dynamic pages. They explain the use of React for building whimsical details and tracking mouse position. The speaker introduces React Spring for smooth animation and React3 Fiber for creating a 3D egg model. They also mention the use of Framer Motion and React server components for animating CSS properties.
Making JavaScript on WebAssembly Fast
JSNation Live 2021JSNation Live 2021
29 min
Making JavaScript on WebAssembly Fast
Top Content
WebAssembly enables optimizing JavaScript performance for different environments by deploying the JavaScript engine as a portable WebAssembly module. By making JavaScript on WebAssembly fast, instances can be created for each request, reducing latency and security risks. Initialization and runtime phases can be improved with tools like Wiser and snapshotting, resulting in faster startup times. Optimizing JavaScript performance in WebAssembly can be achieved through techniques like ahead-of-time compilation and inline caching. WebAssembly usage is growing outside the web, offering benefits like isolation and portability. Build sizes and snapshotting in WebAssembly depend on the application, and more information can be found on the Mozilla Hacks website and Bike Reliance site.

Workshops on related topic

Master JavaScript Patterns
JSNation 2024JSNation 2024
145 min
Master JavaScript Patterns
Top Content
Featured Workshop
Adrian Hajdin
Adrian Hajdin
During this workshop, participants will review the essential JavaScript patterns that every developer should know. Through hands-on exercises, real-world examples, and interactive discussions, attendees will deepen their understanding of best practices for organizing code, solving common challenges, and designing scalable architectures. By the end of the workshop, participants will gain newfound confidence in their ability to write high-quality JavaScript code that stands the test of time.
Points Covered:
1. Introduction to JavaScript Patterns2. Foundational Patterns3. Object Creation Patterns4. Behavioral Patterns5. Architectural Patterns6. Hands-On Exercises and Case Studies
How It Will Help Developers:
- Gain a deep understanding of JavaScript patterns and their applications in real-world scenarios- Learn best practices for organizing code, solving common challenges, and designing scalable architectures- Enhance problem-solving skills and code readability- Improve collaboration and communication within development teams- Accelerate career growth and opportunities for advancement in the software industry
Using CodeMirror to Build a JavaScript Editor with Linting and AutoComplete
React Day Berlin 2022React Day Berlin 2022
86 min
Using CodeMirror to Build a JavaScript Editor with Linting and AutoComplete
Top Content
Workshop
Hussien Khayoon
Kahvi Patel
2 authors
Using a library might seem easy at first glance, but how do you choose the right library? How do you upgrade an existing one? And how do you wade through the documentation to find what you want?
In this workshop, we’ll discuss all these finer points while going through a general example of building a code editor using CodeMirror in React. All while sharing some of the nuances our team learned about using this library and some problems we encountered.
Testing Web Applications Using Cypress
TestJS Summit - January, 2021TestJS Summit - January, 2021
173 min
Testing Web Applications Using Cypress
Top Content
Workshop
Gleb Bahmutov
Gleb Bahmutov
This workshop will teach you the basics of writing useful end-to-end tests using Cypress Test Runner.
We will cover writing tests, covering every application feature, structuring tests, intercepting network requests, and setting up the backend data.
Anyone who knows JavaScript programming language and has NPM installed would be able to follow along.
React Server Components Unleashed: A Deep Dive into Next-Gen Web Development
React Day Berlin 2023React Day Berlin 2023
149 min
React Server Components Unleashed: A Deep Dive into Next-Gen Web Development
Workshop
Maurice de Beijer
Maurice de Beijer
Get ready to supercharge your web development skills with React Server Components! In this immersive, 3-hour workshop, we'll unlock the full potential of this revolutionary technology and explore how it's transforming the way developers build lightning-fast, efficient web applications.
Join us as we delve into the exciting world of React Server Components, which seamlessly blend server-side rendering with client-side interactivity for unparalleled performance and user experience. You'll gain hands-on experience through practical exercises, real-world examples, and expert guidance on how to harness the power of Server Components in your own projects.
Throughout the workshop, we'll cover essential topics, including:- Understanding the differences between Server and Client Components- Implementing Server Components to optimize data fetching and reduce JavaScript bundle size- Integrating Server and Client Components for a seamless user experience- Strategies for effectively passing data between components and managing state- Tips and best practices for maximizing the performance benefits of React Server Components
0 to Auth in an Hour Using NodeJS SDK
Node Congress 2023Node Congress 2023
63 min
0 to Auth in an Hour Using NodeJS SDK
WorkshopFree
Asaf Shen
Asaf Shen
Passwordless authentication may seem complex, but it is simple to add it to any app using the right tool.
We will enhance a full-stack JS application (Node.JS backend + React frontend) to authenticate users with OAuth (social login) and One Time Passwords (email), including:- User authentication - Managing user interactions, returning session / refresh JWTs- Session management and validation - Storing the session for subsequent client requests, validating / refreshing sessions
At the end of the workshop, we will also touch on another approach to code authentication using frontend Descope Flows (drag-and-drop workflows), while keeping only session validation in the backend. With this, we will also show how easy it is to enable biometrics and other passwordless authentication methods.
Table of contents- A quick intro to core authentication concepts- Coding- Why passwordless matters
Prerequisites- IDE for your choice- Node 18 or higher
JavaScript-based full-text search with Orama everywhere
Node Congress 2023Node Congress 2023
49 min
JavaScript-based full-text search with Orama everywhere
Workshop
Michele Riva
Michele Riva
In this workshop, we will see how to adopt Orama, a powerful full-text search engine written entirely in JavaScript, to make search available wherever JavaScript runs. We will learn when, how, and why deploying it on a serverless function could be a great idea, and when it would be better to keep it directly on the browser. Forget APIs, complex configurations, etc: Orama will make it easy to integrate search on projects of any scale.