Week 1 — Node.js, Express & NestJS HTTP foundations
Understand the Node runtime and Express request flow before learning the structure Nest adds — then ship Notes P1 as this week’s mini-project.
- 1. Node.js runtime, modules & npmOpen
Nest and Express both run inside Node, so runtime, module, package, and environment behavior still matters after a framework is added.
- 2. Node.js async work & the event loopOpen
HTTP handlers, database calls, password hashing, and file operations are asynchronous. Understanding await, rejection, and blocking work prevents framework code from hiding runtime-level failures.
- 3. Express routing, middleware & errorsOpen
Nest uses Express (or Fastify) as its HTTP platform adapter. Learn the raw request flow first so Nest modules, guards, and pipes map to something concrete.
- 4. Nest architecture & CLIOpen
After Node and Express, map what Nest adds: modules, DI, decorators, and the CLI that scaffolds them. Nest ≠ Next — Nest is this monorepo’s HTTP API and database owner; the React/Next frontend is a client that calls it over HTTP.
- 5. ModulesOpen
Every Nest feature — tickets, auth, health — is a module. AppModule is the root module that assembles the whole app. Read modules before controllers; they tell you what exists.
- 6. Dependency injectionOpen
DI is the hardest Nest concept to fake your way through. Intermediate engineers must reason about tokens, module visibility, scope, and circular graphs — not only “put it in the constructor.”
- 7. DecoratorsOpen
Nest is built almost entirely from decorator metadata: which class is a controller, which method handles which route, which parameter is public/role-gated. This repo defines its own decorators for auth.
- 8. ControllersOpen
Controllers are the HTTP front door of every Nest module. Keep them thin — parsing, delegating, responding — never doing business logic or raw SQL themselves.
- 9. ServicesOpen
TicketsService is this repo’s clearest example: repository injection, a DTO in, a mapped response out, and NotFoundException for missing records.
- 10. Request pipeline (middleware → guards → pipes → handler → filters)Open
This is the single most useful Nest debugging model. Intermediate engineers do not guess — they map a status code to a pipeline stage and open the right file.
- 11. REST API + Postman / curlOpen
Hands-on API practice for the week: hit /health, walk authenticated CRUD routes, and read ValidationPipe / filter errors.
- 12. Notes API — Nest HTTP milestoneOpen
Locks Week 1 Node/Express + Nest HTTP foundations. Study tickets in apps/api, then implement Notes yourself.
End-of-week mini-project · practice only
Notes API — Nest HTTP (P1)
Scaffold Notes CRUD in apps/notes-practice with modules, DI, DTOs, and ValidationPipe.
Definition. Week 1’s mini-project is the auto-validated Notes P1 milestone: a Nest feature module that exposes validated Notes HTTP without requiring Postgres yet for the learning bar — the reference solution may already use TypeORM.
In simpler words. Build the Nest HTTP surface for Notes. Prove it with pnpm course:validate-milestone be-notes-p1.
Deliverables
- NotesModule + controller + injectable service + Create/Update DTOs
- GET list/get, POST, PATCH, DELETE with 400/404 shapes
- ValidationPipe whitelist / forbidNonWhitelisted in main.ts
Acceptance checklist
- [ ] Finish Node.js getting-started + async/event-loop guides (links on prerequisite topics)
- [ ] Skim Express routing + middleware docs before Nest controllers
- [ ] Finish Nest First steps → Controllers → Providers (docs/academy/fe-to-api)
- [ ] Implement in apps/notes-practice (not apps/api tickets)
- [ ] pnpm course:validate-milestone be-notes-p1 is green
- [ ] Open topic be-notes-p1 for the full lesson + Nest doc linksTips
- Study tickets in apps/api as the reference vertical slice — do not add Notes to the product API.
- Official Nest chapters + /resources Nest links come before coding.