Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Dayflow HRMS

Typing SVG

Next.js React Supabase Prisma Tailwind CSS TypeScript

Stars Forks Last Commit License


Table of Contents


Overview

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.

Tech stack icons

Features

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

Tech Stack

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

Getting Started

Prerequisites

Installation

git clone https://github.com/yash-dev07/Dayflow-hrms.git
cd Dayflow-hrms
npm install

Then 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 dev

Open http://localhost:3000.

Environment Variables

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

Deployment (Vercel)

  1. Push the repository to GitHub and import it into Vercel.
  2. Add DATABASE_URL, DIRECT_URL, and JWT_SECRET under Project Settings → Environment Variables.
  3. Set the build command to prisma generate && next build.
  4. Deploy, then run npx prisma db push against the production database if you haven't already.

Project Structure

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

Roles & Permissions

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

Demo Accounts

Click to expand — for local development and demos only

Disable or replace these before deploying to a real production environment.

Role Email Password
Admin admin@dayflow.demo Admin@123
HR hr@dayflow.demo Hr@12345
Employee employee@dayflow.demo Employee@123

Roadmap

  • Biometric / geo-tagged check-in
  • Recruitment & onboarding workflow
  • Performance review module
  • Native mobile app
  • Payroll integration with tax/banking systems

Contributing

Issues and pull requests are welcome. For larger changes, please open an issue first to discuss what you'd like to change.

License

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.

⬆ Back to top

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages