https://github.com/zhuravlevma/nestjs-active-record
Active Record for nest.js with layered architecture ✍️
https://github.com/zhuravlevma/nestjs-active-record
active-record ddd ddd-example design-patterns example-project layered-architecture nestjs typescript
Last synced: 7 months ago
JSON representation
Active Record for nest.js with layered architecture ✍️
- Host: GitHub
- URL: https://github.com/zhuravlevma/nestjs-active-record
- Owner: zhuravlevma
- License: mit
- Created: 2023-04-21T13:38:07.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-22T15:03:16.000Z (over 2 years ago)
- Last Synced: 2025-01-15T07:36:18.964Z (9 months ago)
- Topics: active-record, ddd, ddd-example, design-patterns, example-project, layered-architecture, nestjs, typescript
- Language: TypeScript
- Homepage: https://github.com/zhuravlevma/nestjs-active-record#schema
- Size: 445 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Description
This is an example that was inspired by Vlad Kononov's book **[Learning DDD](https://learning.oreilly.com/library/view/learning-domain-driven-design/9781098100124/)**. This is an attempt to make a small piece with a layered architecture and Active Recording.
## Schema
```mermaidflowchart TD
subgraph module1[module]
subgraph web[web]
controllers1(controllers) -- uses -->dtos1(dtos)
end
controllers1 -- uses --> services1(service use case layer)
endsubgraph module2[module]
subgraph web2[web]
controllers2(controllers) -- uses -->dtos2(dtos)
end
controllers2 -- uses --> services2(service use case layer)
endservices1 -- uses --> respoitory1(repositories dal)
services1 -- uses --> model1(models with domain logic)
respoitory1 -- uses --> model1services2 -- uses --> respoitory2(repositories dal)
respoitory2 -- uses --> model2
services2 -- uses --> model2(models with domain logic)
```## Installation
```bash
$ npm install
```## Running the app
```bash
# development
$ npm run start# watch mode
$ npm run start:dev# production mode
$ npm run start:prod
```## Test
```bash
# unit tests
$ npm run test# e2e tests
$ npm run test:e2e# test coverage
$ npm run test:cov
```