Gathering detailed insights and metrics for create-express-auth-starter
Gathering detailed insights and metrics for create-express-auth-starter
Gathering detailed insights and metrics for create-express-auth-starter
Gathering detailed insights and metrics for create-express-auth-starter
create-express-auth
Create a new Express.js project with authentication using: npx create-express-auth my-app
get-express-starter
Get production ready express boilerplate with a single command
create-node-spark
CLI tool to scaffold a Node.js backend
create-bodhi-node-boilerplate
Create a Node.js project with basic folder structure and server setup
npm install create-express-auth-starter
Typescript
Module System
Node Version
NPM Version
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
4
Welcome to the Auth System Starter—an open-source, feature-rich authentication boilerplate built with Node.js, Express.js, and MongoDB. This project supports multiple authentication methods (including manual signup/login with JWT and social logins using Passport.js), role-based access control, email verification, and more.
This repository is a perfect starting point for developers looking to implement authentication in their applications quickly. Feel free to contribute, fine-tune, and customize as per your needs!
bcrypt
.Here’s an organized project structure to help you navigate the codebase:
📂 auth-system-starter
├── 📁 config
│ └── db.js # MongoDB connection setup
│ └── passport.js # Passport strategies configuration
├── 📁 controllers
│ └── authController.js # Handles authentication logic
│ └── userController.js # Manages user-related actions
├── 📁 helpers
│ └── sendEmail.js # Email utility for sending emails
├── 📁 middlewares
│ └── authMiddleware.js # Middleware for role-based access and JWT validation
├── 📁 models
│ └── User.js # Mongoose schema for User
│ └── Role.js # Mongoose schema for Role
├── 📁 routes
│ └── authRoutes.js # Routes for authentication and authorization
│ └── userRoutes.js # Routes for user management
├── 📁 utils
│ └── swagger.js # Swagger setup for API documentation
├── .env.example # Environment variables
├── README.md # Project documentation
├── package.json # Project dependencies and scripts
└── index.js # Entry point of the application
Follow these steps to get this project up and running:
1npx create-express-auth-starter
Install using your preferred package manager:
1npm install 2# or 3yarn install 4# or 5pnpm install
Create a .env
file in the project root and add the following:
1PORT=5000 2MONGO_URI=your-mongodb-connection-string 3JWT_SECRET=your-jwt-secret 4EMAIL_USER=your-email@example.com 5EMAIL_PASSWORD=your-email-password 6GOOGLE_CLIENT_ID=your-google-client-id 7GOOGLE_CLIENT_SECRET=your-google-client-secret 8FACEBOOK_CLIENT_ID=your-facebook-client-id 9FACEBOOK_CLIENT_SECRET=your-facebook-client-secret 10GITHUB_CLIENT_ID=your-github-client-id 11GITHUB_CLIENT_SECRET=your-github-client-secret 12APPLE_CLIENT_ID=your-apple-client-id 13APPLE_CLIENT_SECRET=your-apple-client-secret 14CLIENT_URL=http://localhost:3000 # Replace with your frontend URL
1npm run dev 2# or 3yarn dev 4# or 5pnpm run dev
The server will start on http://localhost:5000
.
The API documentation is available at:
http://localhost:5000/api-docs
Swagger is pre-configured to provide an interactive interface for testing and understanding the API endpoints.
We welcome contributions to improve this project! Here’s how you can help:
git checkout -b feature-name
).git commit -m "Add feature"
).git push origin feature-name
).To make this project available to the public as a package:
package.json
has the relevant metadata:
1{ 2 "name": "auth-system-starter", 3 "version": "1.0.0", 4 "description": "A starter project for authentication with Passport.js, JWT, and role-based access control.", 5 "main": "server.js", 6 "keywords": ["authentication", "passport.js", "jwt", "nodejs", "express"], 7 "author": "Faraz Ahmad <farazahmad31048@gmail.com>", 8 "license": "MIT" 9}
This project is licensed under the MIT License. Feel free to use, modify, and distribute it.
Let’s build amazing applications together! 🚀
No vulnerabilities found.
No security vulnerabilities found.