A comprehensive HR Management System with HTML frontend and Node.js/Express backend.
- Frontend: Pure HTML, CSS, JavaScript (Tailwind CSS via CDN)
- Backend: Node.js, Express.js, MongoDB
- No Build Step Required: Just open HTML files or use a simple HTTP server
✅ Multi-level UI with role-based navigation
✅ RBAC (Role-Based Access Control) - 5 role levels
✅ Payroll Management - Complete payroll processing
✅ Staff Management - Employee directory with search/filter
✅ Attendance Tracking - Check-in/out system
✅ Project Assignment - Project management
✅ Employee Communication - Real-time messaging
✅ Modern Dashboard - Analytics and charts
✅ Email Invitations - Professional invitation system
cd backend
npm install
# Create .env file (see backend/.env.example)
npm run devBackend runs on: http://localhost:5000
Option 1: Simple HTTP Server (Recommended)
cd frontend
npm install
npm run serveOption 2: Python
cd frontend
python -m http.server 3000Option 3: PHP
cd frontend
php -S localhost:3000Option 4: Just Open Files
- Open
frontend/login.htmlin your browser - Update
js/api.jsto set correctAPI_URL
Frontend runs on: http://localhost:3000
HRSys/
├── backend/ # Node.js/Express API
│ ├── models/ # MongoDB models
│ ├── routes/ # API routes
│ ├── controllers/ # Business logic
│ └── middleware/ # Auth & validation
├── frontend/ # HTML/CSS/JS
│ ├── *.html # Page files
│ ├── css/ # Styles
│ └── js/ # JavaScript modules
└── README.md
/login.html- Login and registration/dashboard.html- Main dashboard/employees.html- Employee management/payroll.html- Payroll management/attendance.html- Attendance tracking/projects.html- Project management/messages.html- Employee messaging
PORT=5000
MONGODB_URI=mongodb+srv://...
JWT_SECRET=your-secret-key
JWT_EXPIRE=30d
CLIENT_URL=http://localhost:3000
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USER=your-email@gmail.com
EMAIL_PASS=your-app-passwordEdit frontend/js/api.js and set:
const API_URL = 'http://localhost:5000/api';
// Or your deployed backend URL- super_admin: Full system access
- admin: Employee and payroll management
- hr_manager: HR functions and payroll
- manager: Team management
- employee: View own data
POST /api/auth/register- Register userPOST /api/auth/login- LoginGET /api/employees- Get employeesGET /api/payroll- Get payroll recordsGET /api/attendance- Get attendanceGET /api/projects- Get projectsPOST /api/invitations- Send invitationGET /api/dashboard/stats- Dashboard statistics
Deploy to Railway, Render, or Heroku. See DEPLOYMENT_GUIDE.md
Upload to any static hosting:
- Vercel
- Netlify
- GitHub Pages
- Any web server
Just update API_URL in js/api.js to point to your deployed backend.
MIT License