A full-stack employee management platform for tracking attendance, monitoring performance, and managing organizational structure. Built as an internship project.
- Role-based access — Admin, Manager, and Employee dashboards
- Attendance Management — Create sessions, mark attendance (Present/Late/Absent)
- Performance Tracking — Define metrics, record scores, view comparison charts
- Department Management — Create and manage departments
- User Management — Admin can create users, assign roles and departments
- Signup/Login — JWT-based authentication with public signup for employees
- Modern Dashboard — Professional UI with stat cards, charts, tables, and activity feeds
| Layer | Technology |
|---|---|
| Frontend | React 19, Vite, Tailwind CSS, Recharts, React Router |
| Backend | Node.js, Express 5, Mongoose 9 |
| Database | MongoDB Atlas |
| Auth | JWT (Access + Refresh tokens), bcrypt |
├── backend/
│ ├── src/
│ │ ├── controllers/ # Route handlers
│ │ ├── models/ # Mongoose schemas
│ │ ├── routes/ # API routes
│ │ ├── middlewares/ # Auth & role checks
│ │ ├── utils/ # ApiError, ApiResponse, asyncHandler
│ │ ├── db/ # Database connection
│ │ ├── script/ # Admin seeder
│ │ ├── app.js # Express app setup
│ │ └── index.js # Server entry point
│ └── package.json
├── frontend/
│ ├── src/
│ │ ├── pages/ # Admin, Manager, Employee pages
│ │ ├── components/ # Sidebar, LogoutButton
│ │ ├── context/ # AuthContext
│ │ ├── api/ # Axios instance
│ │ ├── routes/ # ProtectedRoute
│ │ ├── App.jsx # Route definitions
│ │ └── main.jsx # Entry point
│ └── package.json
└── testing/
- Node.js v18+
- MongoDB Atlas account (or local MongoDB)
git clone https://github.com/Nik30codes/attendence-performance-tracking.git
cd attendence-performance-trackingcd backend
npm installCreate a .env file in backend/:
PORT=3500
MONGODB_URI=mongodb+srv://<user>:<password>@cluster.mongodb.net
CORS_ORIGIN=http://localhost:5173
ACCESS_TOKEN_SECRET=your_access_secret
ACCESS_TOKEN_EXPIRY=1d
REFRESH_TOKEN_SECRET=your_refresh_secret
REFRESH_TOKEN_EXPIRY=10d
ALLOW_ADMIN_SCRIPT=true
ADMIN_NAME=Admin
ADMIN_EMAIL=admin@atp.com
ADMIN_PASSWD=Admin@123Create the admin user:
node src/script/createAdmin.jsStart the backend:
npm run devcd frontend
npm install
npm run dev| Role | Password | |
|---|---|---|
| Admin | admin@atp.com | Admin@123 |
Admins can create Manager and Employee accounts from the Users page. Employees can self-register via the Signup page.
POST /api/users/login— LoginPOST /api/users/signup— Employee signupGET /api/dept/all— List departments
GET /api/users/me— Current userGET /api/users/active— All active usersGET /api/users/stats— Dashboard statisticsPOST /api/users/createuser— Create user (Admin/Manager)
POST /api/dept/createdept— Create department (Admin)
POST /api/attendance/create-attendance— Create sessionPOST /api/attendance/mark-attendance— Mark attendanceGET /api/attendance/today— Today's sessionsGET /api/attendance/user/me— My attendanceGET /api/attendance/user/:userId— User attendance
POST /api/performance/create-performance-metric— Create metric (Admin)POST /api/performance/record-performance— Record scoreGET /api/performance/records— All recordsGET /api/performance/get-performance-user/:userId— User performanceGET /api/performance/get-performance-metric— All metrics
| Role | Can Do |
|---|---|
| Admin | Everything — manage users, departments, attendance, performance |
| Manager | Create attendance sessions, mark attendance, record performance for their team |
| Employee | View own attendance, performance, and profile |
The system features a modern, professional dashboard with:
- Stat cards with color-coded metrics
- Donut charts for attendance breakdown
- Bar charts for performance comparison
- Clean table layouts with role badges
- Responsive sidebar navigation
ISC