Timetracker for Assembly Employees


Overview

Timetracker was developed as an internal application to streamline the clock-in and clock-out process for assembly line employees. The tool ensured accurate payroll calculations and offered managers an intuitive dashboard to oversee employee hours and payroll data. This effort replaced manual methods, improving efficiency and satisfaction for employees and management.


Project Highlights

Impact

Tech Stack

Key Features


Problem Statement

Assembly line employees faced challenges with manual clock-in and clock-out systems, including:

  1. Inefficient time tracking, leading to delays and inaccuracies in payroll.
  1. Lack of a centralized system for managers to oversee employee hours and approve payments.

Timetracker aimed to address these issues by automating the process with a user-friendly interface.


Solution Overview

The solution provided a streamlined badge-based clock-in system integrated with a secure API. Key features included:

  1. Automated Time Tracking: Employees could simply scan their badges to clock in or out, reducing time and errors.
  1. Managerial Tools: A dashboard offered managers real-time updates on employee hours, payroll status, and insights to improve workflow.
  1. Iterative Design Process: Regular feedback from non-technical users shaped the interface to be intuitive and accessible.

Table of contents


System Architecture

The Timetracker system was designed with a modular architecture to ensure scalability, security, and seamless integration across all components. Each layer of the architecture played a critical role in automating workflows and enhancing user experience.

Sequence Diagram for employee clock-in

Backend


Frontend


Database


Integration & Middleware


Deployment


System Workflow

Workflow Flowchart for Timetracker

Employee Clock-In/Out:

  • Employees scan their badges using a connected device.
  • The frontend sends an API request to the backend to record the timestamp.
  • The backend updates the SQL Server database in real time.

Managerial Oversight:

  • Managers access the dashboard through a secure login.
  • Real-time data on employee hours and payroll is displayed, enabling quick decisions and approvals.

Payroll Generation:

  • Batch processing tools compile employee hours into payroll-ready reports.
  • Managers approve the reports, which are stored for future audits.


API Documentation

The Timetracker APIs provide secure endpoints for employee time tracking, payroll management, and administrative actions.

Endpoints Overview

MethodEndpointDescription
POST/api/clock-inRecords a clock-in or clock-out event.
GET/api/employeeRetrieves details for an employee.
GET/api/employeesFetches all employees and their statuses.
POST/api/payrollGenerates a payroll summary.
PUT/api/updateUpdates employee details.

Authentication

All endpoints require token-based authentication. Tokens are included in the Authorization header as a Bearer token.

Example:

Authorization: Bearer <your-token>

1. POST /api/clock-in

Description:

Logs a clock-in or clock-out event for an employee.

Headers:

Request Body:

{
  "employee_id": "12345",
  "timestamp": "2024-11-29T10:30:00Z",
  "action": "clock-in"
}

Response:

{
  "status": "success",
  "message": "Clock-in recorded successfully."
}

Error Codes:


2. GET /api/employee

Description:

Retrieves details for a specific employee.

Headers:

Query Parameters:

Example Request:

GET /api/employee?employee_id=12345

Response:

{
  "employee_id": "12345",
  "name": "John Doe",
  "status": "clocked-in",
  "last_clock_in": "2024-11-29T10:30:00Z"
}

Error Codes:


3. GET /api/employees

Description:

Fetches a list of all employees and their statuses.

Headers:

Response:

[
  {
    "employee_id": "12345",
    "name": "John Doe",
    "status": "clocked-in"
  },
  {
    "employee_id": "67890",
    "name": "Jane Smith",
    "status": "clocked-out"
  }
]

Error Codes:


4. POST /api/payroll

Description:

Generates a payroll summary for all employees.

Headers:

Request Body:

{
  "start_date": "2024-11-01",
  "end_date": "2024-11-30"
}

Response:

{
  "status": "success",
  "payroll_summary": [
    {
      "employee_id": "12345",
      "total_hours": 160,
      "pay": 3200
    },
    {
      "employee_id": "67890",
      "total_hours": 120,
      "pay": 2400
    }
  ]
}

Error Codes:


5. PUT /api/update

Description:

Updates details of an employee, such as their name or status.

Headers:

Request Body:

{
  "employee_id": "12345",
  "name": "Johnathan Doe",
  "status": "active"
}

Response:

{
  "status": "success",
  "message": "Employee details updated."
}

Error Codes:


User Documentation

The Timetracker system offers two primary interfaces: one for employees and another for managers. This documentation provides a guide for using the key features of the system.

For Employees

Purpose: To clock in and clock out of work easily using a badge-scanning system.

Steps to Clock In/Out

  1. Scan Badge:
    • Use the badge scanner placed at your workstation or designated area.
  1. Confirm Action:
    • Tap the confirmation button on the screen to complete the clock-in or clock-out action.
    • The system will display a success message once the action is recorded.

Troubleshooting:


For Managers

Purpose: To oversee employee work hours, approve payroll, and manage team attendance.

Accessing the Dashboard

  1. Log In:
    • Navigate to the secure portal at [internal URL].
    • Enter your credentials and complete multi-factor authentication (if enabled).
  1. View Employee Statuses:
    • The dashboard displays a real-time list of all employees, their clock-in statuses, and hours worked.
    • Use the search bar to locate specific employees by name or ID.

Managing Payroll

  1. Generate Payroll Summary:
    • Go to the "Payroll" tab in the dashboard.
    • Select the date range for the payroll period.
    • Click “Generate” to review the hours worked and corresponding pay for each employee.
  1. Approve Payroll:
    • Review the summary and click “Approve” to finalize payroll.
    • The system saves the summary for future audits.

Editing Employee Details

  1. Navigate to the Employee Tab:
    • Find the employee you wish to update in the dashboard.
  1. Edit Information:
    • Click on the employee record and update their details (e.g., name, status).
    • Save the changes to apply them instantly.

Common Scenarios

1. Approving Late Clock-Ins

2. Generating Reports for Multiple Employees

3. Resolving Badge Issues


Frequently Asked Questions (FAQ)

Q: What if I forget to clock in or out?

A: Inform your manager, who can manually adjust the time in the system.

Q: How secure is my data?

A: All data is encrypted and accessible only through role-based access controls.

Q: Can I access my work hours?

A: Employees can request their clock-in/out history from their manager.


Maintenance Guide

This guide outlines the best practices and steps for maintaining the Timetracker for Assembly Employees system to ensure reliability, performance, and security.


1. Regular Maintenance Tasks

1.1 Database Maintenance

1.2 Frontend Maintenance

1.3 Backend Maintenance

1.4 CI/CD Pipeline


2. System Monitoring

2.1 Logs

2.2 Uptime Monitoring


3. Troubleshooting

3.1 Common Issues

3.2 Escalation Process

  1. Identify and document the issue with detailed logs.
  1. Escalate unresolved issues to the development team or vendor with all relevant details.

4. Security Best Practices


5. Update & Upgrade Procedures

5.1 Frontend Upgrades

  1. Clone the production codebase into a staging environment.
  1. Update AngularJS and Material UI to the latest stable versions.
  1. Test all UI functionalities and APIs in staging before deploying to production.

5.2 Backend Updates

  1. Apply Python Flask and dependency updates in a staging environment.
  1. Run regression tests to validate API functionality.
  1. Deploy updates during off-peak hours to minimize disruptions.

5.3 Database Migration

  1. Export the database schema and data as a backup.
  1. Test schema changes or updates in a staging environment.
  1. Apply the migration script to production during maintenance windows.

6. Documentation Updates


Future Enhancements

  1. Mobile Accessibility
    • Develop a mobile application to allow employees and managers to use the system on their smartphones.
    • Enable push notifications for reminders, such as clocking in or reviewing payroll.
  1. Analytics and Reporting
    • Introduce advanced analytics to provide insights into employee attendance trends and productivity.
    • Generate customizable reports for managers to streamline decision-making.
  1. Integration with HR Systems
    • Integrate with existing HR software for seamless data transfer and enhanced payroll processing.
    • Automate benefits calculations based on attendance data.
  1. Biometric Support
    • Enhance badge scanning with biometric options like fingerprint or facial recognition for added security.
  1. Multilingual Support
    • Provide language options to cater to a diverse workforce and improve accessibility.

Lessons Learned

  1. User-Centric Design Matters
    • Iterative feedback from employees and managers was crucial for refining the interface. Simple and intuitive design significantly improved adoption rates.
  1. Communication with Non-Technical Users
    • Explaining technical concepts and gathering feedback from non-technical users was a challenge but helped bridge the gap between user needs and technical implementation.
  1. Importance of Scalability
    • While the system was designed for the current scale, planning for future growth could have been emphasized more during initial development.
  1. Team Collaboration
    • Dividing work between frontend, backend, and database development fostered efficiency, but regular sync-ups were necessary to align on dependencies and integrations.
  1. Proactive Maintenance Planning
    • Incorporating automated testing and robust CI/CD pipelines from the beginning helped streamline deployments and minimize downtime.

Impact


Conclusion

The Timetracker for Assembly Employees project successfully addressed critical operational challenges by automating attendance tracking and payroll management. By simplifying workflows and providing a user-friendly interface, the system significantly improved efficiency and satisfaction among employees and managers.

This project demonstrated the power of user-centric design, iterative feedback, and cross-functional collaboration in creating impactful solutions. Future enhancements such as mobile accessibility and integration with HR systems will further expand the system's capabilities, ensuring it continues to deliver value as the organization grows.