https://github.com/krishit-shah/authly
Secure MERN Stack Authentication App with Email OTP, JWT, Password Reset
https://github.com/krishit-shah/authly
auth-system authentication fullstack jwt mern node-js otp-auth reactjs
Last synced: 9 days ago
JSON representation
Secure MERN Stack Authentication App with Email OTP, JWT, Password Reset
- Host: GitHub
- URL: https://github.com/krishit-shah/authly
- Owner: Krishit-Shah
- Created: 2025-04-21T19:42:35.000Z (25 days ago)
- Default Branch: main
- Last Pushed: 2025-05-04T08:59:33.000Z (12 days ago)
- Last Synced: 2025-05-04T09:25:26.041Z (12 days ago)
- Topics: auth-system, authentication, fullstack, jwt, mern, node-js, otp-auth, reactjs
- Language: JavaScript
- Homepage:
- Size: 203 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ Authly โ Secure Auth System (MERN)
> A full-stack authentication system with Email OTP verification, password reset, JWT protection, and clean UI using Bootstrap.
## ๐ Features
- ๐ User Signup + Login with JWT
- ๐ง OTP Verification via Email during Signup
- ๐ก๏ธ Protected Dashboard (Private Route)
- ๐ Forgot Password with Email Reset Link
- ๐จ Bootstrap 5 UI + Toast Notifications
- ๐ Secure Password Hashing using bcrypt
- โ๏ธ Nodemailer-based Email Service
- ๐ง Temporary in-memory store for OTP
- ๐๏ธ Fully structured: `frontend/` + `backend/`---
## ๐งช How to Run the Project Locally### 1. ๐ฆ Clone the Repository
```bash
git clone https://github.com/Krishit-Shah/authly.git
cd authly
```
### 2.โ๏ธ Backend Setup
```bash
cd backend
npm install
```
๐ Create a `.env` file inside `backend/` with the following environment variables:
```bash
PORT=5000
MONGO_URI=mongodb://localhost:27017/authly
JWT_SECRET=supersecretkey
[email protected]
EMAIL_PASS=your_app_password
CLIENT_URL=http://localhost:3000
```๐ Note: Use a Gmail App Password if you have 2FA enabled.
### Start the backend server:
```bash
npm start
```
๐ Server runs at: http://localhost:5000### 3.๐ป Frontend Setup
```bash
cd ../frontend
npm install
npm start
```
๐ Frontend runs at: http://localhost:3000## 4.๐ฆ Installed Dependencies
### ๐ง Backend
- express
- mongoose
- dotenv
- bcryptjs
- jsonwebtoken
- nodemailer
- cors```bash
npm install express mongoose dotenv bcryptjs jsonwebtoken nodemailer cors
```### ๐ป Frontend
- react
- react-dom
- react-router-dom
- axios
- react-toastify
- bootstrap
```bash
npm install react react-dom react-router-dom axios react-toastify bootstrap
```
---## ๐ ๏ธ Tech Stack
| ๐ง Frontend | โ๏ธ Backend | ๐ Security | ๐งฐ Tools |
|--------------|------------|-------------|-------------|
| React | Node.js | JWT | Toastify |
| Bootstrap 5 | Express | Bcrypt.js | Nodemailer |
| React Router | MongoDB | OTP Emails | Dotenv |## ๐จโ๐ป Author
Krishit Shah
- A complete MERN stack authentication solution built with a focus on security, scalability, and clean architecture.## ๐ License
- This project is free to use for learning and educational purposes.## ๐ Contributing
- Contributions are welcome. Please submit a pull request with your changes.## ๐จ Issues
- Please report any issues or bugs in the `issues` section.
## ๐ Future Development- ๐ Google OAuth Login using `react-oauth/google`
- ๐ Light/Dark Mode toggle with persistent theme storage
- ๐งฉ Admin-only dashboard with role-based access control
- ๐ฑ Fully mobile-optimized layout using Bootstrap grid
- ๐ฌ Custom error handling with user-friendly messages
- ๐ Resend OTP with cooldown + expiration UI
- ๐งพ In-app activity logs (user actions & login history)
- ๐ Deployment to Render (backend) + Vercel (frontend) with custom domain
- ๐ง Migration from in-memory store to Redis for OTP in production