"Every workday, perfectly aligned."
A comprehensive HRMS built with React, Express.js, and MongoDB featuring role-based access control, attendance management, leave management, and payroll systems.
-
Role-Based Access Control (RBAC)
- Employee Dashboard
- Admin/HR Dashboard
-
Authentication System
- Secure Sign Up & Sign In
- JWT-based authentication
- Auto-generated Employee IDs
- Password hashing with bcrypt
-
Employee Management
- Profile management
- Auto-generated employee IDs (Format: [CompanyCode][NameCode][Year][Serial])
-
Dashboard
- Employee-specific dashboard
- Admin/HR management panel
Before you begin, ensure you have the following installed:
- Node.js (v14 or higher)
- MongoDB (v4.4 or higher)
- npm or yarn
git clone <repository-url>
cd DayFlowcd server
npm installcd ../client
npm installCreate a .env file in the server directory:
PORT=5000
MONGODB_URI=mongodb://localhost:27017/dayflow-hrms
JWT_SECRET=your_super_secret_jwt_key_change_this_in_production
JWT_EXPIRE=7dMake sure MongoDB is running on your system:
# On Linux/Mac
sudo systemctl start mongod
# Or using mongod directly
mongod --dbpath /path/to/your/data/directorycd server
npm run devThe server will run on http://localhost:5000
Open a new terminal:
cd client
npm run devThe client will run on http://localhost:5173 (Vite default port)
DayFlow/
├── client/ # React frontend
│ ├── src/
│ │ ├── components/
│ │ │ ├── Auth/ # Authentication components
│ │ │ │ ├── SignIn.jsx
│ │ │ │ └── SignUp.jsx
│ │ │ └── Dashboard/ # Dashboard components
│ │ │ ├── EmployeeDashboard.jsx
│ │ │ └── AdminDashboard.jsx
│ │ ├── utils/ # Utility functions
│ │ │ └── ProtectedRoute.jsx
│ │ ├── App.jsx
│ │ └── main.jsx
│ ├── tailwind.config.js
│ └── package.json
│
└── server/ # Express backend
├── src/
│ ├── config/ # Configuration files
│ │ └── db.js
│ ├── models/ # Mongoose models
│ │ └── User.js
│ ├── routes/ # API routes
│ │ └── authRoutes.js
│ ├── controllers/ # Route controllers
│ │ └── authController.js
│ └── middleware/ # Custom middleware
│ └── auth.js
├── uploads/ # File uploads directory
├── .env
├── server.js
└── package.json
- Access to personal dashboard
- View own profile
- Mark attendance
- Apply for leave
- View salary information (read-only)
- Access to admin dashboard
- Manage all employees
- View all attendance records
- Approve/reject leave requests
- Manage payroll
- Generate reports
Employee IDs are automatically generated in the format:
[CompanyCode][NameCode][Year][Serial]
Example: OIJO20220001
OI- First two letters of company name (Odoo India)JO- First two letters of first and last name (John Doe)2022- Year of joining0001- Serial number
- Password hashing using bcrypt
- JWT token-based authentication
- Protected routes with role-based authorization
- HTTP-only cookies (can be implemented)
- Input validation
- CORS configuration
POST /api/auth/signup- Register new userPOST /api/auth/signin- Login userGET /api/auth/me- Get current user (Protected)
GET /api/health- Server health check
- React 19.2.0
- React Router DOM
- Tailwind CSS
- Axios
- Vite
- Node.js
- Express.js
- MongoDB
- Mongoose
- JWT
- Bcrypt
- Multer (file uploads)
- Biometric attendance
- Shift management
- Performance reviews
- Tax computation
- Export reports (PDF/Excel)
- Email notifications
- Document management
- Advanced analytics
This project is licensed under the MIT License.
Contributions are welcome! Please feel free to submit a Pull Request.
For support, email support@dayflow.com or open an issue in the repository.
Built with ❤️ by the DayFlow Team