The Pineleaf Employee Payroll System is a robust web application designed to streamline employee management and payroll processing for Pineleaf Estates. Built with React and TypeScript, it provides a secure and intuitive interface for managing employee data, processing salaries, and tracking transactions efficiently. 💼✨
- Employee Lifecycle Management: Seamlessly add new employees, view their comprehensive details, update existing information, and remove records as needed.
- Intuitive Dashboard Overview: Gain quick insights into key payroll metrics, including total employees, total salary paid, number of completed payments, and total estimated monthly salary.
- Streamlined Payroll Processing: Efficiently manage and initiate bulk salary payments for all included employees, with an option to include or exclude individual employees from the current payroll cycle.
- Secure Payment Verification: Utilize a 6-digit verification code for secure bulk payment initialization, ensuring authorized transactions.
- Comprehensive Transaction History: Access a detailed log of all payment transactions, with filtering capabilities by month and the option to export transaction data to CSV format.
- Bank Account Resolution: Integrate with Paystack to automatically verify bank account names during employee onboarding and updates, reducing errors.
- Dynamic Pagination: Navigate through large datasets of employees and transactions with efficient pagination controls.
- Responsive User Interface: Enjoy a consistent and user-friendly experience across various devices, from desktops to mobile phones.
- Modern Form Handling: Implement robust form validation and submission with Formik and Yup for a smooth user experience.
- Context-Based State Management: Manage user authentication and global application state effectively using React Context API.
| Technology | Category | Description |
|---|---|---|
| React | Frontend | A JavaScript library for building user interfaces. |
| TypeScript | Language | JavaScript with syntax for types. |
| Vite | Build Tool | Fast development server and build tool for modern web projects. |
| Tailwind CSS | Styling | A utility-first CSS framework for rapidly building custom designs. |
| Axios | API Client | Promise-based HTTP client for making API requests. |
| Formik | Form Library | Helps with building forms in React, handling state and validation. |
| Yup | Validation | Schema builder for value parsing and validation. |
| Framer Motion | Animation | A production-ready motion library for React. |
| Sonner | UI Feedback | An accessible and customizable toast library for React. |
| React Router DOM | Routing | Declarative routing for React applications. |
| Paystack | Payment API | Payment gateway integration for bank account resolution. |
This application provides a comprehensive suite of features for managing employee payroll. Below are detailed instructions on how to use its core functionalities.
Before running the application, ensure you have the following environment variables configured. Create a .env file in the project root and add them:
VITE_API_BASE_URL="[YOUR_BACKEND_API_URL]"
VITE_PAYSTACK_SECRET_KEY="[YOUR_PAYSTACK_SECRET_KEY]"
VITE_API_BASE_URL: The base URL of your backend API.VITE_PAYSTACK_SECRET_KEY: Your Paystack secret key for bank account verification.
- Navigate to the application's login page (typically the root URL
/). - Enter your
UsernameandPasswordin the respective fields. - Click the "Log in" button.
- Upon successful authentication, you will be redirected to the Dashboard.
- After logging in, the Dashboard
/overviewprovides a snapshot of your payroll system. - View key metrics such as
Total Employees,Total Salary Paid,No of completed payments, andTotal Estimated Salary. - The "Recent Transactions" section displays the latest payment activities. Click "View All" to navigate to the full transactions page.
- From the navigation menu, select "Add Employee" (path
/addemployee). - Fill in the required fields under "Personal Information", "Job Details", and "Payment Details".
- Personal Information: Includes first name, last name, email, phone number, gender, date of birth, country, state, and address.
- Job Details: Includes job title, department, company branch, employment type, and employment date.
- Payment Details: Select the
Bank Namefrom the dropdown. Enter theAccount Number(it should be 10 digits). TheAccount Namewill automatically resolve and populate if the details are valid. Enter theEstimate Payfor the employee.
- Click "Add Employee" to save the new employee's details. A success toast will confirm the addition.
- Navigate to the "Manage Employees" page (path
/managemployees). - Here, you'll see a paginated list of all registered employees.
- Search & Filter: Use the "Search employees..." input to filter the list by employee name. Use the dropdown to filter employees by their
Employment Type(Remote, On-site, Hybrid, or All). - Actions: For each employee, you can:
- View Details: Click the
MdRemoveRedEyeicon to open a modal displaying the employee's full profile. - Edit Details: Click the
MdModeEditOutlineicon to open a modal with editable fields for the employee. Make your changes and click "Update Details". - Delete Employee: Click the
MdDeleteicon to prompt a confirmation dialog. Confirm to permanently remove the employee record.
- View Details: Click the
- Go to the "Payments" page (path
/managepayments). - This page lists all employees and their payment status.
- Include/Exclude from Payroll: For each employee, click the
RiUserAddLine(to include) orRiUserMinusLine(to exclude) icon. A confirmation dialog will appear. Confirm your action to toggle the employee'spayingstatus.- An employee with a
payingstatus of 1 is included in the next bulk payroll run, while 0 means they are excluded.
- An employee with a
- Initiate Bulk Payment: Click the "Pay Staff" button at the top right.
- A confirmation dialog will appear. Confirm to proceed.
- You will then be prompted to enter a 6-digit verification code from your authenticator app for security.
- Upon successful verification, the payment process will be initialized for all employees currently included in the payroll.
- Access the "Transactions" page (path
/alltransactions). - This page displays a chronological list of all group transactions (monthly payroll runs).
- Filter by Month: Use the "Filter by month" dropdown to view transactions for a specific month and year.
- View Individual Transactions: For each monthly transaction group, click "View transaction" to expand and see a table of individual payments made to each employee for that month.
- Export Data: Click "Export as CSV" to download the individual transaction data for a specific month as a CSV file.
Connect with the author for more projects and collaborations!
- LinkedIn: Your LinkedIn Profile
- Twitter: @yourtwitterhandle
- Portfolio: Your Portfolio Website