Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nedcloarbr/nestjs-fastify-prisma-otel-boilerplate
π NestJS cutom starter boilerplate
https://github.com/nedcloarbr/nestjs-fastify-prisma-otel-boilerplate
biomejs boilerplate docker fastify nestjs swagger template vitest
Last synced: about 16 hours ago
JSON representation
π NestJS cutom starter boilerplate
- Host: GitHub
- URL: https://github.com/nedcloarbr/nestjs-fastify-prisma-otel-boilerplate
- Owner: NedcloarBR
- License: mit
- Created: 2024-07-08T21:52:22.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2024-12-21T23:19:44.000Z (5 days ago)
- Last Synced: 2024-12-22T00:18:22.249Z (5 days ago)
- Topics: biomejs, boilerplate, docker, fastify, nestjs, swagger, template, vitest
- Language: TypeScript
- Homepage:
- Size: 1.92 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest
A progressive Node.js framework for building efficient and scalable server-side applications.
## Description
[Nest](https://github.com/nestjs/nest) framework TypeScript custom starter boilerplate repository.
### Changes
- [`Fastify`](https://fastify.dev/) instead of [Express](https://expressjs.com/)
- [`@nestjs/config`](https://docs.nestjs.com/techniques/configuration) Module initialized
- [`nestjs-prisma`](https://nestjs-prisma.dev/) Module initialized
- `class-validator`, `class-transformer` and `ValidationPipe` [configured](https://docs.nestjs.com/techniques/validation)
- [`BiomeJS`](https://biomejs.dev) configured with `@nedcloarbr/biome-config` instead of [ESLint](https://eslint.org/) and [Prettier](https://prettier.io/)
- [`@nestjs/swagger`](https://docs.nestjs.com/openapi/introduction) Configured
- [`@nestjs/terminus`](https://docs.nestjs.com/recipes/terminus) Health checks for `api` and `prisma`
- [`Vitest`](https://vitest.dev/) with Vitest UI and coverage-v8 instead of [Jest](https://jestjs.io/)
- [`nestjs-otel`](https://github.com/pragmaticivan/nestjs-otel)/[`Open Temeletry`](https://github.com/pragmaticivan/nestjs-otel-prom-grafana-tempo) Pre-configured
- [`Docker`](https://www.docker.com/) compose file## Installation
```bash
# install packages
$ yarn install# initialize prisma client and sync with database
$ yarn prisma migrate dev
```## Running the app
```bash
# development
$ yarn run start# watch mode
$ yarn run start:dev# production mode
$ yarn run start:prod
```## Test
```bash
# unit tests
$ yarn run test# e2e tests
$ yarn run test:e2e# test coverage
$ yarn run test:coverage
```## Using Docker
```bash
# Start container
$ docker compose up -d# View logs
$ docker compose logs -f
```## Viewing Metrics
- Swagger: `http://localhost:9000/docs`
- Grafana: `http://localhost:3000`> [!Warning]
> PORTS THAT CANNOT BE USED IN THIS PROJECT \
> \
> Metrics API(`src/lib/metrics.ts`) \
> `8081` -> OtelSDK \
> \
> Metrics otel-collector(`docker-compose.metrics.yml`) \
> `1888` -> pprof extension \
> `8888` -> Prometheus metrics exposed by the collector \
> `8889` -> Prometheus exporter metrics \
> `13133` -> health_check extension \
> `4317` -> OTLP gRPC receiver \
> `4318` -> OTLP HTTP receiver \
> `55679` -> zpages extension \
> \
> Metrics tempo(`docker-compose.metrics.yml`) \
> `14268` -> jaeger ingest \
> `3200` -> tempo \
> `4317` -> otlp grpc \
> `4318` -> otlp http \
> `9411` -> zipkin \
> \
> Metrics loki(`docker-compose.metrics.yml`) \
> `3100` -> loki \
> \
> Metrics prometheus(`docker-compose.metrics.yml`) \
> `9090` -> prometheus## Support
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
## Stay in touch
- Author
- NestJS [Kamil MyΕliwiec](https://kamilmysliwiec.com)
- Boilerplate [NedcloarBR](https://github.com/NedcloarBR)
- Website
- NestJS [https://nestjs.com](https://nestjs.com/)
- Boilerplate [NedcloarBR](https://github.com/NedcloarBR)
- NestJS [@nestframework](https://twitter.com/nestframework)
- Boilerplate [@BrNedcloar](https://twitter.com/BrNedcloar)## License
Nest is [MIT licensed](LICENSE).