A Batman themed full-stack authentication system built with React, Node.js, Express, and MongoDB, featuring:
- Secure login & registration
- Email verification
- Password reset
- Persistent authentication
🌐 Live at: https://batauthsys.netlify.app
- 🔑 User Authentication: Register & Login with JWT-based sessions
- ✉️ Email Verification: Verify account using OTP sent via email
- 🔒 Password Reset: Secure OTP-based password reset flow
- 🍪 HTTP-only Cookies: Secure session management with SameSite=None & Secure flags in production
- 📬 SMTP Integration: Emails for welcome, OTP verification, and password reset
- 🖤 Batman-Themed UI: Dark, immersive design with a bottom dock
- 🖥️ Persistent Login: User stays logged in even after refresh
- React + Vite
- TailwindCSS
- React Toastify
- Node.js + Express
- MongoDB + Mongoose
- JWT for authentication
- Nodemailer (SMTP) for emails
- Netlify (Frontend)
- Render (Backend)
git clone https://github.com/AbhayPratap05/bat-auth.git
cd bat-authcd server
npm installCreate a .env file inside server/ with:
PORT=4000
MONGODB_URL=your-mongodb-uri
JWT_SECRET=your-secret-key
SMTP_USER=your-smtp-user
SMTP_PASS=your-smtp-pass
SENDER_EMAIL=your-sender-email
NODE_ENV=developmentRun the backend:
npm startcd client
npm installCreate a .env file inside client/ with:
VITE_BACKEND_URL=http://localhost:4000Run the frontend:
npm run dev