CLAMANS is a role-based, workflow-driven Leave Management System developed for the Central Library, IIT Delhi.
The system digitizes and automates the complete leave lifecycle with policy-compliant leave calculations, multi-level approvals, and automated email notifications, ensuring transparency, accuracy, and administrative efficiency.
- โ 4-tier Role-Based Access Control (Staff, HOD, Head, Admin)
- ๐ Multi-level approval workflow with remarks at each stage
- ๐ Accurate leave computation handling:
- Weekends
- Institutional holidays
- Half-day policies
- ๐ง SMTP-based workflow-driven email automation
- ๐ Email-based OTP verification & secure authentication
- ๐๏ธ PostgreSQL-backed transactional data layer
- ๐จ Modern Streamlit UI with custom CSS
- โ๏ธ Administrative user & leave balance management
| Role | Capabilities |
|---|---|
| Staff | Apply leave, view leave balance, track leave history |
| HOD | Review staff leaves, forward or reject with remarks |
| Head | Final approval or rejection authority |
| Admin | User creation, role management, leave balance control |
Staff โ HOD โ Head โ Final Decision โ Email Notification Each stage:
- Enforces validation rules
- Captures reviewer remarks
- Sends automated email updates to relevant stakeholders
CLAMANS ensures policy compliance using intelligent leave computation logic:
- โ Excludes weekends (Saturday & Sunday)
- โ Excludes institution-declared holidays
- โ Supports half-day leave (0.5 day) rules
- ๐ซ Prevents invalid date ranges
- ๐ข Automatically updates leave balance transactionally
Core utility functions:
is_working_day(date, holidays)
calculate_working_days(start_date, end_date, holidays)CLAMANS uses a normalized, relational PostgreSQL schema designed to ensure data integrity, transactional safety, and institutional policy compliance.
- Stores authentication and identity information
- Implements role-based hierarchy using
reports_to - Tracks remaining leave balance per user
Key Fields:
id(Primary Key)username,email,passwordrole(staff / hod / head / admin)reports_to(Foreign Key โusers.id)leave_count
- Stores all leave applications and their lifecycle state
- Supports multi-level approval workflow
- Maintains complete audit trail
Key Fields:
user_id(Foreign Key โusers.id)leave_type,reasonstart_date,end_datestatus(pending,forwarded,approved,rejected)hod_remarks,head_remarksreviewed_by,approved_byapplied_date,forwarded_date,approval_dateis_half_dayreference_no
- Enables email-based OTP authentication
- Enforces time-bound verification
Key Fields:
emailotpexpiry
- ๐ Foreign-key integrity across users and leave records
- ๐ Transaction-safe leave deductions
- ๐งฎ Accurate leave balance updates (full-day & half-day)
- ๐ Unique reference number generation: