Across the European Union, daily employee time tracking isn't optional. Under the EU Working Time Directive (and
rulings like CJEU Case C-55/18, or Spain's Article 34.9 of the Workers' Statute), employers must keep objective,
reliable, daily records of start times, breaks, and clock-outs — and retain them for 4+ years (5 years in Portugal) for labor inspections.
At the same time, European data protection authorities (AEPD in Spain, CNIL in France, CNPD in Portugal) have heavily restricted biometric fingerprint and facial wall terminals under GDPR when less intrusive methods exist.
When we built AsideTime, we wanted to solve both sides cleanly: zero biometric hardware, strict employee privacy, and real cryptographic proof that attendance history wasn't silently rewritten before an inspection.
Here are the key architectural decisions we made in Rust, PostgreSQL, and Kotlin — and the edge cases that actually mattered in production.
1. Making the Server the Single Source of Truth (Rust + ACID PostgreSQL)
Time-tracking bugs get ugly fast when shift rules, overtime thresholds, rest-period checks, or plan entitlements live in frontend state.
We built our transactional backend in Rust (Axum) backed by ACID PostgreSQL. Every critical rule is enforced server-side:
- Daily & weekly labor rules: automatic weekly shift scheduling checks legal limits (e.g., max 9h/day, 12h rest between shifts, 15-minute breaks after 6 consecutive hours, weekly rest) and flags manual overrides.
- Versioned rules with effective dates: changing paid-break policies, overtime thresholds, or full-time reference hours never rewrites historical workdays.
- Mandatory accountability on edits: managers cannot silently alter a punch. Any correction requires a reason, keeps the original punch visible, and lets the employee confirm or dispute it.
2. Tamper-Evident Audit Chains (SHA-256 + RFC 3161)
A plain audit_logs table doesn't prove much if someone with database access can run an UPDATE the night before a labor inspection.
To make history tamper-evident, we combined three layers:
Layer 1: Transactional SHA-256 Hash Chaining
Every punch, edit, and signed timesheet is hashed together with the previous chain head inside the same SQL transaction:
// Simplified conceptual flow inside the SQL transaction let payload_hash = sha256_canonical(&event_payload); let entry_hash = sha256_concat(&[previous_head_hash.as_bytes(), payload_hash.as_bytes()]); // Persist event + entry_hash atomically so concurrent writes cannot fork the chain When an auditor runs our integrity verification endpoint, it doesn't return a fake green checkmark — it explicitly classifies records as VERIFIED, LEGACY_UNVERIFIABLE (for pre-v2 historical rows), or BROKEN.
Layer 2: Employee-Held Monthly Signed PDFs
At the end of each month, employees review their hours and sign their monthly record. The generated PDF embeds the declaration, content hash, signature, and the company's chain state at signing time. Because each employee downloads and keeps their own PDF, every signed month acts as a distributed witness pinning prior history.
Layer 3: Daily External RFC 3161 Timestamp Anchoring
Once per day, the server hashes all company chain heads and submits the digest to an independent RFC 3161 Timestamping Authority (TSA). Anyone can verify the resulting .tsr token offline using standard openssl ts -verify without trusting our servers.
3. Privacy by Design: Zero Biometrics, Zero Off-Shift Tracking, Envelope Encryption
"Control without losing trust" has concrete engineering requirements:
- No biometrics anywhere: clock-ins happen via web (installable PWA), MV3 browser extensions (Chrome, Edge), a native Android app, or a shared tablet kiosk (PIN, RFID/NFC cards storing only a hash + last 4 chars, or rotating QR codes).
- Zero-location mode: companies can disable location completely — in that mode, no coordinates, SIM data, cell towers, or Wi-Fi info are requested or stored.
- AES-256-GCM + HSM envelope encryption: when geofencing is enabled, coordinates are captured only at clock-in (zero background tracking outside shifts) and encrypted using AES-256-GCM with a unique nonce per record and Authenticated Associated Data (AAD) bound to the company, worker, idempotency key, and key ID. Per-tenant keys are wrapped using OCI Vault HSM with
associatedDatatied totenant_id. - Strict portal isolation: managers and employees who also clock in use separate portals (
companyvsworker) with host-hashed__Host-HttpOnly,Secure,SameSite=Laxcookies so sessions can never bleed across contexts.
4. Offline Android Queues vs. Single-Use Rotating QR Codes
Field teams and basements lose connectivity, so our native Kotlin + Jetpack Compose Android app queues offline punches in a local Room SQLite database and syncs them automatically when the network returns — transparently displaying both capture time and server receipt time whenever they differ.
The tricky edge case: office QR codes.
On our shared tablet kiosk, we display a 30-second rotating QR code to confirm physical presence without biometrics. Each QR code is redeemed atomically inside the same transaction as the punch.
Because a rotating QR code expires in 30 seconds, we explicitly never queue QR punches offline. If the request fails due to connectivity, the app saves the punch without the QR token and informs the worker clearly instead of faking a valid QR scan later. Failing fast and honestly beats silent fallbacks every time.
Try It Without Signing Up
If you want to inspect the UX or test the compliance workflows without creating an account:
- Interactive clock-in demo & overview: AsideTime
- Free, no-signup European compliance tools (Excel/PDF timesheet generator, inspection checklist, calculators): AsideTime Free Tools
- Free forever for up to 2 users (1 admin + 1 employee), plus a 15-day full trial.
I'd love to hear from other engineers building audit-heavy SaaS in Rust or tackling GDPR/offline-sync edge cases — how are you handling tamper-evident logging or external timestamp anchoring in your stack?


