Skip to content

Clean architecture, included unit tests, e2e test, etc.

Notifications You must be signed in to change notification settings

kidp2h/clean-architecture

Repository files navigation

Clean Architecture With NestJS

Information

CI codecov

Description

This repo implemented clean architecture with unit test, e2e test, ci, etc. You can use it as a template

Besides, this still implemented SOLID principle

Clean architecture Clean architecture

Some docs maybe useful (Updating ...)

Example 1 I implemented this architecture base on this book Book Bob Martin

In Progress

  • Add prisma database, so we can easily between typeorm to prisma and vice versa without change code or business layer
  • Add Dockerfile
  • Apply some patterns and more example SOLID
  • Add repo frontend (Next.JS), which will apply clean architecture (maybe)

Installation

$ pnpm install
$ cp .env.development.example .env.development
$ pnpm run docker:up

Running the app

# development
$ pnpm run start

# watch mode
$ pnpm run start:dev

# production mode
$ pnpm run start:prod

Test

# unit tests
$ pnpm run test

# e2e tests
$ pnpm run test:e2e

# test coverage
$ pnpm run test:cov