Node.js Foundations
Node.js Foundations is the sixth course in the JavaScript Development Track. You already know how to build frontend SPAs. Now you will build the backend that powers them — and connect the two into a complete, deployed full-stack application.
Every concept in this course is applied directly to Bulletin — a community board where users post topics, comment, and upvote — with a Node.js + Express + SQLite API deployed to Railway and a React frontend deployed to GitHub Pages.
What you will learn
Section titled “What you will learn”Part 1 — The Backend (M01–M07):
- Node.js fundamentals — the event loop, non-blocking I/O, running scripts, and the REPL
- The runtime — CommonJS vs ES Modules,
fs,path,process, and environment variables - Express — servers, routing, HTTP methods, route parameters, and the request/response objects
- Middleware — the middleware pattern, body parsing, CORS, custom middleware, and error handling
- SQLite — relational database concepts, schema design, and CRUD with
better-sqlite3 - Authentication — bcrypt password hashing, JSON Web Tokens, auth middleware, Helmet, and rate limiting
- Bulletin API — users, posts, comments, and upvote endpoints deployed to Railway
Part 2 — The Frontend (M08–M12):
- API integration — axios, centralized API clients, and loading/error/success states
- Auth UI — JWT storage, Auth Context, register/login forms, protected routes, and logout
- The feed — fetching posts, creating and deleting posts, post detail, and optimistic updates
- Polish — comments, user profiles, upvoting, search/filter, and error boundaries
- Deployment — wiring the React frontend to the Railway API and deploying to GitHub Pages
Prerequisites
Section titled “Prerequisites”This course assumes you have completed TypeScript Foundations and React Foundations. You should be comfortable with TypeScript, React hooks, useState/useEffect, Context, and React Router. No prior Node.js or backend experience is assumed.
The Bulletin project
Section titled “The Bulletin project”All twelve modules build the same real application — Bulletin, a community board with posts, comments, upvotes, and user accounts. You build the backend API first, deploy it to Railway, then build the React frontend and deploy it to GitHub Pages.
The finished app:
- Lets users register and log in with a JWT-based auth system
- Shows a feed of posts sorted by newest or most upvoted
- Lets authenticated users create and delete their own posts
- Lets users comment on posts
- Shows author profile pages with post history
- Persists all data to a real SQLite database on the server
Modules
Section titled “Modules”01 — Getting Started with Node.js
Section titled “01 — Getting Started with Node.js”- What Is Node.js
- The Event Loop and Non-Blocking I/O
- Your First Node.js Script and the REPL
- Node.js and TypeScript Setup
- npm and package.json
- Module Recap
02 — npm, Modules, and the Runtime
Section titled “02 — npm, Modules, and the Runtime”- CommonJS Modules
- ES Modules in Node.js
- The fs Module
- path and process
- Environment Variables and dotenv
- Module Recap
03 — Express and HTTP
Section titled “03 — Express and HTTP”- What Is Express
- Creating a Server and Handling Requests
- Routing and HTTP Methods
- Route Parameters and Query Strings
- Request and Response in Depth
- Module Recap
04 — Middleware and API Structure
Section titled “04 — Middleware and API Structure”- What Is Middleware
- Built-in and Third-Party Middleware
- Writing Custom Middleware
- Router and Controller Organization
- Error Handling Middleware
- Module Recap
05 — SQLite and Data Persistence
Section titled “05 — SQLite and Data Persistence”- Relational Databases and SQL Fundamentals
- Setting Up SQLite with better-sqlite3
- Schema Design and Migrations
- Reading Data with SELECT
- Writing Data with INSERT, UPDATE, DELETE
- Module Recap
06 — Authentication and Security
Section titled “06 — Authentication and Security”- Authentication vs Authorization
- Hashing Passwords with bcrypt
- JSON Web Tokens
- Authentication Middleware
- CORS, Helmet, and Rate Limiting
- Module Recap
07 — Bulletin API Build
Section titled “07 — Bulletin API Build”- Planning the Bulletin Data Model
- User Registration and Login Endpoints
- Posts Endpoints
- Comments Endpoints
- Deploying the API to Railway
- Module Recap
08 — Connecting React to an API
Section titled “08 — Connecting React to an API”- The Client-Server Mental Model
- Fetch and axios in React
- API Client Organization
- Loading, Error, and Success States
- React Router for Multi-Page Apps
- Module Recap
09 — Auth in the Frontend
Section titled “09 — Auth in the Frontend”- Storing JWTs in the Browser
- Auth Context and useAuth Hook
- Register and Login Forms
- Protected Routes
- Logout and Token Expiry
- Module Recap
10 — The Feed and Posts
Section titled “10 — The Feed and Posts”- Fetching and Displaying the Post Feed
- Creating a New Post
- Post Detail Page
- Deleting Your Own Post
- Optimistic Updates
- Module Recap
11 — Comments, Profiles, and Polish
Section titled “11 — Comments, Profiles, and Polish”- Adding Comments
- User Profile Pages
- Upvotes on the Detail Page
- Search and Filter
- Error Screens and Empty States
- Module Recap