A full-stack user authentication system built using the MERN Stack that provides secure user registration and login functionality using JWT authentication.
- ✅ User Registration (Signup)
- ✅ User Login
- ✅ Password Hashing with bcrypt
- ✅ JWT Authentication
- ✅ Protected Routes
- ✅ User Context Management
- ✅ React Router Navigation
- ✅ Toast Notifications
- ✅ Axios API Integration
- ✅ Responsive UI
- React.js
- React Router DOM
- Axios
- React Hot Toast
- CSS
- Node.js
- Express.js
- MongoDB
- Mongoose
- JWT (JSON Web Token)
- bcryptjs
- dotenv
- cookie-parser
- cors
UC_Task1/
│
├── client/
│ ├── src/
│ │ ├── components/
│ │ ├── context/
│ │ ├── pages/
│ │ ├── App.jsx
│ │ └── main.jsx
│ └── package.json
│
├── server/
│ ├── controllers/
│ ├── models/
│ ├── routes/
│ ├─ helpers/
│
│ ├── index.js
│ └── package.json
│
└── README.md
git clone https://github.com/your-username/UC_Task1.gitcd UC_Task1cd client
npm installcd ../server
npm installcd server
npm run devcd client
npm run devFrontend:
http://localhost:5173
Backend:
http://localhost:5000
- User registers with email and password.
- Password is securely hashed using bcrypt.
- User logs in with valid credentials.
- Server verifies credentials.
- JWT token is generated.
- Token is stored securely.
- Protected routes verify authentication before granting access.
POST /register
Request Body
{
"name": "John Doe",
"email": "john@example.com",
"password": "password123"
}POST /login
Request Body
{
"email": "john@example.com",
"password": "password123"
}GET /logout
- Password hashing using bcrypt
- JWT-based authentication
- Protected routes
- Input validation
- Secure API communication
Add screenshots of:
- Home Page
- Login Page
- Signup Page
- Dashboard
- Forgot Password
- Reset Password via Email
- Email Verification
- Google OAuth Login
- User Profile Page
- Role-Based Authentication
- Refresh Tokens
Nilish Shah
GitHub: https://github.com/nilish2006
If you found this project helpful, consider giving it a ⭐ on GitHub.