An Introduction To IoT; Or How I Built an IoT Kitty Litter Box Using JavaScript

Rate this content

My favorite things in life are cats, computers and crappy ideas, so I decided to combine all three and make an IoT (Internet of Things) litter box using a Raspberry Pi and JavaScript! If you have ever wanted to get build your own IoT project, but didn’t know how to start, then this is the talk for you.

Together, we will go through how I setup my IoT Litter Box from start to finish. Including how to setup Node.js on a Raspberry Pi and how to connect sensors to a Raspberry Pi and how to read the sensor inputs with Node.js.

23 min
10 Jun, 2021

AI Generated Video Summary

This Talk is an introduction to IoT and JavaScript, discussing the use of JavaScript and Node for IoT projects, the importance of data considerations and choosing the right databases, and the practical implementation of an Internet-connected kitty litter box. It also explores controlling LEDs with Johnny-5, solving the load cell problem, and the future of IoT. The speaker encourages experimentation and shares cool IoT projects like the magic mirror and internet-connected nano leaves. Practical IoT projects and joining the speaker's discussion rooms are also suggested for beginners.

1. Introduction to IoT and JavaScript

Short description:

Welcome to an introduction to IoT, parentheses, Internet of Toilets. This is a talk about how I built an Internet-connected kitty litter box using JavaScript and Node. We'll cover the introduction to IoT, why JavaScript and Node are great for IoT projects, my litter box project, and broad generalizations about the future of IoT.

Hello. Welcome to an introduction to IoT, parentheses, Internet of Toilets. This is going to be a talk about how I built a Internet-connected kitty litter box using JavaScript and Node. So let's just jump into it.

First of all, my name is Joe Carlson. You probably don't care about me at all. That's fine. But I'm a software engineer and developer advocate and I work for a company called MongoDB. You may have heard of it before. It's a pretty cool database product if I do say so myself. If you are wanting to hang out with me ever again in the future, please do so. Best place to do that is on Twitter. But if you're on TikTok too, you should for sure check that out and make funny videos about programming over there. If you want to follow any of the links, source code, recording of this video, slides, code samples, all that, you can find that on the link there. slash IOTkitty slash BF04B or if you scan that QR code in the upper right-hand corner of the video, that will also take you there. Lastly, and this is very important, but anything I say in this talk reflects my own views and not the views of my employer. All right? Cool. I love my job. I don't want to get fired.

So what are we going to talk about today? First of all, we're going to just do a quick introduction to IoT, what is it, and why I think it's so cool. Then I'm going to talk about why you should be considering JavaScript and Node for your next IoT project. Then we're going to talk about my favorite part here, which is my litter box. How I built it, we'll show you some code, and how it works. And lastly, we're going to make some broad generalizations about the future of the internet of things. This will be fun to watch in five years together, we can see how wrong I am about everything. But hey, whatever, predicting is fun, and I'm going to try my best at it.

Okay, so what the heck is IoT? Well, I'm sure you already know, but it's basically anything that connects up to the internet. It's just a thing with a chip on it that has Wi-Fi or Ethernet or whatever, right? It just can connect up to the internet. But I want to talk about my particular interest in IoT. I think that us as engineers, we are particularly well-suited for exploring tech and the internet as a medium of art.

2. Exploring IoT and JavaScript

Short description:

The internet has shaped our generation, and there's so much room to explore. I love exploring the fine line between genius and stupidity. I ran a hack-a-thon called the Stupid Shit and Terrible Ideas Hack-a-thon, where we made fun and unconventional projects. JavaScript and Node are great choices for IoT projects, especially for new developers. C and C++ still have their place, but JavaScript is easier to develop with and update over a network. The internet already speaks JavaScript.

I think the internet is the defining thing that has shaped who we are as a generation, how we behave, and I think that there's so much room to explore that area. And I love doing that through art and tech. In particular, even more niche, I'm obsessed with stupid shit. I love putting chips in things that they should not, they do not belong in. I think it's fun exploring that fine line between just genius and complete stupidity.

