TaskFlow Backend Documentation
TaskFlow is a deliberately practice-oriented TypeScript REST API for learning how a production-style backend is assembled. It combines Express, MongoDB, Mongoose, authentication, authorization, email delivery, Redis-backed jobs, validation, security middleware, logging, and API documentation.
This handbook is written as a learning guide and a future troubleshooting reference. It documents both the intended design and important limitations that are currently present in the codebase.
Start here
- Learning path - a recommended order for studying the project.
- Getting started - local setup and useful commands.
- Architecture - request flow, layers, and repository layout.
- API guide - routes, authentication, and response conventions.
- Data and persistence - MongoDB, Mongoose models, and transactions.
- Authentication and security - passwords, JWTs, cookies, and authorization.
- Queues and external services - BullMQ, Redis, SMTP, Resend, and Swagger.
- Operations and troubleshooting - configuration, logs, Docker, and known issues.
- Future work - backlog and production hardening ideas.
Project status
Implemented areas include registration, login, refresh-token infrastructure, authenticated tasks, workspace creation and membership checks, owner-only invitations, email templates/providers, Swagger UI, Redis/BullMQ scaffolding, and operational logging.
This is a learning project, not a production-ready deployment. Read the known issues sections before relying on any behavior, especially refresh-token validation and rotation, request validation, JWT payload typing, and environment requirements.
Source of truth
The source code and OpenAPI comments are authoritative. These documents explain the concepts and current design, but should be updated when routes or infrastructure change. Swagger UI is available at /docs when the application is running.