Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/henriqueweiand/nestjs-ecommerce
Example to exercise clean architecture with different databases + cache layer + DDD
https://github.com/henriqueweiand/nestjs-ecommerce
cache clean-architecture ddd e2e-tests github-actions jest mongodb mongoose nestjs postgresql prisma unit-testing
Last synced: about 1 month ago
JSON representation
Example to exercise clean architecture with different databases + cache layer + DDD
- Host: GitHub
- URL: https://github.com/henriqueweiand/nestjs-ecommerce
- Owner: henriqueweiand
- Created: 2024-02-22T22:14:18.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-03-20T21:56:23.000Z (9 months ago)
- Last Synced: 2024-03-20T22:51:55.403Z (9 months ago)
- Topics: cache, clean-architecture, ddd, e2e-tests, github-actions, jest, mongodb, mongoose, nestjs, postgresql, prisma, unit-testing
- Language: TypeScript
- Homepage:
- Size: 472 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NestJS e-commerce
Example to exercise clean architecture with different databases + cache layer + DDD.
[![Run E2E Tests](https://github.com/henriqueweiand/nestjs-ecommerce/actions/workflows/run-e2e-tests.yml/badge.svg)](https://github.com/henriqueweiand/nestjs-ecommerce/actions/workflows/run-e2e-tests.yml)
[![Run Unit Tests](https://github.com/henriqueweiand/nestjs-ecommerce/actions/workflows/run-unit-tests.yml/badge.svg)](https://github.com/henriqueweiand/nestjs-ecommerce/actions/workflows/run-unit-tests.yml)blog post about the project -> https://medium.com/nestjs-ninja/mastering-nestjs-unleashing-the-power-of-clean-architecture-and-ddd-in-e-commerce-development-97850131fd87
## Pre requirements
- To use the full project, you will need to have a Stripe dev account;
- Mongo or Postgres dabatase;## Running locally
1. Instal the dependecies
2. copy .env.example to .env'
3. run `docker-compose up -d`, it will create a Mongo instance
4. run `yarn start:dev`
5. Access `http://localhost:3000/api`The default database is set Mongo, but it can be changed inside `app.module.ts`
## API Documentation
Running the solution, access `http://localhost:3000/api`
![Preview](https://github.com/henriqueweiand/nestjs-ecommerce/blob/master/assets/swagger.png)
## To-do
- [x] Product
- [x] User
- [x] Order
- [x] Add Mongo
- [x] Add Postgres
- [x] Add way to switch database easly
- [x] Cache layer
- [x] A few Unit tests
- [x] A few e2e tests
- [x] Stripe integration