Backend Developer Intern Assessment
A full-stack User Management System built as part of the PurpleMerit Backend Developer Intern Assessment.
The project demonstrates secure authentication, role-based access control, admin operations, and a modern, responsive frontend with professional UX patterns.
This application allows users to sign up, log in, manage their profile, and securely change passwords.
Admins can manage users through a dedicated dashboard with pagination and activation/deactivation controls.
The focus of this project is:
- Clean backend architecture
- Secure authentication & authorization
- Practical admin workflows
- Professional frontend UX
- Node.js
- Express.js
- MongoDB Atlas
- Mongoose
- JWT (Authentication)
- bcrypt (Password Hashing)
- Jest + Supertest (Testing)
- React (Vite)
- Tailwind CSS (v4)
- Axios
- React Router DOM
- Context API
- Frontend: Vercel
- Backend: Render / Railway
- Database: MongoDB Atlas
- User signup and login
- JWT-based authentication
- Secure password hashing
- Protected routes
- Role-based access control (Admin / User)
- View all users in a paginated table (10 users per page)
- Activate / deactivate users
- Confirmation dialogs before actions
- Success & error notifications
- View profile details
- Edit profile (name & email) via modal
- Change password via modal
- Save / cancel actions
- Secure password update flow
- Clean black & white theme
- Responsive design (desktop & mobile)
- Loader indicators during API calls
- Toast notifications for feedback
- Blurred modal overlays for better UX
purplemerit-user-management/
│
├── backend/
│ ├── src/
│ │ ├── controllers/
│ │ ├── models/
│ │ ├── routes/
│ │ ├── middleware/
│ │ ├── config/
│ │ └── tests/
│ └── server.js
│
├── frontend/
│ ├── src/
│ │ ├── pages/
│ │ ├── components/
│ │ ├── context/
│ │ ├── services/
│ │ └── utils/
│ └── main.jsx
│
└── README.mdPORT=5000
MONGO_URI=<YOUR_MONGODB_ATLAS_URI>
JWT_SECRET=<YOUR_JWT_SECRET>VITE_API_BASE_URL=<Your backend api>git clone <YOUR_GITHUB_REPO_URL>
cd purplemerit-user-management
cd backend
npm install
npm run dev
cd frontend
npm install
npm run dev
Backend unit and integration tests are included.
cd backend
npm test-
POST /api/auth/signup
-
POST /api/auth/login
-
GET /api/users/profile
-
PATCH /api/users/profile
-
PATCH /api/users/change-password
-
GET /api/users
-
PATCH /api/users/:id/activate
-
PATCH /api/users/:id/deactivate
All protected routes require a valid JWT token.
This application supports role-based access control.
To test admin-specific features such as user listing and activation/deactivation, admin credentials are shared separately via email as part of the submission, to avoid exposing sensitive data in a public repository.
- Frontend (Vercel):https://purplemerit-user-management-fronten.vercel.app/
- Backend (Railway):https://purplemerit-user-management-backend.onrender.com/
Saras Mishra Backend Developer Intern Candidate