In fact, I love it so much, I ran a hack-a-thon called the Stupid Shit and Terrible Ideas Hack-a-thon, which we just made stupid stuff. Like someone made a camera that only takes photos when you shake it, or a six-foot wooden fidget cube, or laptop made out of cardboard. Fun stuff, right? I love stupid shit.

Okay, so IoT. Great. I think we all know what it is. I just wanted to talk about why I love it. Why should you be considering JavaScript and Node for your next IoT project? Well, did you know that 58% of IoT developers self-identify as Node developers. Hmm? This is purely my opinion, but I think JavaScript is a great choice for new developers. A lot of people are learning it when they're coming out of boot camps, it was my first programming language. It's just a good tool for people who are learning how to, like, or want to do more visual stuff.

And not to say that C or C++ are bad programming languages, they definitely still have a place in programming Internet-Connected devices. That is not going away anytime soon. They are faster and smaller than JavaScript is right now. And there's They're just harder to develop for sometimes, you know? It's harder for me anyways. And if you're learning hardware, just take one thing at a time, learn the hardware component. Okay. Also easy to update over a network. So traditionally with embedded devices how to update the firmware on them is you have to take that device, plug it in, and reflash that code on there. JavaScript's a little easier, though. All you have to do is run Git pull and NPM install and you're done. You're all updated. The Internet already speaks JavaScript. We're already speaking HTTP over the web. We're already sending these JavaScript files to run the Internet.

3. Introduction to IoT and JavaScript (continued)

Short description:

JavaScript is event driven in nature. IoT devices are also event driven. Sensors in the field wait for events to happen and trigger code execution.

Makes sense to just do it for IoT devices as well. And you may not know this, but there's already tons of existing tools, libraries, excuse me, and data sets already available for you. Including CylonJS and Johnny5, which you should check out both of them. They're great. JavaScript is event driven in nature. And if you think about it, IoT devices are also event driven, right? Like you have some sort of sensor out in the field that's waiting for some sort of event to happen, and then once it's triggered, you want some sort of event or call back in JavaScript, right, if you want that code to run. Okay.

4. Data Considerations for IoT Projects

Short description:

When building IoT projects, it's important to consider data considerations and choose databases that can ingest data quickly. IoT projects are write-driven applications, so the ability to write data concurrently and massively is crucial. Flexible schemas are well-suited for IoT projects, allowing for easy updates and adjustments. MongoDB is a great choice for IoT projects, as it handles time series data well and allows for schema validation on a database level. If you're considering MongoDB for your IoT project, it's worth exploring its capabilities.

So I do work for MongoDB and I do need to talk a little bit about data considerations if you're building IoT projects. So I want to talk broadly about what to look for when you're building out or you're looking at databases to save IoT data.

Okay, so first of all, you want to make sure you're looking at databases that are able to ingest data quickly, right? IoT projects are unique in that they are write-driven applications. Most applications that are web-focused are read-heavy, right? Like I write one tweet to a database and it could be potentially read by, you know, millions of people. None of mine are. But if I was that famous, like maybe it could be. But you want to make sure you're looking at databases with different needs, right? And being able to ingest or write data concurrently and massively is extremely important for an IoT database.

We mentioned earlier that a lot of IoT projects are event-driven, right? We're waiting for some asynchronous event to happen out in the field and we want to make sure we have a database that matches that event-driven nature of our IoT projects. Flexible schemas are uniquely well-suited for IoT projects. For example, on my project I built a... I added a new sensor and I was able to update my time series data to include that new sensor data. Time series data is unique in that it gets stale really quickly, and you're typically using it to visualize on some sort of dashboard. Maybe we're using it for historical uses as well. As we're adding and upgrading over time, we can start adding and adjusting our schema flexibly at scale.

