- Created package.json with TypeScript configuration
- Installed dependencies: express, typescript, ts-node, vitest, supertest, uuid
- Created tsconfig.json with proper settings
- Created basic project structure (src/, tests/)
- Created Todo type/interface (src/types.ts)
- Implemented in-memory store (src/store.ts)
- Built validation functions (src/validation.ts)
- Implemented all CRUD endpoints (src/routes.ts)
- GET /todos - List all todos
- GET /todos/:id - Get a single todo
- POST /todos - Create a new todo
- PUT /todos/:id - Update a todo
- DELETE /todos/:id - Delete a todo
- Added error handling middleware (src/app.ts)
- Created main entry point (src/index.ts)
- Set up Vitest test framework
- Wrote validation unit tests (15 tests)
- Wrote API integration tests (15 tests)
- All 30 tests pass
All endpoints are implemented and working:
- All 5 endpoints functional
- Input validation with proper error messages
- All 30 tests pass
- Project runs with
npm run dev