Leave Management System - Project
Report
1. Introduction
The Leave Management System (LMS) is a web-based application that streamlines the
process of managing employee leave requests, approvals, balances, and attendance. It is
designed to automate manual processes and reduce HR workload by providing a
transparent, efficient interface for employees, managers, and administrators.
2. Objectives
- To automate the leave request and approval process.
- To track various types of leaves (sick, annual, casual, etc.).
- To maintain attendance records.
- To generate reports for leave and attendance.
- To provide role-based access (Admin, Manager, Employee).
- To ensure secure login and data protection.
3. Tools/Environment Used
| Component | Tool/Technology |
|------------------|----------------------------------|
| Programming | Python |
| Web Framework | Django |
| Frontend | HTML, CSS, Bootstrap |
| Database | SQLite / PostgreSQL (preferred) |
| Diagrams | [Link] / Lucidchart |
| Version Control | Git |
| IDE | VS Code / PyCharm |
| OS | Windows/Linux |
4. Analysis Document
### Software Requirements Specification (SRS)
1. Introduction
- Purpose: Define functionality for LMS.
- Scope: Admin, Manager, Employee modules.
- Definitions: Leave types, user roles.
2. Functional Requirements
- Employee: Apply leave, view balance.
- Manager: Approve/reject leave.
- Admin: Add users, assign roles, define leave types.
3. Non-Functional Requirements
- Security, Scalability, Usability, Performance
4. External Interface Requirements
- Web interface for all user roles.
### Diagrams (E-R, Class, DFD)
To be attached separately.
### Data Dictionary
User(id, username, password, role)
Employee(id, user_id, name, department_id)
Leave(id, employee_id, type, from_date, to_date, status)
LeaveBalance(id, employee_id, sick, annual, etc.)
Attendance(id, employee_id, date, status)
5.1 Modular Design
The application is divided into the following major modules, each with
clear responsibilities and roles:
- **accounts**:
- Responsible for user authentication (login/logout) and registration.
- Handles session management and role-based redirection (admin,
manager, employee).
- **employees**:
- Manages employee records including their profile information,
designation, department, and status.
- Enables admin users to add, update, or delete employee data.
- Assigns each employee to a department and maps them to a user
account.
- **leaves**:
- Facilitates leave application submission by employees.
- Provides interfaces for managers to approve or reject leave requests.
- Updates leave balances accordingly after approval or rejection.
- Handles different leave types (sick, annual, casual, etc.).
- **attendance**:
- Enables employees to mark their daily attendance.
- Displays attendance records to both employees and administrators.
- Useful for payroll processing and leave deduction for absentees.
5.2 Database Design
- The backend database includes normalized tables for User, Employee,
Department, Leave, LeaveBalance, and Attendance.
- **Constraints and integrity rules**:
- Foreign key constraints between Employee and User, Employee and
Department.
- Leave table references the Employee and includes status (Pending,
Approved, Rejected).
- LeaveBalance table maintains used and remaining leaves per type.
- Attendance table records present/absent status for each day.
- All critical fields have NOT NULL constraints and unique indexes where
needed (e.g., username, email).
5.3 Procedural Design
- Views are defined in Django and organized by role-based access:
- Employees can view their balance, apply for leave, and mark
attendance.
- Managers can review leave applications of their subordinates.
- Admins have full access to employee records, departments, and overall
reports.
- The procedural flow includes:
- Input validation (e.g., leave dates must not overlap).
- Access control via decorators like `@login_required` and custom
permissions.
- Logic separation using Django's MVC pattern (Models for DB, Views for
logic, Templates for UI).
5.4 User Interface Design
- The frontend uses **Bootstrap 5** for a responsive layout.
- Interfaces include:
- **Login Page**: Clean form with username and password.
- **Dashboard**: Custom views for employees, managers, and admins.
- **Leave Form**: Includes date selectors, leave type dropdown, and
reason textarea.
- **Leave Calendar**: A monthly view to see all leave statuses.
- **Attendance Page**: Mark daily presence with one-click status
update.
- All forms include proper validation and alerts for success/error
messages.
### UI Design
Forms for login, leave application, approval, dashboards
6. Programme Code
All code files will be appended in the annexure with full comments, indentation, and
modular structure.
7. Testing
### Test Case Examples
Apply leave with valid data → Leave pending
Manager approves leave → Leave approved
Invalid date range → Error message
### Debugging
- Fixed leave overlap bugs
- Improved UI responsiveness
8. Input and Output Screens
Screenshots of login, leave apply, admin dashboard, attendance (to be attached).
9. Implementation of Security
- Django’s @login_required
- Password hashing
- CSRF protection
- HTTPS for production
10. Limitations
- No biometric integration
- No email/SMS notifications
11. Future Application of the Project
- Email alerts
- Mobile version
- Biometric attendance integration
12. Bibliography
- Django Documentation
- Bootstrap Docs
- W3Schools & Stack Overflow
- [Link]
- Lucidchart, [Link]