I do want to note here, it's a common misconception that MongoDB is a schemeless database. You can actually validate schemas on a database level with MongoDB. You don't need an ORM like Mongoose. And you want to make sure you have a database that handles time series data well. You can make a time series data with most RDBMSs, cool, not a problem. But it does get messy really quickly. I'm going to show you my IoT time series data I used for my project and why I think it's superior to other models. So, I may be biased here since I work for MongoDB, but MongoDB is a great choice because it does all these things and more. So, all I have to note is that if you're looking at using a MongoDB or IoT project in the future, you should definitely be considering MongoDB. All right, sales pitch is over, let's get back to the good stuff. IoT key litter box, let's jump in. This is actually what I ended up building. It's a little mid-century box I bought. I know it's extra. You don't need to get something fancy like this. You could get a $20 plastic thing on Amazon or whatever, as long as it's got an enclosure and can use cold litter, that's all you need.

5. Robot Kitty Litter Box and Asynchronous Events

Short description:

This robot kitty litter box exists, and it works by using load sensors underneath the box to detect a cat-sized object entering. Once a cat is detected, its weight is measured and recorded in a MongoDB database. After the cat is done, a new base weight is initialized, and the process waits for a new event. The project involves waiting for asynchronous events to occur. The first step in any IoT project is to make an LED to ensure the circuits are set up correctly.

I thought this was a dumb idea, but I recently found out this robot kitty litter box exists. Wired gave it an 8 out of 10 and, more importantly, they're selling it for $500. I'm not trying to monetize this, but if you wanted to, this might be your chance.

How does this thing work? I have load sensors underneath the box. They're basically like an internet-connected bathroom scale. Let's get to the other part first. We have an enclosure on the box and there's a switch on it to determine when it's open or closed. When we open that box, we're going to something I call maintenance mode. We're either removing waste or adding litter to the box. The point is the base weight of that box changes every time it goes into maintenance mode. Once I've cleaned it up, done my work on it, close it back up again, it leaves maintenance mode, waits for it to chill out a little, then we reinitialize the base weight of that box.

After the base weight of that box has been determined, what we do is we wait for a cat-sized object to enter the box. Now I don't know if that's an opossum, a raccoon, or a large rat. It doesn't really matter. We're just waiting for something that's around 5 to 15 pounds to enter that box. Once a cat has been detected by the load cells, we wait a little bit for the cat to settle. Then we take a measurement of that cat's weight, so I can passively measure the cat's weight over time, and we record a bathroom event having occurred. So it does its business, and we fire that event off into a MongoDB database in the cloud.

Alright, cool, so the cat's done its business. What we do is wait for things to cool off a little bit, I wait like 5 minutes, and we reinitialize a new base weight of the box, and we wait for a new event. Either that's a maintenance event, or a new cat entering the box event. Alright, so there are all these asynchronous events that we're just waiting for to constantly occur. And that's it, it's pretty simple. Let's jump into some code, though, huh? Let's speed a little code, guys. If you want to follow along with any of the source code, again, all that code is available at that link, or if you scan that QR code with your phone.

Okay, so the first step for any IoT project, if this is your first IoT project, the first step you need to do is make an LED. LED, blank. It basically just makes sure that your circuits are set up, your board's fine, you're able to communicate it and make it do what you want. And just like programming, we iterate on that and build. So you can see actually I have the load cells staged up next door or next to it over there.

6. Controlling LED with Johnny-5

Short description:

To make the LED go on and off, we use Johnny-5 with the Raspberry Pi package. We initialize a new Johnny-5 board for Raspberry Pi, wait for it to be ready, and then initialize an LED on the 13th GPIO pin. It only takes a few lines of code to get our hello world working.

And I'm just making that LED go on and off. That's it. Okay, so how do we do that? With Johnny-5, it's pretty easy. Johnny-5 works with a lot of different boards. So we need to import the Raspberry Pi package. And we reinitialize a brand-new Johnny-5 board and tell it, hey, your input-output you're going to be dealing with today is in fact a Raspberry Pi board. All right. And then we wait for that board to be ready to start listening. And then we just initialize a brand-new LED on the 13th GPIO pin. I don't know what that is. I got to Google it every single time I hook it up. And then it just has a built-in function that says blank. But that's it. What is that? That's like, I don't know, less than 10 lines of code to get our hello world working for our Johnny-5. So pretty simple.

