A simple and extensible Todo backend playground built with NestJS, MongoDB (Mongoose), and TypeScript. This project demonstrates modular architecture, DTO validation, custom error handling, and includes ready-to-use Docker and test setups.
- Modular structure with NestJS
- Authentication (JWT tokens)
MongoDB
integration using Mongoose- User registration with unique nickname validation
- DTO validation with class-validator
- Custom error and exception handling
- Ready-to-use
integration tests
(Jest & Supertest) Docker support
for easy development and deployment
npm install
$ cd docker
$ docker compose up
$ cd docker
$ docker compose down
test
├── api
│ ├── auth
│ │ └── sign-in.test.ts
│ └── user
│ └── create-user.test.ts
├── common
│ ├── auth.helper.ts
│ ├── db
│ │ ├── index.ts
│ │ ├── mongo.helper.ts
│ │ └── redis.helper.ts
│ ├── helper.ts
│ ├── index.ts
│ └── user.helper.ts
├── jest-e2e.json
├── test-config.ts
└── test-setup.ts
npm run test
Create a user:
POST /user
Content-Type: application/json
{
"nickname": "your_nickname",
"fullname": "Your Name",
"password": "your_password"
}
src/
- Main application source codetest/
- Unit and e2e testsdocker/
- Docker and Docker Compose files
Pull requests and suggestions are welcome!
This project is for educational purposes and is currently unlicensed.