Capstone project for Building APIs with Node.js
Ship the partner ordering API
Lagoon Digital starts building the next Partner app release in two weeks and needs a real API to build against. Build the ordering API that lets Mangrove's partner corner shops browse their price list, place and track orders, cancel an order before it is picked, and download invoices, in a public GitHub repository with NestJS, PostgreSQL and Prisma. Shop owners like Ravi use it on patchy mobile data, so the app retries, and Mangrove's sales reps place orders for the shops assigned to them. Every error must use one shape, every input must be validated, a shop must never see another shop's orders, the same order sent twice must create one order, and invoice PDFs must be made in a background job. Hand Lagoon Digital an OpenAPI document and a short change policy they can trust.
What you hand in
- A NestJS API with at least eight endpoints over shops, price lists, orders, order lines and invoices, with Prisma migrations and seed data
- Authentication with per-shop and sales-rep permissions, rate limits, and an Idempotency-Key on order creation
- A background job that renders invoice PDFs, with retries and a failed-job alert
- Unit and integration tests that run against a real PostgreSQL in GitHub Actions
- An OpenAPI document, a README for Lagoon Digital and a short changelog and deprecation policy
Check your work
Tick each item when your project meets it. Be strict: this is the rubric the reviewer uses.
- Every error response uses one problem-details shape with a stable type, and status codes follow the lessons' rules (400, 401, 403 or 404, 409, 422, 429)
- Every request body, query and path parameter is validated, and unknown fields are rejected
- A shop can never read or change another shop's orders, and an integration test proves it for both a shop user and an unassigned sales rep
- Placing the same order twice with the same Idempotency-Key creates one order and replays the first response, proven by a test
- Order placement runs in one transaction, list endpoints use cursor pagination with a limit cap, and the order list has no N+1 queries
- Invoice PDFs are made in a background job with retries and backoff, and the handler is safe to run twice
- Tests run in CI against a real PostgreSQL, and the committed OpenAPI file is checked for breaking changes
- The README and change policy tell Lagoon Digital how to authenticate, page, retry and learn about deprecations
0 of 8 checked
Model answer
The model answer opens once your capstone passes the review, so you can compare your work with an outline of a strong submission.
Hand in your capstone
Your links are checked automatically, then the work is scored against the rubric above, item by item, with comments. A pass counts toward the course certificate and shows on your profile.
Loading…