A full-stack enterprise payroll dashboard engineered with a React frontend, Node.js/Express backend, and a secure MySQL database. This system allows administrators to manage employee records, calculate dynamic salary structures, and track monthly payroll disbursements.
- Frontend: React, Vite, Lucide-React (Icons), Custom CSS
- Backend: Node.js, Express.js
- Database: MySQL
- Security: Environment Variables (
dotenv) for secure credential management
- Role-Based UI: Dynamic routing and component rendering based on 'Admin' vs 'Employee' authentication state.
- RESTful API Engine: Custom backend endpoints to serve database queries to the frontend asynchronously.
- Dynamic Relational Database: Utilizes foreign keys and cascading deletes across
Department,Employee,SalaryStructure, andPayroll_Recordtables. - Advanced SQL Metrics: Leverages advanced
GROUP BYqueries to calculate total departmental liability in real-time.
Ensure you have MySQL running (locally or via Docker).
Execute the provided schema.sql script in your MySQL instance to build the tables and inject dummy data.
cd backend
npm installCreate a .env file in the backend directory with your database credentials:
DB_HOST=localhost
DB_PORT=3306
DB_USER=root
DB_PASSWORD=your_password
DB_NAME=PayrollSystem
PORT=3000Start the server: node server.js
cd frontend
npm install
npm run dev