7. Making an LED into a Toilet

Short description:

To make an LED into a toilet, we use a Raspberry Pi board and a magnetic switch to determine the box's maintenance mode. Depending on whether it's open or closed, the state of the box can be changed. The Raspberry Pi reads the events in real time, making it a simple process.

OK. So how do we make an LED into a toilet? Good question. We need to do the same thing. We're going to bring in that Raspberry Pi board, and instead of bringing an LED, we're going to be using a magnetic switch to determine if that box is in maintenance mode or not. And then just depending on the state of whether it's open or closed, we can change the state of the box.

OK, so let's see it in practice. I'm going to show you the board or me doing it. And you can see the little switch there, that little white thing. That's the magnetic switch. There's one on each side. And as I open and close that box, you can see that those events being read in real time by my the Raspberry Pi and determining what state the box is in. Pretty, pretty simple.

8. Solving the Load Cell Problem

Short description:

I had to get creative with solving the load cell problem since I couldn't find a library with Johnny-5 to interface directly with the load cells. Instead, I used the Spawn Child process in Node Core to run a Python script and send the data to my Node program.

All right, the load cells. This part's actually a little more complicated. I have to get a little creative with how I solve this problem. I should end up using, because I couldn't find a library with Johnny-5 that could interface directly with the load cells I bought. Go figure, right. But I did, in fact, find a Python library that could do it. So I end up using the Spawn Child process, which is just baked into Node Core, to spin off a child thread that runs a Python script and sends the data from that Python script up to the parent process. And then I can do whatever I want with it in my Node program. Pretty simple. It's Node and JavaScript, but I got a little creative on it, too.

9. IoT Data and Box Assembly

Short description:

Every tenth of a second, the base weight of the box is read and sent. Real-time registration of weight changes is possible. IoT time series data is stored in a MongoDB database, with new documents created every 24 hours. The events array captures cat entries and box cleanings, designed for easy reporting. Box assembly involves mounting the Pi and connecting wires.

So every tenth of a second, it's just reading the base weight of the box and it sends it up. I convert it into a float, update the average, and then I just keep waiting for that cat-sized event to happen.

All right, so let's take a look at it. Underneath that piece of plywood, I have the load cells in each corner. And it's hard because I couldn't get too far enough away, but I'm pressing on the board. And you'll see here in just a moment, those presses are being registered in realtime on my Node application. So I'm able to register and see in realtime what's happening or, like, the weight of the box at all times.

Okay, I promised you I would talk about my IoT time series data here. And I'm still going to follow through with that promise. So this is what it looks like. Every single 24 hours, I create a brand-new document in my MongoDB database. And in there I have some metadata about me and the cat in case I wanted to scale this up to multiple boxes and cats and owners. And I have an events array. So in my events array, every single time a cat goes in the box or I clean the box out, I add a brand-new document or subdocument into that events array. I designed it this way because of how we use it, right? I'm reading this data to display on a dashboard. And I want to show all the events per day of what's happening. So I designed my IOT schema to be easily read for my reporting that I'm doing on this. Which is, like, the number one rule of MongoDB schema design. Just design your schema based on the needs of your application. How are you going to be using that data? And this was how I'm going to be using it. You can do this, like, once a week, once a year. But for a little box like this, it makes sense just to do it once a day.

All right, cool. So box assembly. I put the whole box together. You can see the Pi mounted on the inside there. I got some wires. And I got a little wire to plug it in. And that's it. It's pretty simple.

10. The Future of IoT and How to Get Started

Short description:

You know, it doesn't look elegant when you open the box up. But it works. It looks pretty good when it's all closed up. And there's my cat. I had to bribe him some treats to get this photo. The future of IOT: devices will get smaller and more powerful, be embedded in more things, JavaScript will be compiled down to more IOT and embeddable sizes, better hardware support, sensor issues will get fixed, batteries will continue to be a bottleneck. To become an IoT or JavaScript or MongoDB master, get out there and do it. Pick out a project. Make something fun. Just play around.

You know, it doesn't look elegant when you open the box up. But it works. It looks pretty good when it's all closed up. And there's my cat. I had to bribe him some treats to get this photo.

All right, almost done here, I promise, the future of IOT. Let's make some predictions here. First of all, I think, of course, devices are going to get smaller and more powerful in the future. We're already seeing this. They're going to be embedded in even more things as we move forward. We're actually already seeing this, but JavaScript is being compiled down to more IOT and embeddable sizes, right? They're more stripped down. And they have a smaller garbage collector to be more energy and memory efficient so they are more effective on smaller devices. We're already seeing this happen. We're going to see better hardware support. By the way, I told you I had some sensor issues with those load cells. I was able to find a Python library. But in the future, those will get fixed, I think. And, of course, batteries are and will continue to be the bottleneck. As devices get more powerful, they also generate more heat, which also consumes more power, unfortunately, right? So, especially embedded devices that aren't plugged in 24-7, like my box, energy is and continues to be the issue as we see these in more places.

Okay. So, if I've inspired you all today to want to become an IoT or JavaScript or MongoDB master, how do you do it? Well, listening to me talk about this is one thing. The other thing I would recommend doing is just to get out there and do it. Pick out a project. It doesn't have to be cool. Make some stupid shit at home. Just make something fun. Make an LED blink. You can get a Raspberry Pi, most computer stores, for about $25 to $35. And you can get a little sensor IoT thing, a starter pack on Amazon for like $20 too. Just play around.

11. Conclusion and Poll Results

Short description:

Don't worry about monetizing or making something professional or cool. Explore and share your projects. Connect with me on Twitter at Joe Carlson1. Thank you all for being incredible. Let's discuss the poll results: 50% have no experience with IoT, 34% have a little experience, 16% have made a project, and 0% work full time in IoT.

I think don't worry about having to monetize it or making something that's professional or cool. I think it's fun just to explore and see what you get. And try to share it if you can. I love seeing that stuff. I'd love to see what you work on.

Okay. I'm in the chat if anyone has any questions. Otherwise, you can definitely hit me up on Twitter at Joe Carlson1. And, yeah, I would love to connect with you anyway, even if you don't have questions. All the links for this talk, video slides, code samples, everything, available at the link there or if you scan that QR code.

Thank you so much, everyone. You've been incredible. I've had a blast here. Bye.

Now let's discuss the poll. The question is, what's your experience with IoT? Not judgments. Just curious. None said 50% of them says none. Just interested in potentially getting into some day. A little. With 34%. A little I have made a blank one time. 16% responded I have a couple of projects under my belt. And 0% said I do IoT work full time. Nobody does it full time. But most of them have. That's about what I expected. That's about what I expected. I mean this is a gentle introduction to Internet toilets. I hope too even if you have been a master maybe still learn something new.


Cool IoT Projects and Small Experiments

Short description:

But you know this is a great time for newbies. That's great. Awesome. Let's go to the Q&A. Tell me about some other cool IoT projects you have been working on. I recently made the magic mirror project, which involves putting a monitor behind a two-way mirror and hooking it up to a Raspberry Pi. I also made my own internet-connected nano leaves using a 3D printer and LEDs. Another project I worked on was a digital graffiti board that allows people to draw on it using their phones. If you're new to IoT programming, I recommend getting a Raspberry Pi and experimenting with making an LED blink or creating a web app that translates text into Morse code.

But you know this is a great time for newbies. That's great. Awesome. Let's go to the Q&A.

So we have. Tell me about some other cool IoT projects you have been working on. Oh, great question. Yeah. A bunch. I didn't vent this project but I recently made it the magic mirror project it's basically putting a monitor behind a two way mirror and then hooking ever as very pie up and it runs a little electron web app. That's super fun that's honestly the most useful things I've ever made. It's so fun. Also made a. You know those nano leaves those like cool fancy triangles that light up you can put on the wall. They're also very expensive but I made my own internet connected, at least to the 3d printer and some LED's and a little web app so you could control them. It was so fun. It was such a fun project. And then, have I made anything else. Not those are the two Those are the big ones, and my internet connected litter box, I think they're just fun. Oh, I did make a digital graffiti board, couple weeks ago. Yeah, the idea was like, it's like an art piece or like I could have it like in the back when I'm giving a talk like this, and people could join in and like draw on it in their phones like interact with it in real life. Thanks Liz I'm biased but I totally agree with you. They are really fun and amazing. My question is, any small experiments that could be easy to dive into IoT with JavaScript. Yeah, I talked about this a little bit in the talk, but my recommendation if you're new to IoT programming, get a Raspberry Pi, it's like a UNIX based environment so you're used to programming on a Mac, or on Linux, it's going to same deal. Yeah, get a full Node environment on it and just kind of play around that the easiest thing to do is just make an LED to like blink turn on and off, like, yeah. I don't even know like I actually, one of my first projects I ever made was like a web app that could translate le or more like text into Morse code so just like blink morse code for whatever message you're doing. Yeah, I don't know. I just like, I mean that was such an easy circuit but kind of make like a fun web project out of it was kind of a blast. Yeah, it's not running anymore.

Practical IoT Projects and Conclusion

Short description:

If you're just starting out with IoT, it's best to do what you know. There are many practical and everyday IoT projects you can explore, such as network-wide ad blockers and network attached storage. You can also create art projects or simply experiment with raspberry pi beginner projects. Join Joe in his speaking rooms on Spatial Chat for more discussions.

Yeah, I think everybody that starts with IoT, they always start with the roster by it's like most common and yeah, so. Oh, totally. And like you couldn't get into it like I've gotten into the more advanced embedded chips and smaller things and whatever like cool but like if you're just starting out, why make your life hard just like do what you know, you know, I agree.

So, the question is, in your opinion, what are some other practical or everyday IoT projects that you've come across. Um, I mean, anything that has a chip in it. I personally like there's a ton of amazing cool private projects out there that are IoT projects like my pie hole is one of my coolest things I've I currently use I didn't make pie hole, it's like a network wide ad blocker works at the DNS, which is super cool. I made a NOS or network attached storage with raspberry pi's which is cool. Little art projects. The point is that you can make practical things for your home, you can make dumb art projects, you can make useless stuff. It kind of depends on whatever you want to do. Just give it a Google like raspberry pi beginner projects, you're going to find a bunch of cool stuff to make. That's a great advice. Thank you, Joe.

So it seems that we don't have any more questions, but please join Joe in his speaking rooms on Spatial Chat. The link to join is on the timeline. Thank you Joe. See you later. Thank you. Bye.

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

Node Congress 2022Node Congress 2022
26 min
It's a Jungle Out There: What's Really Going on Inside Your Node_Modules Folder
Do you know what’s really going on in your node_modules folder? Software supply chain attacks have exploded over the past 12 months and they’re only accelerating in 2022 and beyond. We’ll dive into examples of recent supply chain attacks and what concrete steps you can take to protect your team from this emerging threat.
You can check the slides for Feross' talk here.
Node Congress 2022Node Congress 2022
34 min
Out of the Box Node.js Diagnostics
In the early years of Node.js, diagnostics and debugging were considerable pain points. Modern versions of Node have improved considerably in these areas. Features like async stack traces, heap snapshots, and CPU profiling no longer require third party modules or modifications to application source code. This talk explores the various diagnostic features that have recently been built into Node.
You can check the slides for Colin's talk here. 
JSNation 2023JSNation 2023
22 min
ESM Loaders: Enhancing Module Loading in Node.js
Native ESM support for Node.js was a chance for the Node.js project to release official support for enhancing the module loading experience, to enable use cases such as on the fly transpilation, module stubbing, support for loading modules from HTTP, and monitoring.
While CommonJS has support for all this, it was never officially supported and was done by hacking into the Node.js runtime code. ESM has fixed all this. We will look at the architecture of ESM loading in Node.js, and discuss the loader API that supports enhancing it. We will also look into advanced features such as loader chaining and off thread execution.
JSNation Live 2021JSNation Live 2021
19 min
Multithreaded Logging with Pino
Almost every developer thinks that adding one more log line would not decrease the performance of their server... until logging becomes the biggest bottleneck for their systems! We created one of the fastest JSON loggers for Node.js: pino. One of our key decisions was to remove all "transport" to another process (or infrastructure): it reduced both CPU and memory consumption, removing any bottleneck from logging. However, this created friction and lowered the developer experience of using Pino and in-process transports is the most asked feature our user.In the upcoming version 7, we will solve this problem and increase throughput at the same time: we are introducing pino.transport() to start a worker thread that you can use to transfer your logs safely to other destinations, without sacrificing neither performance nor the developer experience.

Workshops on related topic

Node Congress 2023Node Congress 2023
109 min
Node.js Masterclass
Have you ever struggled with designing and structuring your Node.js applications? Building applications that are well organised, testable and extendable is not always easy. It can often turn out to be a lot more complicated than you expect it to be. In this live event Matteo will show you how he builds Node.js applications from scratch. You’ll learn how he approaches application design, and the philosophies that he applies to create modular, maintainable and effective applications.

Level: intermediate
Node Congress 2023Node Congress 2023
63 min
0 to Auth in an Hour Using NodeJS SDK
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
JSNation 2023JSNation 2023
104 min
Build and Deploy a Backend With Fastify & Platformatic
Platformatic allows you to rapidly develop GraphQL and REST APIs with minimal effort. The best part is that it also allows you to unleash the full potential of Node.js and Fastify whenever you need to. You can fully customise a Platformatic application by writing your own additional features and plugins. In the workshop, we’ll cover both our Open Source modules and our Cloud offering:- Platformatic OSS (open-source software) — Tools and libraries for rapidly building robust applications with Node.js ( Platformatic Cloud (currently in beta) — Our hosting platform that includes features such as preview apps, built-in metrics and integration with your Git flow ( 
In this workshop you'll learn how to develop APIs with Fastify and deploy them to the Platformatic Cloud.
JSNation Live 2021JSNation Live 2021
156 min
Building a Hyper Fast Web Server with Deno
Deno 1.9 introduced a new web server API that takes advantage of Hyper, a fast and correct HTTP implementation for Rust. Using this API instead of the std/http implementation increases performance and provides support for HTTP2. In this workshop, learn how to create a web server utilizing Hyper under the hood and boost the performance for your web apps.
React Summit 2022React Summit 2022
164 min
GraphQL - From Zero to Hero in 3 hours
How to build a fullstack GraphQL application (Postgres + NestJs + React) in the shortest time possible.
All beginnings are hard. Even harder than choosing the technology is often developing a suitable architecture. Especially when it comes to GraphQL.
In this workshop, you will get a variety of best practices that you would normally have to work through over a number of projects - all in just three hours.
If you've always wanted to participate in a hackathon to get something up and running in the shortest amount of time - then take an active part in this workshop, and participate in the thought processes of the trainer.
TestJS Summit 2023TestJS Summit 2023
78 min
Mastering Node.js Test Runner
Node.js test runner is modern, fast, and doesn't require additional libraries, but understanding and using it well can be tricky. You will learn how to use Node.js test runner to its full potential. We'll show you how it compares to other tools, how to set it up, and how to run your tests effectively. During the workshop, we'll do exercises to help you get comfortable with filtering, using native assertions, running tests in parallel, using CLI, and more. We'll also talk about working with TypeScript, making custom reports, and code coverage.