Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mohitsingla46/nestjs-auth
A robust authentication module for NestJS applications, featuring user registration, login, and JWT-based authentication. This repository provides a solid foundation for implementing secure and efficient user authentication in NestJS projects.
https://github.com/mohitsingla46/nestjs-auth
authentication nestjs nodejs
Last synced: about 2 months ago
JSON representation
A robust authentication module for NestJS applications, featuring user registration, login, and JWT-based authentication. This repository provides a solid foundation for implementing secure and efficient user authentication in NestJS projects.
- Host: GitHub
- URL: https://github.com/mohitsingla46/nestjs-auth
- Owner: mohitsingla46
- Created: 2024-07-26T14:40:10.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2024-08-07T14:55:27.000Z (5 months ago)
- Last Synced: 2024-08-07T17:57:48.170Z (5 months ago)
- Topics: authentication, nestjs, nodejs
- Language: TypeScript
- Homepage:
- Size: 107 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NestJS Books Project
[![License](https://img.shields.io/github/license/saluki/nestjs-template.svg)](https://github.com/saluki/nestjs-template/blob/master/LICENSE)
A NestJS project demonstrating JWT authentication, role-based access control, and API documentation using Swagger.
## 1. Getting started
### 1.1 Requirements
Before starting, make sure you have at least these components on your workstation:
- An up-to-date release of [NodeJS](https://nodejs.org/) such as 20.x and NPM
### 1.2 Project configuration
Start by cloning this project on your workstation.
``` sh
git clone [email protected]:mmohitssingla/books.git
```The next thing will be to install all the dependencies of the project.
```sh
cd ./books
npm install
```Once the dependencies are installed, you can now configure your project by creating a new `.env` file containing the environment variables used for development.
```
cp .env.example .env
```Define a `JWT_SECRET` to sign the JWT tokens and `MONGODB_URI` to connect to MongoDB database.
Now you need to seed the database using the following command.
```
npm run seed
```### 1.3 Launch and discover
You are now ready to launch the NestJS application using the command below.
```sh
# Launch the development server
npm run start:dev
```You can now head to `http://localhost:3000/api` and see your API Swagger docs.
## 2. Project goals
The goal of this project is to provide a clean and up-to-date "starter pack" for REST API projects that are built with NestJS.
## 3. Contributing
Feel free to suggest an improvement, report a bug, or ask something.