A full-stack web application for managing employees and tasks, featuring authentication, CRUD operations, and per-user sample data. Built with Next.js (React), Express.js, and MongoDB.
Demo Video - https://drive.google.com/file/d/1zROaqeSXZoCYnYHqoZf1wOXX7I0N0fW3/view?usp=sharing
- User Authentication: Register, login, JWT-based session management
- Employee Management: Add, edit, delete, and view employees
- Task Management: Assign, update, delete, and track tasks
- Per-User Sample Data: New users see demo employees and tasks after registration
- Role-based Access: Admin/user roles (extensible)
- Responsive UI: Modern design with shadcn and Radix UI components
- API Integration: Frontend uses REST API for all data operations
- Frontend: Next.js 16, React 19, TypeScript, shadcn, Radix UI
- Backend: Node.js 18+, Express.js, MongoDB (Mongoose ODM)
- Auth: JWT, bcrypt
- Dev Tools: nodemon, morgan, dotenv
├── frontend/
│ ├── app/ # Next.js app directory (pages, layouts, protected routes)
│ ├── components/ # Reusable UI and feature components
│ ├── context/ # React context for auth and data
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Utility functions
│ ├── public/ # Static assets
│ ├── styles/ # Global CSS
│ └── ...
├── backend/
│ ├── controllers/ # Route controllers
│ ├── middleware/ # Express middleware
│ ├── models/ # Mongoose models
│ ├── routes/ # API route definitions
│ ├── services/ # Business logic and sample data seeding
│ ├── utils/ # Helper utilities
│ ├── config/ # DB connection
│ └── server.js # Main server entrypoint
├── .env.local # Frontend environment config
├── backend/.env # Backend environment config
├── package.json # Project dependencies
├── README.md # Project documentation
git clone <repo-url>
cd employee-task-managementpnpm install
cd backend
npm installIf you'd like to generate PNG icon variants from the project's SVG (frontend/public/icon.svg) for apple-touch and favicons, run the included script from the frontend directory:
cd frontend
pnpm install # include dev deps (sharp)
npm run generate-iconsThis will create PNG assets in frontend/public. The script attempts to create a favicon.ico (if png-to-ico or to-ico is present), but on some systems you may need to install png-to-ico manually or ensure build tools are available. If the .ico doesn't appear, you can:
- Run inside the
frontendfolder:
# Install `png-to-ico` locally and re-run the script
npm install --save-dev png-to-ico
npm run generate-iconsOr use an external or web-based tool to generate a favicon.ico from favicon-16x16.png and favicon-32x32.png.
- Frontend: Edit
.env.local(API base URL) - Backend: Edit
backend/.env(MongoDB URI, JWT secret, allowed origins)
- Backend:
cd backend npm run dev - Frontend:
pnpm dev
POST /api/auth/register— Register new userPOST /api/auth/login— LoginGET /api/auth/validate— Validate JWTGET /api/employees— List employeesPOST /api/employees— Add employeePUT /api/employees/:id— Update employeeDELETE /api/employees/:id— Delete employeeGET /api/tasks— List tasksPOST /api/tasks— Add taskPUT /api/tasks/:id— Update taskDELETE /api/tasks/:id— Delete task
- On registration, each user receives demo employees and tasks for a quick start.
- Port conflicts: Ensure only one backend server runs on port 5000. Use
npx kill-port 5000if needed. - CORS errors: Check
FRONTEND_ORIGINin backend.envand allowed origins inserver.js. - MongoDB connection: Verify
MONGO_URIin backend.env.
MIT
Rupsa Nanda