MernAuth is a full-stack authentication system built using the MERN stack (MongoDB, Express, React, Node.js).
This was my first complete full-stack project, focused on implementing secure user authentication with features like OTP verification, hashed passwords, and JWT-based login sessions.
MernAuth provides a production-grade authentication flow where users can:
- Register with an email and receive a One-Time Password (OTP) for verification.
- Log in securely after account verification.
- Enjoy protected routes powered by JWT authentication.
- Experience a smooth and modern UI built with React + Tailwind CSS.
✅ User Registration & Login — Sign up and log in with email & password
📩 OTP Verification — Email-based OTP system for validating user identity
🔐 Password Security — Uses bcryptjs for hashing and jsonwebtoken for secure sessions
⚙️ Protected Routes — Middleware-authenticated access using JWT
🎨 Modern Frontend — Responsive UI with Tailwind CSS
🧱 RESTful API — Clean, modular Express API design
🗄️ MongoDB Integration — Stores users and OTPs securely
| Layer | Technology |
|---|---|
| Frontend | React (Vite), Tailwind CSS |
| Backend | Node.js, Express.js |
| Database | MongoDB (Mongoose) |
| Auth | JWT, bcryptjs |
| OTP Service | Nodemailer / EmailJS (for sending OTPs) |