Skip to content

Clean architectured, Infrastructure agnostic and Domain Driven designed Typescript application boilerplate.

License

Notifications You must be signed in to change notification settings

thecleanarchitecture/typescript-boilerplate

Repository files navigation

DDD Typescript Boilerplate

Clean architectured, Infrastructure agnostic and Domain Driven designed Typescript application boilerplate.

Status
Test Suites CircleCI
Code Coverage codecov
Security scanner Known Vulnerabilities

codecov

Architecture overview

  • Design principles
    • Domain Driven Design
    • The Clean Architecture
    • Hexagonal Architecture
    • SOLID.
    • Monolithic. Ability to quickly switch to microservice.
  • Language: TypeScript
  • Database: Agnostic, In Memory, Key/Value, NoSQL

Domains

UML classes

Project Structure

.
├── ...
├── src
│   ├── Domains
│   │   ├── Facilities
│   │   │   ├── Data Entity
│   │   │   │   ├── IFacility.js
│   │   │   ├── Data Model
│   │   │   │   ├── Facility.js
│   │   │   ├── Data Repository
│   │   │   │   ├── FacilityMongoDB.js
│   │   │   ├── Use cases
│   │   │
│   │   ├── Agents
│   │   │   ├── Data Entity
│   │   │   │   ├── IAgent.js
│   │   │   ├── Data Model
│   │   │   │   ├── Agent.js
│   │   │   ├── Data Repository
│   │   │   │   ├── AgentMongoDB.js
│   │   │   ├── Use cases
│   │   │
│   │   └── Shifts
│   │       ├── Data Entity
│   │       │   ├── IShift.js
│   │       ├── Data Model
│   │       │   ├── Shift.js
│   │       ├── Data Repository
│   │       │   ├── ShiftMongoDB.js
│   │       ├── Use cases
│   │           ├── getShiftsByFacility.js
│   │           ├── generateReport.js
│   │
│   └── Infrastructure
│       ├── Persistence
│       │   ├── BaseRepo.ts
│       │   ├── InMemory.ts
│       │   ├── Paging.ts
│       │
│       ├── Utils
│
├── tests                   # Test files
│   
└── ...

How to get started

  1. Install Node.js
  2. Run npm i in this repo to install dependencies
  3. Run npm test to run the automated tests