A full-stack authentication system built using React.js, Node.js, MongoDB, and Clerk. This project demonstrates modern authentication workflows with secure and scalable architecture.
- User Signup & Login
- Logout functionality
- Protected Routes
- Email Verification
- Password Reset
- Google OAuth Login
- Role-Based Access Control (Admin/User)
- MongoDB User Storage
Frontend
- React.js
- HTML, CSS, JavaScript
Backend
- Node.js
- Express.js
Database
- MongoDB
Authentication
- Clerk
Create .env files in both client and server.
MONGO_URI=your_mongodb_uri
CLERK_SECRET_KEY=your_secret_key
REACT_APP_CLERK_PUBLISHABLE_KEY=your_publishable_key
git clone https://github.com/mir-arsh/Auth-System.git
cd Auth-System
Server
cd server
npm install
Client
cd client
npm install
Start backend
cd server
node server.js
Start frontend
cd client
npm start
Start NGROK
ngrok http 5000
Note: You will need to install ngrok in your system and add your ngrok link to clerk webhook.
- Default users are assigned
userrole - Admin routes are protected via middleware
- Admin dashboard allows user management
- Frontend: Vercel
- Backend: Render
- Database: MongoDB Atlas
Note: For deployment links in certain files have been changed from localhost to domain.
Arsh Zaffar Mir
Give it a star on GitHub!