• Stars
    star
    159
  • Rank 235,916 (Top 5 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 2 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A project template that follows the clean architecture principles and encourages established practices.

Clean Architecture Template

License: MIT Test Coverage Maintainability Known Vulnerabilities

A Node template that follows the Clean Architecture principles and encourages established practices.

Features

  • TypeScript first
  • Dependency injection via Awilix
  • CQRS (Command Query Responsibility Segregation)
  • High test coverage (unit, integration and functional tests)
  • Automatic error handling
  • Logging
  • Versioned APIs
  • Swagger
  • Prisma ORM

Getting Started

  1. Install the latest Node.js LTS
  2. Install Docker and ensure that it is running
  3. Create .env file cp .env.example .env
  4. Install project dependencies by running npm install
  5. Start Docker (local Postgres instance) docker-compose up -d
  6. Create database npx prisma migrate deploy
  7. Start development server npm start
  8. Navigate to Swagger ( http://localhost:3000/api-docs)

Scripts

Build production bundle

npm run build

Lint project (eslint)

npm run lint

Start development server

npm start

Run all tests

npm test

Run unit tests

npm run test:unit

Run functional tests (API tests)

npm run test:functional

License

This project is licensed with the MIT license.

Credits

The project's inspiration is Jason Taylor's clean architecture template for C#.