Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jmorbegoso/wish-list-api
Backend API built with NestJS using Domain-Driven Design and Clean Architecture.
https://github.com/jmorbegoso/wish-list-api
access-token authentication clean-architecture ddd docker jest mikroorm mongodb nestjs refresh-token repository-pattern swagger unit-of-work-pattern
Last synced: 2 days ago
JSON representation
Backend API built with NestJS using Domain-Driven Design and Clean Architecture.
- Host: GitHub
- URL: https://github.com/jmorbegoso/wish-list-api
- Owner: JMOrbegoso
- Created: 2021-10-25T21:39:59.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-20T17:34:13.000Z (over 2 years ago)
- Last Synced: 2023-08-12T06:50:06.194Z (over 1 year ago)
- Topics: access-token, authentication, clean-architecture, ddd, docker, jest, mikroorm, mongodb, nestjs, refresh-token, repository-pattern, swagger, unit-of-work-pattern
- Language: TypeScript
- Homepage:
- Size: 1.76 MB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Wish List API ๐
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.
## โจ Features
- Built with TypeScript.
- Domain-Driven Design (DDD):
- Value Objects.
- Entities.
- Aggregates.
- Clean Architecture:
- Domain Layer.
- Application Layer.
- Infrastructure Layer.
- Design Patterns:
- [Repository Pattern](https://blog.jmorbegoso.com/post/repository-pattern/).
- [Unit of Work](https://blog.jmorbegoso.com/post/unit-of-work-pattern/).
- [Static Factory Method Pattern](https://blog.jmorbegoso.com/post/static-factory-method-pattern/).
- Command Query Responsibility Segregation (CQRS).
- ๐บ Presentation:
- NestJS.
- ๐ Persistence:
- MikroORM.
- MongoDB.
- ๐ค Authentication:
- [Passport.js](http://www.passportjs.org/).
- 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:
- [Swagger for NestJS](https://github.com/nestjs/swagger/).## โ Prerequisites
To run this Backend API make sure you have installed all of the following prerequisites on your machine:
- Node.js.
- TypeScript.
- Yarn.
- Docker.## ๐ป Install
```bash
# 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
```## ๐ Running
```bash
# Run in development mode
yarn start# Run in watch mode (development)
yarn start:dev# Run in production mode
yarn start:prod
```## ๐งช Tests
```bash
# Run tests
yarn test# Run test coverage
yarn test:cov# Run tests end to end
yarn test:e2e
```## ๐งโ๐ป Author
**JMOrbegoso**
- Website: [jmorbegoso.com](https://www.jmorbegoso.com)
- Twitter: [@JMOrbegosoDev](https://twitter.com/JMOrbegosoDev/)
- Github: [@JMOrbegoso](https://github.com/JMOrbegoso/)
- LinkedIn: [@jmorbegosodev](https://www.linkedin.com/in/jmorbegosodev/)