Skip to content
Workforce · Engineering Showcase

Engineering case study

Enterprise Attendance & Workforce Management System

An attendance and workforce management platform developed to address real-world operational needs within a multi-location enterprise, covering attendance tracking, employee scheduling, HR operations and workflows for employees, store managers and HR.

My role
Full-Stack Software Developer & Product Engineer
  • Next.js
  • React
  • TypeScript
  • PostgreSQL
  • Prisma
  • Tailwind CSS
  • Vercel

At a glance

The problem

Attendance, scheduling and HR work for staff spread across many locations ran on terminals, spreadsheets and manual steps, and that data drives pay.

What I did

Full-stack design and delivery: requirements and planning, domain modelling, database, server and UI, automated testing and controlled releases, with human-led, AI-assisted development.
  • Multi-location operations

    Several locations, with staff working across them.

  • Enterprise employee management

    Profiles, employment status changes, documents, leave balances and payroll exports.

  • Multiple user roles

    Employees, store managers, area managers, HR and administrators, each with scoped access.

  • Production-oriented architecture

    Server-side authorization, reviewed migrations, automated tests and gated releases.

Business problem

Built around how multi-location operations actually work

Staff work shifts across locations, managers review attendance daily, and HR turns it all into payroll. Before this system, those steps were split across devices and spreadsheets.

Attendance tied to a terminal

The system was designed to replace fingerprint punch machines with a phone-based flow that carries location, store-code and photo evidence.

Staff move between locations

Employees cover shifts at other locations. Attendance, rosters and reports had to follow the person without double counting.

Fragmented HR workflows

Leave, rosters, employment changes and timesheets were handled in separate tools and spreadsheets, with HR re-entering the same information.

Data that drives pay

Attendance feeds payroll, so the system needed exception review, an audit trail and outputs that match the files payroll already used.

My role

Product-minded, full-stack ownership

The areas I worked across on the project, from requirements and planning to testing and controlled releases. It was not a solo effort.

Requirements analysis & technical planning
Clarified HR and operations requests into acceptance criteria and staged, reviewable delivery plans.
Product & system design
Designed the domain model for attendance, cross-location work, rosters, leave and employment changes.
Full-stack application development
Built server components, route handlers, domain services and mobile-first and desktop interfaces in TypeScript.
Database architecture
Evolved the PostgreSQL schema through reviewed migrations, using database constraints for key business invariants.
User experience improvements
Worked on the mobile-first employee and manager experience and a desktop design system for HR work.
Production troubleshooting
Investigated reported issues with read-only diagnostics before proposing changes.
Automated testing
Wrote unit, integration and regression tests, including tests that guard business rules and query counts.
Controlled release management
Prepared gated releases with preflight checks, migration verification and rollback plans.
AI-assisted software development
I used AI-assisted development tools to accelerate implementation, debugging, and testing while retaining responsibility for technical decisions, validation, and release approvals.

These statements describe my work on the project. They do not claim sole authorship of every requirement or design decision.

Core product capabilities

What the system does, and why it is built that way

Each capability lists the user problem, the solution and the engineering decisions behind it.

Verified mobile attendance

Problem. Shared fingerprint terminals tie attendance to one device per store and offer managers little context when a record looks wrong.

Solution. Employees clock in from their own phone. Each punch combines a location check against the store's radius, a rotating store QR code, and a selfie on clock-in.

Value. Employees get a fast phone-based flow; managers see why each punch was accepted.

  • The work location is resolved on the server from the scanned code, never from client input
  • Idempotent punch submission prevents duplicates on flaky mobile networks
  • Raw punch events are immutable; corrections are layered on top

Cross-location attendance

Problem. Staff regularly cover shifts at other locations, which breaks a one-employee-one-location model.

Solution. Any eligible employee can punch at any active location with a valid store code, while each working day is attributed to exactly one owning store for reporting.

Value. Managers stop handling manual exceptions for routine cover shifts; reports never double count.

  • Attendance eligibility is modelled separately from management permissions
  • A single, shared rule decides which store owns an employee-day
  • Historical events keep their actual location even after home-store changes

Position-based access control

Problem. Store managers, area managers and HR need different capabilities over different sets of stores.

Solution. Permissions are derived from an employee's position: a set of capability keys plus a data scope (self, assigned stores, or all stores), enforced on the server.

Value. Each role sees exactly what it needs; access changes take effect without code changes.

  • Capability-driven navigation so the UI and the server agree on what a user can do
  • Server-backed sessions that can be revoked
  • Record-level authorization for private files

Store shifts and weekly roster

Problem. Lateness and absence cannot be judged fairly without a schedule, and every store runs different shift patterns.

Solution. Managers define their own store shifts and build weekly rosters with breaks; attendance is evaluated against the roster when one exists.

Value. Managers plan in one place; late and early-leave flags are based on the real plan.

  • Rostered times are denormalized so editing a shift never rewrites past rosters
  • Store-by-store rollout behind a feature flag
  • Server-side checks that rostered staff actually work at the store

Leave management

Problem. Leave requests, balances and supporting documents were handled outside the system.

Solution. Employees request leave (including half days) with attachments; managers and HR review it, and a ledger tracks balances and replacement credits.

