Skip to content

J-Hoplin/NestJS-Prisma-Boilerplate

Repository files navigation

Sentry Init

  • Invoke initializeSentry from app.config.ts

    async function bootstrap() {
      const app = await NestFactory.create(AppModule, {
        bufferLogs: true,
      });
      initializeSentry(app)
    
      ...
    }
  • You need to set SENTRY_DSN from .env file.

  • Sentry capture already supported by template exception filter

  • This template will set error code as Sentry Error name. If Unknown given, It'll set error with this format: Unknown: (error message) img

TODO Left

Start

yarn install

yarn prepare

yarn start

Supported Repository Pattern

  • Kysley -> For Type-Safe Raw Query
  • Prisma

Application

  • Nest.js Terminus integration
  • Common library(Nest.js library)
    • S3
    • SQS
    • Localstack
  • Global Exception Filter
    • Error code definition
  • Global Response Interceptor

Test code

  • Test code boilerplate
    • E2E test code boilerplate
    • Unit test code boilerplate
    • K6 stress test code boilerplate
  • Utilities for test code
    • testing-container utility
    • Mocking utility

CI/CD

  • Github Actions base script
  • Elastic Beanstalk boiler command and directories(Follos EB standard)