Documentation Index
Fetch the complete documentation index at: https://resources.devweekends.com/llms.txt
Use this file to discover all available pages before exploring further.
Capstone Project: Task Management API
In this final chapter, we will build a complete, production-ready Task Management API that combines all the concepts from this course. This is not a toy project — it follows the same architecture, patterns, and practices that professional teams use in production. Treat this as a reference implementation you can adapt for your own applications, and as a portfolio piece that demonstrates real-world Node.js proficiency.Project Overview
We’re building a Task Management API with the following features:- User authentication (register, login, logout)
- CRUD operations for tasks
- Task categories and tags
- Task assignment between users
- Real-time notifications
- File attachments
- Search and filtering
- Rate limiting and security
Tech Stack
| Layer | Technology |
|---|---|
| Runtime | Node.js 20+ |
| Framework | Express.js |
| Language | TypeScript |
| Database | PostgreSQL |
| ORM | Prisma |
| Cache | Redis |
| Auth | JWT + bcrypt |
| Validation | Zod |
| Testing | Jest + Supertest |
| Documentation | Swagger/OpenAPI |
Project Structure
Step 1: Initial Setup
Each dependency below earns its place. No bloated starter templates — only what this project actually uses.Step 2: Database Schema
Step 3: Environment Configuration
This is one of the most important files in the entire project. It validates ALL required environment variables at startup using Zod. If any variable is missing or malformed, the app crashes immediately with a clear error message — far better than discovering a missingJWT_SECRET at 2 AM when the first user tries to log in.
Step 4: Authentication Service
Step 5: Task Service
Step 6: Controllers
Step 7: Routes and Middleware
Step 8: Application Entry
Step 9: Docker Setup
This Dockerfile uses a multi-stage build — the first stage (builder) installs all dependencies and compiles TypeScript, then the second stage (production) copies only the compiled output and production dependencies. This keeps your production image small and free of build tools, TypeScript source, and devDependencies.
Step 10: Testing
Summary
Congratulations — you have built a production-ready Task Management API that demonstrates:- TypeScript for type safety
- Prisma for database management
- JWT authentication with refresh tokens
- Redis caching
- Zod validation
- Error handling with custom error classes
- Rate limiting and security headers
- Docker containerization
- Testing with Jest and Supertest
Next Steps
Once the core API is working, here are high-value extensions ordered by learning impact:- Add real-time notifications with Socket.io — integrates Chapter 16 concepts with this codebase
- Implement file uploads for attachments — applies the Multer security patterns from Chapter 17
- Add email notifications — practice asynchronous processing (send emails in a worker, not in the request handler)
- Deploy to a cloud provider — use the Docker setup from Step 9 on Railway, Render, or AWS ECS
- Set up CI/CD pipeline — run tests automatically on every push with GitHub Actions
- Add API documentation with Swagger — use
swagger-jsdocto generate OpenAPI docs from your route annotations