Backend REST API built with NestJS and following the principles of Domain-Driven Design and Clean Architecture
Wish List API is a backend REST API where you can publish your wishes, share them, and keep them on track, recording the progress you make, until you fulfill them.
- Built with TypeScript.
- Domain-Driven Design (DDD):
- Value Objects.
- Entities.
- Aggregates.
- Clean Architecture:
- Domain Layer.
- Application Layer.
- Infrastructure Layer.
- Design Patterns:
- Command Query Responsibility Segregation (CQRS).
- 📺 Presentation:
- NestJS.
- 📚 Persistence:
- MikroORM.
- MongoDB.
- 👤 Authentication:
- Passport.js.
- JWT Access Tokens.
- Refresh Tokens.
- Refresh Tokens rotation.
- Refresh Tokens auto-revocation.
- 🛡️ Authorization:
- User Roles.
- Resource Ownership.
- 🧪 Testing:
- Jest.
- Supertest (e2e).
- Coverage Report: 70%.
- 📝 Documentation:
To run this Backend API make sure you have installed all of the following prerequisites on your machine:
- Node.js.
- TypeScript.
- Yarn.
- Docker.
# Environment Variables
cp '.env.example' '.env' # Development
cp '.env.example' '.test.env' # Tests
# Install dependencies
yarn
# Run MongoDB database in Docker 🐋
docker-compose up # Development
docker-compose -f docker-compose.e2e.yml --env-file ./.test.env up # Tests
# Run in development mode
yarn start
# Run in watch mode (development)
yarn start:dev
# Run in production mode
yarn start:prod
# Run tests
yarn test
# Run test coverage
yarn test:cov
# Run tests end to end
yarn test:e2e
JMOrbegoso
- Website: jmorbegoso.com
- Twitter: @JMOrbegosoDev
- Github: @JMOrbegoso
- LinkedIn: @jmorbegosodev