REST API Todo Service
A RESTful todo API with CRUD operations, user authentication, task categorization, pagination, and filtering. Includes input validation, error handling, API documentation, and automated tests with ...
Target user
Backend developers learning REST API design
Problem
Backend developers need a well-structured REST API example with auth, validation, pagination, and proper error handling to learn best practices.
Requirements
- CRUD endpoints for todo items
- User authentication with JWT
- Input validation and error handling
- Pagination and filtering support
- API documentation with OpenAPI
Core technologies
Express, Prisma, TypeScript
Completion criteria
A fully functional REST API with auth, validation, pagination, error handling, and documentation.
Optional extensions
- Add rate limiting
- Implement soft deletes
- Add audit logging
- Support webhooks
Project phases
Phase 1: Phase 1: Core CRUD
Tasks: Set up Express with Prisma, Define todo data model and migrations, Implement CRUD endpoints, Add input validation
Phase 2: Phase 2: Auth and Querying
Tasks: Implement JWT authentication, Add user-scoped todos, Build pagination and filtering, Create error handling middleware
Phase 3: Phase 3: Documentation and Testing
Tasks: Generate OpenAPI documentation, Write automated API tests, Add request logging, Create API README