Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/josejefferson/nestjs-template
NestJS + TypeORM + PostgreSQL template
https://github.com/josejefferson/nestjs-template
api api-rest authentication backend crud docker eslint javascript jwt nestjs nodejs postgresql prettier rest-api swagger template typeorm typescript
Last synced: 1 day ago
JSON representation
NestJS + TypeORM + PostgreSQL template
- Host: GitHub
- URL: https://github.com/josejefferson/nestjs-template
- Owner: josejefferson
- Created: 2024-05-16T15:17:17.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-01-09T18:04:35.000Z (12 days ago)
- Last Synced: 2025-01-09T18:36:38.729Z (12 days ago)
- Topics: api, api-rest, authentication, backend, crud, docker, eslint, javascript, jwt, nestjs, nodejs, postgresql, prettier, rest-api, swagger, template, typeorm, typescript
- Language: TypeScript
- Homepage:
- Size: 189 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NestJS + TypeORM + PostgreSQL template
By [Jefferson Dantas](https://github.com/josejefferson)
## Technologies
![NestJS](https://img.shields.io/badge/nestjs-%23E0234E.svg?style=for-the-badge&logo=nestjs&logoColor=white)
![TypeORM](https://img.shields.io/badge/typeorm-%23fe0902.svg?style=for-the-badge&logo=typeorm&logoColor=white)
![Postgres](https://img.shields.io/badge/postgres-%23316192.svg?style=for-the-badge&logo=postgresql&logoColor=white)
![Swagger](https://img.shields.io/badge/-Swagger-%23Clojure?style=for-the-badge&logo=swagger&logoColor=white)
![JWT](https://img.shields.io/badge/JWT-black?style=for-the-badge&logo=JSON%20web%20tokens)
![Docker](https://img.shields.io/badge/docker-%230db7ed.svg?style=for-the-badge&logo=docker&logoColor=white)
![TypeScript](https://img.shields.io/badge/typescript-%23007ACC.svg?style=for-the-badge&logo=typescript&logoColor=white)
![Express.js](https://img.shields.io/badge/express.js-%23404d59.svg?style=for-the-badge&logo=express&logoColor=%2361DAFB)
![Prettier](https://img.shields.io/badge/prettier-%23F7B93E.svg?style=for-the-badge&logo=prettier&logoColor=black)
![ESLint](https://img.shields.io/badge/ESLint-4B3263?style=for-the-badge&logo=eslint&logoColor=white)## Features
- API Documentation
- JWT Authentication
- Role Management
- Route Access Control
- CRUD Operations for Routes and Services
- Data Validation
- Secure Headers
- File Uploads
- Database Migrations
- Pagination Support
- Search Filters
- Automatic User Creation## Default User and Password
The Auth Service automatically inserts a user when none exists in the system
**E-mail**: `[email protected]`\
**Password**: `P@ssw0rd`## Default Routes
- `/api` - API Documentation
- `/api/auth/login` - User Login
- `/api/auth/me` - Returns authenticated user data
- `/api/auth/change-password` - Allows users to change their password
- `/api/users/*` - User CRUD Operations## Commands
- `yarn dev` - Run in development mode
- `yarn build` - Prepare files for production
- `yarn start` - Start in production mode
- `yarn migrate:generate` - Generate database migrations
- `yarn migrate:run` - Apply migrations
- `yarn format` - Format code
- `yarn lint` - Perform linting checks
- `yarn test` - Run TypeScript type tests## Environment variables
- `DATABASE_URL` - URL for connecting to the PostgreSQL database
- `JWT_SECRET` - Secret key used for JWT token encryption and decryption