Dayflow is a lightweight HR attendance & leave management system built during a hackathon using Node.js, Express, SQLite, and Vanilla JavaScript.
It demonstrates a secure, role-based HR workflow with JWT authentication and real-time approvals.
- Secure login & registration
- Daily Check-In / Check-Out
- View personal attendance history
- Apply for leave & track status
- Secure HR login
- View employee attendance by date
- Approve or deny leave requests
- Role-based access control
- Frontend: HTML, CSS, Bootstrap, JavaScript
- Backend: Node.js, Express
- Database: SQLite
- Authentication: JWT (JSON Web Token)
DAYFLOW/
│
├── node_modules/ # Installed dependencies
│
├── public/ # Frontend (static files)
│ ├── css/
│ │ ├── login.css
│ │ └── signup.css
│ │
│ ├── js/
│ │ ├── auth.js # Login & signup logic
│ │ ├── dashboard.js # Employee dashboard logic
│ │ ├── admin.js # HR dashboard logic
│ │ └── leaves.js # Leave management logic
│ │
│ ├── login.html # Login page
│ ├── signup.html # Signup page
│ ├── dashboard.html # Employee dashboard
│ ├── admin.html # HR dashboard
│ └── leaves.html # Leave application page
│
├── server/ # Backend (Express API)
│ ├── routes/
│ │ ├── auth.js # Auth routes (login/register)
│ │ ├── attendance.js # Attendance APIs
│ │ └── leaves.js # Leave APIs
│ │
│ ├── auth.js # JWT verification middleware
│ ├── db.js # SQLite DB connection
│ └── server.js # Express app entry point
│
├── database.sqlite # SQLite database file
├── package.json # Project metadata & scripts
├── package-lock.json
├── .gitignore
└── README.md # Project documentation
git clone https://github.com/VishvaNarkar/Dayflow.git
cd Dayflownpm installnpm startThe application runs at:
http://localhost:3000
- Users log in using email & password
- Server returns a JWT token
- Token is stored in
localStorage - Token is sent in the
Authorizationheader for protected APIs
⚠️ Current implementation expects the raw token (noBearerprefix).
POST /api/auth/registerPOST /api/auth/loginGET /api/auth/users(HR only)
POST /api/attendance/checkinPOST /api/attendance/checkoutGET /api/attendance/myGET /api/attendance/list?date=YYYY-MM-DD(HR only)
POST /api/leave/applyGET /api/leave/myGET /api/leave/pending(HR only)POST /api/leave/decision/:id(HR only)
This project prioritizes:
- ✅ End-to-end working flow
- ✅ Clean architecture
- ✅ Role-based access control
- ✅ Real database usage
- ✅ Secure authentication
- Use
Authorization: Bearer <token>format - Add charts & analytics dashboard
- Improve UI & validation
- Add automated tests
Built with ❤️ during a hackathon by Team Dayflow
Vishva Narkar
Om Prajapati
Vishal Mali