Delivered remotely for a business based in Dubai, United Arab Emirates. Names withheld by agreement.
Project Overview
Industry: Workforce Time & Attendance Management
Solution scope: A cross-platform mobile and web attendance platform built with Flutter, Dart, Node.js, Express, MongoDB, Redis, and Firebase to manage geofenced clock-ins, shift rostering, break compliance, exception approvals, and payroll-ready timesheets.
Context: Hospitality groups, logistics contractors, facility maintenance teams, and retail chains across Dubai manage dynamic, multi-site workforces operating across rotating shifts and dispersed job locations. Traditional wall-mounted biometric terminals cannot follow mobile technicians, while unguarded web check-ins invite buddy punching and inaccurate overtime claims. Delivering a tamper-resistant mobile attendance app paired with a live web scheduling console enforces fair, verifiable timekeeping across every work site.
Workforce Timekeeping Bottleneck
Location blind spots across mobile teams. Without automated boundary verification, supervisors cannot confirm whether field technicians arrived at an assigned client tower or clocked in remotely while still commuting.
Connectivity dead zones break rigid mobile apps. Employees working in basement mechanical rooms, construction sites, or remote desert depots lose cellular signal right at shift start, causing naïve online-only apps to drop punches and force manual HR corrections.
Complex shift patterns outgrow rigid spreadsheets. Split shifts, rotating weekly rest days, grace periods, and cross-midnight rosters require manual hour splitting before payroll teams can calculate regular versus overtime hours.
Delayed visibility into absenteeism. Operations leads often discover no-shows hours into a shift, scrambling to cover critical service posts after SLA windows have already been missed.
Architectural Strategy
Design the Flutter client offline-first. Mobile punches must succeed in zero-signal environments. Every clock-in, break start, and clock-out writes immediately to an encrypted local SQLite queue on the device, giving instant visual confirmation while synchronizing reliably in the background once network access returns.
Combine geospatial verification with anomaly flagging. Instead of hard-blocking legitimate employees during brief GPS drift, the Express API evaluates coordinates against MongoDB 2dsphere site geofences, device-binding tokens, and OS mock-location indicators—auto-approving clean punches and routing edge cases to an interactive supervisor exception queue.
Separate raw punch events from computed timesheets. Immutable raw punch documents preserve exact timestamps, coordinates, and device telemetry forever. A downstream Node.js calculation pipeline pairs punches against scheduled shift rules to derive payable hours, late minutes, and overtime buckets cleanly.
Trigger real-time operational nudges via Redis and Firebase. Shift start reminders, unclosed punch warnings, and supervisor no-show alerts run on low-overhead Redis deadline queues pushing targeted notifications through Firebase Cloud Messaging.
Core Capabilities
- Geofenced & biometric mobile clock-ins: Verifies employee presence within configurable circular or polygon site boundaries alongside native Face ID / fingerprint confirmation before recording shifts.
- Offline-resilient punch synchronization: Captures encrypted clock-ins offline with client UUIDs and monotonic clock drift checks, syncing automatically in sequence once signal restores.
- Multi-site shift & roster planner: Supports fixed, rotating, and split shifts via the web admin console, publishing schedules directly to employees' Flutter calendars.
- Automated exception & overtime workflow: Flags early departures, missed clock-outs, out-of-zone punches, and unscheduled overtime for one-click supervisor approval or rejection.
- Break & compliance monitoring: Tracks mandatory paid and unpaid rest intervals, alerting staff before break windows lapse.
- Payroll-ready timesheet exports: Aggregates approved regular, night-differential, weekend, and overtime hours per cost center into structured CSV or API exports for downstream payroll engines.
Technical Architecture
Flutter cross-platform mobile app. Written in Dart, the mobile client unifies iOS and Android interfaces, integrating native location services, local biometric authentication, camera QR-fallback scanning for fixed kiosks, and a persistent SQLite outbox.
Node.js & Express API layer. Stateless TypeScript services validate JWT sessions, enforce role permissions across supervisors and regional admins, perform rapid geofence checks, and ingest batched offline punch arrays idempotently.
MongoDB operational & geospatial store. Collections store site GeoJSON boundaries indexed with 2dsphere, flexible shift templates, raw immutable punch events, and computed daily timesheet summaries.
Redis & Firebase coordination. Redis caches active employee shift assignments for fast punch validation, enforces API rate limits, and schedules shift-start grace checks that trigger Firebase Cloud Messaging alerts.
Flow: Employee (Flutter mobile & local SQLite outbox) → Node.js / Express auth & geofence validator → MongoDB 2dsphere punch & roster store → Redis shift aggregation & deadline workers → Firebase push alerts & Web timesheet console
Technology Stack
| Category | Technology |
|---|---|
| Mobile framework | Flutter and Dart delivering unified iOS and Android clock-in apps with native sensor access |
| Backend runtime | Node.js with TypeScript executing non-blocking punch ingestion, roster APIs, and rule engines |
| API framework | Express handling JWT authentication, role guards, geofence checks, and web console endpoints |
| Primary database | MongoDB storing flexible shift templates, 2dsphere geofence polygons, and high-volume punch events |
| Local mobile storage | Encrypted SQLite queue on-device buffering offline clock-ins until connectivity returns |
| Queues & caching | Redis powering active shift caches, rate limiters, and background timesheet aggregation jobs |
| Push notifications | Firebase Cloud Messaging delivering shift reminders, late clock-in alerts, and approval updates |
| Web console | Responsive browser admin portal for live roster scheduling, exception review, and CSV/API payroll exports |
| Device security | On-device biometric prompt integration and mock-location telemetry screening |
| Observability | Structured punch audit logs, sync conflict metrics, and API latency monitoring |
Engineering Trade-offs & Solutions
| Challenge | Solution |
|---|---|
| Employees could alter device system clocks to fake on-time offline punches | Combined client timestamps with monotonic uptime deltas and flagged wide server-arrival skew for supervisor audit. |
| Harsh hard-blocking on slight GPS drift trapped legitimate workers outside entrances | Paired soft geofence tolerance rings with supervisor exception flagging and optional site QR-code fallback scans. |
| Replaying queued offline punches risked duplicate clock-in records on flaky networks | Attached client-generated UUID idempotency keys enforced by a unique MongoDB index on punch events. |
| Midnight-crossing shifts split hours awkwardly across two separate daily timesheets | Bound punches to explicit shift instance IDs so overnight work aggregates under one continuous shift record. |
| Morning shift-start traffic bursts stressed database roster lookups | Cached daily active site rosters and geofence polygons in Redis ahead of peak shift transition windows. |
| Buddy punching via shared credentials undermined mobile attendance integrity | Bound refresh tokens to hardware device identifiers, requiring admin re-verification when logging in on a new phone. |
Security & Reliability
Device binding and biometric gating. Accounts bind to registered mobile device signatures, preventing coworkers from logging into another employee's profile on a spare handset. Biometric verification triggers locally before each punch payload signs and queues.
Immutable audit trail on manual edits. When a supervisor adjusts a missed clock-out or approves an out-of-zone punch, MongoDB preserves the original raw mobile event alongside an audit sub-document recording the supervisor ID, reason code, and edit timestamp.
Strict role-based site visibility. Site managers inspect live attendance boards and approve overtime strictly for their assigned branches, while HR administrators oversee multi-region policies and payroll cutoffs.
Performance & Scale
Time-series indexing and read-optimized summaries. MongoDB compound indexes on (tenantId, employeeId, shiftDate) and (siteId, timestamp) keep live attendance boards and payroll period exports snappy even across years of multi-branch punch history.
Horizontal Node.js & Redis scaling. Stateless Express API pods scale seamlessly during morning and evening shift-change peaks while Redis coordinates background aggregation workers without blocking mobile clock-in acknowledgments.
Operational Outcomes
- Verifiable multi-site attendance: Operations leaders view real-time who-is-on-site boards backed by geofenced and device-bound mobile check-ins.
- Zero lost punches in low-signal zones: Offline SQLite queuing captures accurate timestamps regardless of basement or remote-site connectivity gaps.
- Faster exception resolution: Automated late, missing-punch, and overtime flags shrink payroll cutoff preparation to targeted supervisor reviews.
- Consistent cross-platform adoption: A single Flutter codebase delivers uniform performance and responsive workflows across employee iOS and Android devices.