NestJS REST API Boilerplate for Common Projects, Tailored for Seamless Integration with the refine React boilerplate as frontend. for Frontend. However, this API is versatile enough to function independently and can be paired with various frontends such as React, Angular, Flutter, and more.
Detailed quick start guide is available HERE
- Features
- Quick run
- Comfortable development
- Links
- Automatic update of dependencies
- Database utils
- Tests
- Tests in Docker
- Test benchmarking
- Database (typeorm).
- Seeding.
- Config Service (@nestjs/config).
- Mailing (nodemailer).
- Sign in and sign up via email.
- Social sign in (Apple, Facebook, Google, Twitter).
- Admin and User roles.
- I18N (nestjs-i18n).
- File uploads. Support local and Amazon S3 drivers.
- Swagger.
- E2E and units tests.
- Docker.
- CI (Github Actions).
- Logging
git clone --depth 1 https://github.com/poliath/nestjs-poliath-boilerplate.git my-app
cd my-app/
cp env-example .env
docker compose up -dFor check status run
docker compose logsgit clone --depth 1 https://github.com/poliath/nestjs-poliath-boilerplate.git my-app
cd my-app/
cp env-example .envChange DATABASE_HOST=postgres to DATABASE_HOST=localhost
Change MAIL_HOST=maildev to MAIL_HOST=localhost
Run additional container:
docker compose up -d postgres adminer maildevnpm install
npm run migration:run
npm run seed:run
npm run start:dev- Swagger: http://localhost:3000/docs
- Adminer (client for DB): http://localhost:8080
- Maildev: http://localhost:1080
Generate migration
npm run migration:generate -- src/database/migrations/CreateNameTableRun migration
npm run migration:runRevert migration
npm run migration:revertDrop all tables in database
npm run schema:dropRun seed
npm run seed:run# unit tests
npm run test
# e2e tests
npm run test:e2edocker compose -f docker-compose.ci.yaml --env-file env-example -p ci up --build --exit-code-from api && docker compose -p ci rm -svfdocker run --rm jordi/ab -n 100 -c 100 -T application/json -H "Authorization: Bearer USER_TOKEN" -v 2 http://<server_ip>:3000/api/v1/users