https://github.com/richardhosler/nestjs-nextjs-authentication-boilerplate
A full-stack authentication system built with NestJS (backend) and Next.js (frontend), featuring secure user authentication and authorization.
https://github.com/richardhosler/nestjs-nextjs-authentication-boilerplate
jwt-authentication nestjs nextjs orval passport postgres swagger tailwindcss typescript zod
Last synced: 2 months ago
JSON representation
A full-stack authentication system built with NestJS (backend) and Next.js (frontend), featuring secure user authentication and authorization.
- Host: GitHub
- URL: https://github.com/richardhosler/nestjs-nextjs-authentication-boilerplate
- Owner: richardhosler
- Created: 2024-11-15T14:06:47.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-11-24T13:01:40.000Z (6 months ago)
- Last Synced: 2025-01-25T21:26:13.927Z (4 months ago)
- Topics: jwt-authentication, nestjs, nextjs, orval, passport, postgres, swagger, tailwindcss, typescript, zod
- Language: TypeScript
- Homepage:
- Size: 374 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NestJS NextJS Authentication Boilerplate
      
A full-stack authentication system built with NestJS (backend) and Next.js (frontend), featuring secure user authentication and authorization.
## Features
- 🔐 Secure JWT-based authentication
- 👤 User management system
- 🔄 TypeORM for database management
- 📝 API documentation with Swagger
- 🎨 Modern UI with Tailwind CSS
- ✨ Type-safe API calls using Orval### Security
This application implements several security best practices:
- Password hashing using bcrypt
- JWT-based authentication
- TypeORM for SQL injection prevention
- Input validation using class-validator
- Secure HTTP-only cookies## Screenshots


## Tech Stack
### Backend (RESTful API)
- NestJS Framework
- PostgreSQL with TypeORM
- Passport.js for authentication
- JWT for token management
- Class-validator for DTO validation
- Swagger for API documentation
- Orval for generated API hooks### Frontend (App)
- Next.js Framework
- TailwindCSS for styling
- React Query for API interaction
- Zod for form validation
- React hook form for form handling## Prerequisites
- [Node.js](https://nodejs.org)
- [PostgreSQL](https://postgresql.org)
- [Yarn package manager](https://yarnpkg.com)
- [TurboRepo](https://turbo.build)## Getting Started
1. **Install dependencies**
```
yarn install
```2. **Set up environment variables**
```
cp .env.example .env
```3. **Start Application**
```
yarn turbo dev
```## Documentation
The API documentation can be found at http://\[your_url]/docs provided by Swagger