by @techhive.IO
Nest Js Authentication and User Management Starter is a starter pack for seamlessly kick-starting your API development with the industry's and TechHive.IO's best practices and recommendations.
- Live Demo
- Getting Started
- Useful Commands
- Goals
- Features
- Learning Materials
- Bugs
- Contributors
- License
git clone --depth 1 https://github.com/techhiveIO/nest-authentication-and-user-management-starter
cd my-project
rm -r .git
cp .env.example .env
npm run dev
Make sure you enter the correct values in your .env
file:
MONGODB_CONNECTION_STRING=<your mongodb uri>
MONGODB_CONNECTION_TEST_STRING=<test mongo uri>
NODEMAILER_EMAIL=<your email>
NODEMAILER_PASSWORD=<your email password/auth key>
HOST=<host> # defaults to http://localhost:3000/
PORT=<port> # defaults to 3000
JWT_KEY=<your secret key> # defaults to secretKey
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
start:dev
- start application in development modestart:debug
- start application in development and debug modeformat
- runs prettier to format whole code base (.ts
and.css
)lint
- lints project using eslint,start
- Run Nest applicationbuild
- Build applicationstart:prod
- Start application in production
Developers often want a good starting point when implementing a new API. Common tasks such as authentication and user management are re-implemented on a regualar basis. With this starter kit, the developer directly bootstrap the development of their new API, or use it as a inspiration to build any powerful API server using Nest Js.
- JWT authentication with email verification out of the box
- Powerful Nest API out of the box
- Built-in powerful authentication and user management APIs
- User invitation
- MongoDB and Mongoose Integration
- Optimized for speed and scalability
- Postman file included for easy testing
- HMR integration
- Security integration out of the box
- Nest Js 7+
- Typescript
- Node JS
- MongoDB and Mongoose
- Nodemailer
The project implements some of nodejs security techniques :
- Helmet : can help protect your app from some well-known web vulnerabilities by setting HTTP headers appropriately
- Express Rate Limit: to protect your applications from brute-force attacks
- In the main.ts you can set a limit of requests in a time window (default is 100 requests in 15 minutes for all endpoints, and 3 requests in a 1 hour for sign up endpoint)
Please make sure you fill in the appropriate fields when submitting an issue. Our team will try to resolve it as soon as possible.
Want to start contributing to open source with the Nest Authentication and User Management Starter ?
Leave your mark and join the growing team of contributors!
Get started by checking out list of open issues and reading Contributor Guide
Abdul Rahman Zantout 💻 📖 |
Nest Js Authentication and User Management Starter Kit is © 2020 TechHive.IO LLC . It is distributed under the Creative Commons Attribution License.
The names and logos for TechHive.IO LLC are trademarks of TechHive.IO LLC.