Skip to content

mule-codex/macaroni-hris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

HRIS – Human Resource Information System

Overview

This project is a basic Human Resource Information System (HRIS) built using Flask (Python), MariaDB, HTML, CSS and Javascript. It is designed for small to medium-sized organizations to manage employee records, attendance, leave, organizational structure, and access control. The system prioritizes clarity, simplicity, and direct database-backed workflows over abstractions or external frameworks.

Technology Stack

  • Backend: Python (Flask)
  • Database: MariaDB
  • Frontend: HTML (Jinja2 templates)
  • Authentication: Flask sessions + password hashing
  • Architecture: Monolithic Flask application

Core Features

1. Employee Master Data

  • Central employee registry
  • Personal and employment details
  • Employment status tracking
  • CRUD operations for employee records

2. Time & Attendance

  • Daily clock-in and clock-out records
  • Attendance status tracking (present, absent, late)
  • Employee-level attendance history

3. Leave Management

  • Leave types (annual, sick, unpaid)
  • Leave balances per employee
  • Leave request and approval workflow
  • Manager-based approvals

4. Roles & Organizational Structure

  • Job roles and departments
  • Reporting hierarchy (manager–subordinate relationships)
  • Ability to determine “who reports to whom”

5. Access & Security

  • User authentication (login/logout)
  • Role-based access control:
    • Admin
    • HR
    • Manager
    • Employee
  • Password hashing
  • Route-level access restrictions

Project Structure

hris/ │ ├── app.py # Application entry point ├── config.py # Database and app configuration ├── requirements.txt # Python dependencies │ ├── database/ │ └── schema.sql # MariaDB table definitions │ ├── routes/ │ ├── auth.py # Authentication and sessions │ ├── employees.py # Employee master data │ ├── attendance.py # Time & attendance │ ├── leave.py # Leave management │ └── roles.py # Roles and reporting structure │ ├── templates/ │ ├── base.html │ ├── login.html │ ├── dashboard.html │ ├── employees/ │ ├── attendance/ │ └── leave/ │ └── static/ └── css/

Database Design

The system uses a relational schema in MariaDB with foreign key relationships. Core tables include:

  • users
  • employees
  • roles
  • departments
  • attendance_records
  • leave_types
  • leave_requests
  • reporting_structure All tables use primary keys and enforce referential integrity.

Setup Instructions

1. Clone the Repository

git clone https://github.com/mule-codex/macaroni-hris.git cd hris

2. Install Dependencies

pip install -r requirements.txt

3. Configure Database

  • Create a MariaDB database.
  • Update database credentials in config.py.
  • Run the schema:

mysql -u username -p database_name < database/schema.sql

5. Run the Application

python app.py Access the system at: http://127.0.0.1:5000

Authentication & Authorization

  • Passwords are stored as hashed values.
  • Flask sessions are used for authentication.
  • Access to routes is restricted based on user roles.
  • Employees can only access their own data.
  • Managers can approve leave for their subordinates.
  • HR and Admin have elevated privileges.

Assumptions

  • Single-organization deployment
  • No payroll processing
  • No external integrations
  • Minimal frontend styling
  • Local or private network usage

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors