Fullstack CourseLearn by building
Back to week 1

Topic

Notes API — Nest HTTP milestone

Definition

Milestone P1 proves you can scaffold a Nest Notes feature with modules, DI, controllers, services, validated DTOs, and correct HTTP status codes before relying on Postgres.

In simpler words

Build Notes CRUD in apps/notes-practice with ValidationPipe — then run the Week 1 grader.

Locks Week 1 Node/Express + Nest HTTP foundations. Study tickets in apps/api, then implement Notes yourself.

After this you can

  • Register NotesModule with controller + injectable service
  • Reject bad bodies with ValidationPipe (whitelist / forbidNonWhitelisted)
  • Prove create/list/get/update/delete shapes via the milestone command

How to work this milestone

Definition

A milestone is an auto-checked Notes API stage in apps/notes-practice: read the official Nest chapter, inspect the monorepo reference, implement the stage, then run the grader.

In simpler words

Literacy quiz (≥80%) still matters. The milestone command proves you can ship the week’s code.

Official tutorial order: docs/academy/fe-to-api/README.md (Week 1 — Fundamentals).

Official docs: Nest Controllers + Providers — https://docs.nestjs.com/controllers

Repo reference (read-only teaching slice): apps/api/src/modules/tickets/tickets.controller.ts, tickets.service.ts, tickets.dto.ts, main.ts ValidationPipe

Supplemental tutorials: /resources → NestJS docs + GeeksforGeeks NestJS tutorial

Implement in apps/notes-practice, then run: pnpm course:validate-milestone be-notes-p1

On green, the CLI posts POST /course/milestones/:id/complete (cookie session) so progress saves with passedVia=milestone.

Acceptance checklist

- [ ] Module registers controller + service (constructor injection)
- [ ] DTOs reject unknown fields (whitelist / forbidNonWhitelisted)
- [ ] Graded structure for CRUD + ValidationPipe present
- [ ] pnpm course:validate-milestone be-notes-p1 is green

The grader encodes these checks; unchecked boxes mean the milestone is not done.

Deliverables

Definition

Deliverables are the concrete Nest files and behaviors this stage must produce.

In simpler words

Ship the smallest vertical slice that makes the grader green — not a redesign of the monorepo.

NotesModule, NotesController, NotesService, CreateNoteDto / UpdateNoteDto

GET list + GET by id + POST + PATCH + DELETE

400 on invalid bodies; 404 on unknown id

Keep in mind

  • Finish the Nest First steps → Controllers → Providers chapters before coding.
  • Prefer one Notes domain grown across weeks over four disconnected toys.

Test

Check your understanding

At least 10 questions — mix of concept, syntax, practical, and logic. Score ≥ 80% (enforced by the API) to save progress.

Checking your session…

10 questions · concept 3 · syntax 3 · practical 2 · logic 2

Concept1. Hands-on: which statement is correct about Notes P1 Nest HTTP milestone?
Syntax2. Hands-on: which implementation matches proving P1?
Practical3. Hands-on scenario for Notes P1 Nest HTTP milestone — what should you do?
Logic4. Hands-on: which reasoning about proving P1 holds up in production?
Concept5. Hands-on: which statement is correct about Notes P1 Nest HTTP milestone?
Syntax6. Hands-on: which implementation matches proving P1?
Practical7. Hands-on scenario for Notes P1 Nest HTTP milestone — what should you do?
Logic8. Hands-on: which reasoning about proving P1 holds up in production?
Concept9. Hands-on: which statement is correct about Notes P1 Nest HTTP milestone?
Syntax10. Hands-on: which implementation matches proving P1?