A Node template that follows the Clean Architecture principles and encourages established practices.
- TypeScript first
- Dependency injection via Awilix
- CQRS (Command Query Responsibility Segregation)
- Automatic API documentation via Swagger
- Built with scalability and performance in mind by using Fastify (see benchmarks)
- Built in logging with Pino
- Comprehensive testing including unit and functional tests
- Prisma ORM integration
- Install the latest Node.js LTS
- Install Docker and ensure that it is running
- Create .env file
cp .env.example .env
- Install project dependencies by running
npm install
- Start Docker (local Postgres instance)
docker-compose up -d
- Create database
npx prisma migrate deploy
- Start development server
npm run dev
- Navigate to Swagger (http://localhost:3000/api-docs)
Build production bundle
npm run build
Lint project (eslint)
npm run lint
Start development server
npm run dev
Run all tests
npm test
Run unit tests
npm run test:unit
Run functional tests (API tests)
npm run test:functional
This project is licensed with the MIT license.
The project's inspiration is Jason Taylor's clean architecture template for C#.