The Payroll Management System (PMS) is a robust solution designed to automate and streamline payroll processes, including:
- Employee leave tracking
- Salary computation
- Tax management
- Payslip generation
The system leverages modern technologies to ensure efficient payroll management while maintaining compliance with tax regulations and labor laws. Built with React.js for the frontend, Flask for the backend, and MySQL for the database, this project is designed to deliver a seamless user experience.
- Multi-role Authentication: Separate portals for 🧑💼 employees and 🧑💻 administrators.
- Secure Access: Password hashing and session management.
- Profile Management: Allows users to update and manage their profiles.
- Dashboard:
- Visualize payroll data with graphs and analytics.
- Employee Management:
- Add, update, and delete employee records.
- Maintain a history of employment changes.
- Payroll Calculation:
- Automated computation of salaries, bonuses, and deductions.
- Real-time updates to the payroll database.
- Tax Management:
- Compute tax deductions based on customizable conditions.
- Leave Management:
- Track and manage employee leave requests.
- Payslip Generation:
- Generate payslips in PDF format for employees.
- Dashboard:
- View payroll details and updates.
- Profile Management:
- Edit and manage personal profile information.
- Payslip Download:
- Download 🧾 payslips once generated by the admin.
- Leave Application:
- Apply for leaves directly through the portal.
- React.js (with ⚡ Vite)
- Axios
- CSS
- Flask
- SQLAlchemy
- Flask-CORS
- MySQL
- Python 3.8+
- Install required dependencies:
pip install flask sqlalchemy pymysql flask-cors mysql-connector-python reportlab
- Node.js 14+ and npm or yarn
- MySQL server installed and configured.
git clone <repository_url>
- Navigate to the backend directory:
cd backend
- Configure the MySQL database in
config.py
:ReplaceSQLALCHEMY_DATABASE_URI = 'mysql+pymysql://<username>:<password>@localhost/payroll_management'
<username>
,<password>
, andpayroll_management
with your database credentials and database name. - Start the Flask server:
flask run
- Navigate to the frontend directory:
cd frontend
- Install dependencies:
npm install
- Start the React development server:
npm start
app.py
: Main Flask application.routes/
: Contains API route definitions.models/
: SQLAlchemy models for the database.utils/
: Utility functions and services.
src/pages
: Components for various application views.Admin/
: Pages for the admin portal.Employee/
: Pages for the employee portal.
src/styles
: CSS files for styling.
- Login:
/api/login
(POST) - Logout:
/api/logout
(POST)
- Dashboard Data:
/api/employee/dashboard
(GET) - Profile Management:
- Fetch Profile:
/api/employee/profile
(GET) - Update Profile:
/api/employee/profile
(PUT)
- Fetch Profile:
- Leave Management:
- Apply for Leave:
/api/employee/apply_leave
(POST) - View Leave History:
/api/employee/leave_history
(GET)
- Apply for Leave:
- Dashboard Data:
/api/admin/dashboard
(GET) - Employee Management:
- Fetch Employees:
/api/admin/employees
(GET) - Add Employee:
/api/employees
(POST) - Delete Employee:
/api/employees/<employee_id>
(DELETE)
- Fetch Employees:
- Payroll Management:
- Fetch Payroll Data:
/api/payroll
(GET) - Generate Payslip:
/api/payroll/generate_payslip/<payroll_id>
(POST) - Download Payslip:
/api/payslip/download/<payslip_id>
(GET)
- Fetch Payroll Data:
- Leave Management:
- Fetch Leave Requests:
/api/leaves
(GET) - Update Leave Status:
/api/leaves/update_status
(POST)
- Fetch Leave Requests:
This project is licensed under the MIT License.
Contributions are welcome! Follow these steps to contribute:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Commit your changes and push the branch.
- Submit a pull request.
Thank you for exploring the Payroll Management System! 🎉 Feel free to reach out with any questions or feedback.