Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/solufyapp/nestjs-template

NestJS Template with PNPM, Fastify, Docker, Prisma, SWC, BiomeJS and Configify.
https://github.com/solufyapp/nestjs-template

biomejs configify docker fastify nestjs pnpm prisma swc typescript

Last synced: 5 days ago
JSON representation

NestJS Template with PNPM, Fastify, Docker, Prisma, SWC, BiomeJS and Configify.

Awesome Lists containing this project

README

        


Nest Logo



NestJS Template



Pnpm
Fastify
Docker
Prisma
Swc
Biome
Configify

## Features

- [PNPM](https://pnpm.io/): faster dependencies management than NPM.
- [Fastify](https://fastify.dev/): faster http requests handling than Express.
- [Docker](https://www.docker.com/): already dockerized (plus a docker compose to run PostgreSQL locally).
- [Prisma](https://www.prisma.io/): type-safety database ORM. (defaults to PostgreSQL)
- [SWC](https://swc.rs/): faster compiling times than Webpack.
- [BiomeJS](https://biomejs.dev/): faster linting and formatting than ESLint and Prettier.
- [Configify](https://github.com/it-gorillaz/configify): easy env variables management for NestJS. (compatible with class-validator)
- [Husky](https://typicode.github.io/husky/): fast native git hooks.
- Premade CI workflow for Github.
- Using ESM modules.

## Requirements

- [Node.js](https://nodejs.org/) (v18+)
- [Docker](https://www.docker.com/)
- [PNPM](https://pnpm.io/)

## Installation

1. **Clone the repository:**

```bash
git clone https://github.com/solufyapp/nestjs-template.git
cd nestjs-template
```

2. **Set up environment variables:**

Copy the `.env.example` file to `.env`.

```bash
cp .env.example .env
```

Edit the `.env` file with your own configuration.

3. **Install dependencies:**

```bash
pnpm install
```

## Running the app

```bash
# development
pnpm start

# watch mode
pnpm start:dev

# production mode
pnpm start:prod
```

## Linting and formatting

```bash
# format only
pnpm format

# lint, format and organize imports
pnpm lint

# lint without fixing
pnpm lint:ci

# lint staged files only
pnpm lint:staged
```

## Contributing

Feel free to contribute with suggestions or bug reports at the [template reposity](https://github.com/solufyapp/nestjs-template).

## Authors

- [@joaotonaco](https://github.com/joaotonaco)