Skip to content

henriqueweiand/nestjs-ecommerce

Repository files navigation

NestJS e-commerce

Example to exercise clean architecture with different databases + cache layer + DDD.

Run E2E Tests Run Unit Tests

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

To-do

  • Product
  • User
  • Order
  • Add Mongo
  • Add Postgres
  • Add way to switch database easly
  • Cache layer
  • A few Unit tests
  • A few e2e tests
  • Stripe integration