AuthVault is a production-style full-stack authentication system built using the MERN stack. It provides secure user authentication with JWT, refresh tokens, role-based access control, and modern UI.
- User Registration & Login
- JWT Authentication (Access + Refresh Tokens)
- Secure Logout System
- Forgot Password & Reset Password via Email
- Protected Routes (Frontend + Backend)
- Role-Based Authorization (Admin/User)
- User Profile Update
- File Upload Support (cloudinary)
- Error Handling Middleware
- Redux Toolkit State Management
- Responsive UI (React + Vite)
Frontend:
- React.js (Vite)
- Redux Toolkit
- React Router DOM
- Axios
- CSS
- *Bootstrap
Backend:
- Node.js
- Express.js
- MongoDB (Mongoose)
- JWT (Authentication)
- Nodemailer (Email service)
- cloudinary (File uploads)
AuthVault
│
├── backend
│ ├── controllers
│ ├── models
│ ├── routes
│ ├── middleware
│ ├── utils
│ └── server.js
│
├── frontend
│ ├── src
│ │ ├── components
│ │ ├── pages
│ │ ├── features
│ │ ├── app
│ │ └── style
│ └── vite.config.js
git clone https://github.com/usama247550/AuthVault.gitcd backend
npm install
npm run servercd frontend/my-react-app
npm install
npm run devCreate .env file in backend:
PORT=5000
MONGO_URI=your_mongodb_url
JWT_SECRET=your_secret_key
REFRESH_TOKEN_SECRET=your_refresh_secret
JWT_EXPIRE=15m
EXPIRE_COOKIE=7d
SMTP_SERVICE=gmail
EMAIL_USER=your_email@gmail.com
EMAIL_PASS=your_email_password
CLOUD_NAME=your_cloudinary_name
API_KEY=your_api_key
API_SECRET=your_api_secret
FRONTEND_URL=http://localhost:5173
- Google OAuth Login
- Admin Dashboard Analytics
- Deployment (Vercel + Render)
- API Rate Limiting
Usama Javed MERN Stack Developer
GitHub: https://github.com/usama247550
Give it a star ⭐ on GitHub and share it!