Value. HR gets one auditable record per request, including an exportable evidence PDF.

  • Ledger-based balances rather than mutable counters
  • Policy rules such as notice periods and backdating limits
  • Private, signature-checked document uploads served through an audited route

Employee lifecycle

Problem. Employees move from part-time to probation to permanent, sometimes with a new staff code, and HR often decides changes in advance.

Solution. HR records employment changes immediately or schedules them for a future date; a daily job applies due changes and the full history is retained.

Value. HR can plan transitions ahead of time without losing the employee's history.

  • At most one scheduled change per employee, enforced in the database
  • Staff codes are reserved at scheduling time and never reused
  • Optimistic concurrency on edits; each applied change runs in its own transaction

Payroll-ready Excel timesheets

Problem. HR rebuilt monthly timesheets by hand in spreadsheet layouts that payroll already relied on.

Solution. The system generates monthly workbooks for each location that follow the existing layouts, including leave placement, public holidays and left-early remarks.

Value. HR receives files in the format payroll already uses.

  • Pure, deterministic export functions tested against golden snapshots
  • Business-timezone day boundaries regardless of server timezone
  • Bounded query counts regardless of employee or day count

Auditability and review

Problem. Attendance and HR data drive pay, so every change needs to be explainable.

Solution. Automatic exception detection feeds a daily manager review; sensitive actions write audit records; login activity is recorded separately.

Value. Disputes can be answered from the record instead of from memory.

  • Exceptions reopen automatically if a resolved issue recurs
  • Manager-assisted punches are always marked, reasoned and auditable
  • Confidential fields are encrypted at the application layer

System architecture

A server-first web application on managed infrastructure

Server-rendered Next.js with typed data access to PostgreSQL. Files sit in private storage behind an authorized route, and access control is enforced on the server for every request.

Clients

Employee PWA

Mobile-first, installable, offline fallback

Manager & HR web app

Desktop work surface, responsive

Store code display

Rotating code shown at each location

Edge

Request proxy

Route-level role routing; every handler re-checks access

Application

Server-rendered pages

React Server Components

Route handlers

JSON APIs for punch, review, HR actions

Scheduled job

Daily employment-change apply

Domain services

Attendance & exceptions

Roster & leave

People & lifecycle

Access & audit

Data

PostgreSQL

Managed, pooled connections, constraints for invariants

Private object storage

Selfies and documents; served only via authorized route

Full architecture: auth, access control, data model and delivery

Methodology

Human-Led, AI-Assisted Engineering

I used AI-assisted development tools to accelerate implementation, debugging, and testing while retaining responsibility for technical decisions, validation, and release approvals. Not all of the code was written by hand.

  1. 01

    User requirements

    Requests from HR and operations, clarified into acceptance criteria.

  2. 02

    Technical planning

    Read-only investigation of the code and data, then a written plan for approval.

  3. 03

    AI-assisted implementation

    Coding assistants draft code and tests inside the approved scope.

  4. 04

    Human review

    I review proposed changes, question the reasoning, and rework or reject them where needed.

  5. 05

    Automated testing

    CI runs type checks, lint, build and integration suites on each pull request.

  6. 06

    Controlled deployment

    Explicit approval gates for merge, migrations and production release.

  7. 07

    User feedback

    Requests and reported issues from HR and operations feed the next iteration.

Evaluating output. AI-generated code is treated like a pull request from a new teammate: questioned and tested before it is accepted.

Protecting data. Production credentials stay out of AI tooling. Investigations start read-only, and data changes need explicit approval.

No AI in the product. The application has no AI-powered features. AI was used only in the development process.

User-centered product development

From operational requirements to design decisions

Examples of how operational requirements shaped technical and interface decisions.

Operational requirements and design decisions
RequirementDesign decision
Clocking in and out has to be quick at the start and end of a shiftKept the photo step on clock-in only, streamlined code scanning and image upload, and prepared the punch path in advance.
Real shifts do not always fit a single clock-in / clock-out pairAllowed multiple work sessions per day; a day completes when the date ends, not after one punch-out.
Employees record attendance on their phonesThe employee experience was designed for mobile devices, with attention to touch interactions, readability, and efficient attendance workflows.
Payroll depends on established spreadsheet layoutsGenerated workbooks follow those layouts instead of introducing a new format.
Roster edits are easy to lose when navigating awayAdded a confirmation before discarding edits and saved changes without a full page reload.
Announcements must stay available after they are openedCorrected the visibility rule for informational announcements and added regression tests for it.

Business impact

What the platform is designed to do

Qualitative descriptions only. No productivity, adoption, savings or usage figures are claimed.

  • Designed to centralize attendance tracking and workforce operations.
  • Supports employee, manager, and HR workflows across multiple locations.
  • Generates structured timesheets aligned with established operational requirements.
  • Preserves historical employee records through employment status changes.
  • Incorporates auditability, access control, and data integrity into core workflows.

About the developer · Contact

Yen Yee Tan

I'm a product-minded software developer passionate about solving real-world problems and improving user experiences through practical, reliable software.

I combine full-stack engineering, system design, and AI-assisted development to translate complex business requirements into user-centered applications.

Role
Full-Stack Software Developer & Product Engineer
Education
Computer Science, University of Utah
Open to
Software Engineer, Full-Stack Developer, Frontend Engineer, Application Developer, and AI Solutions Engineer opportunities.