NestJS + Fastify + Prisma + PostgreSQL + Swagger REST API boilerplate.
- Requirements
- Installation
- Running Docker
- Seeding the Database
- Running the app
- Testing
- Future Improvements
- Docker Desktop (or similar) with support for docker-compose
- NodeJS v20
$ npm install
# docker full solution -> will install the app dependencies and run it in watch mode
$ docker compose up -d
# database only
$ docker compose up -d postgres
$ npx prisma db seed
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
-
Improve API configurtion and security
-
Take leverage of the framework's builtin modules
-
Add Helmet security headers
-
Add Cross-site request forgery security
-
Add Rate Limiting
-
Add Cache
-
Add Configuration
-
Add Healthchecks (replace current hard-coded implementation)
-
Add Documentation for devs
-
Implement HTTPS
-
Implement Authentication and Authorization with Auth Guards. Move them to an Auth module
-
Implement better Exception Filters
-
-
Database
- Manage dotenv files per environment
- Improve security of the database