- Overview
- Features
- Tech Stack
- Getting Started
- Environment Variables
- Deployment
- Project Structure
- Roles & Permissions
- Demo Accounts
- Roadmap
- Contributing
- License
Dayflow HRMS is a unified Human Resource Management System that brings employee management, attendance tracking, leave management, and payroll processing into a single platform. It's built on a Next.js and PostgreSQL stack with a modern, glassmorphism-inspired interface, designed to replace the spreadsheet-and-email workflows common in smaller HR teams.
| Role-based access control | JWT-based auth with dedicated views for ADMIN, HR, and EMPLOYEE, enforced on both UI and API |
| Real-time attendance | One-click check-in/check-out with automatic hours-worked calculation |
| Leave management | Sick, casual, and unpaid leave requests with approval workflow and automatic balance deduction |
| Automated payroll | Salary calculation with allowances/deductions (HRA, tax) and printable salary slips |
| Responsive UI | Dark/light mode, animated backgrounds, fully responsive layout |
| Layer | Technology |
|---|---|
| Frontend | Next.js 16 (App Router), React 19, Tailwind CSS, Lucide React |
| Backend | Next.js API Routes & Server Actions |
| Database | PostgreSQL (Supabase) |
| ORM | Prisma |
| Auth | Custom JWT with HTTP-only cookies |
git clone https://github.com/yash-dev07/Dayflow-hrms.git
cd Dayflow-hrms
npm installThen set up your environment variables (below), push the schema, and run the app:
cp .env.example .env # fill in the values first
npx prisma db push
npx prisma generate
npx prisma db seed # optional: demo data
npm run devOpen http://localhost:3000.
| Variable | Description |
|---|---|
DATABASE_URL |
Pooled Postgres connection string, used at runtime (Supabase: Settings → Database → Transaction pooler, port 6543) |
DIRECT_URL |
Direct Postgres connection string, used for migrations (Supabase: Settings → Database → Direct connection, port 5432) |
JWT_SECRET |
Any long, random string used to sign session tokens |
- Push the repository to GitHub and import it into Vercel.
- Add
DATABASE_URL,DIRECT_URL, andJWT_SECRETunder Project Settings → Environment Variables. - Set the build command to
prisma generate && next build. - Deploy, then run
npx prisma db pushagainst the production database if you haven't already.
Click to expand
Dayflow-hrms/
├── app/
│ ├── api/ # auth, attendance, employees, leaves, leave-types,
│ │ notifications, payroll, profile, reports, dashboard
│ └── dashboard/ # Authenticated app UI
├── lib/ # Prisma client, auth helpers
├── prisma/
│ ├── schema.prisma # Data models
│ └── seed.ts # Demo data
├── middleware.ts # Route protection / RBAC
└── .env.example
| Capability | Employee | HR | Admin |
|---|---|---|---|
| Own profile / attendance / leave / payroll | View + limited edit | View + limited edit | Full access |
| Other employees' records | — | View & edit | Full access |
| Leave approvals | Apply only | Approve / reject | Approve / reject |
| Payroll structure | Read-only, own only | View | View & edit, all employees |
Click to expand — for local development and demos only
Disable or replace these before deploying to a real production environment.
| Role | Password | |
|---|---|---|
| Admin | admin@dayflow.demo |
Admin@123 |
| HR | hr@dayflow.demo |
Hr@12345 |
| Employee | employee@dayflow.demo |
Employee@123 |
- Biometric / geo-tagged check-in
- Recruitment & onboarding workflow
- Performance review module
- Native mobile app
- Payroll integration with tax/banking systems
Issues and pull requests are welcome. For larger changes, please open an issue first to discuss what you'd like to change.
This project is licensed under the MIT License — see the LICENSE file for details, or replace this section with your preferred license.
Built for the modern workplace.