Scroll

Back to work

02/06 · Internal system

Attendance

Time clock for home-office staff with no application server: every business rule lives in PostgreSQL, punches are append-only and the client holds no write privilege on any table.

In production
attendance.internal

345

SQL assertions

27

migrations

12,990

lines of SQL

02
Role
Sole authorDatabase design
Stack
PostgreSQLPL/pgSQLpg_cronSupabaseDocker
Launch
2026
Status
In production
  • 345

    SQL assertions

  • 27

    migrations

  • 12,990

    lines of SQL

  • 0

    app servers

About the project

The server sets the timestamp. Punches are append-only, enforced by trigger, and corrected only through auditable adjustments.

Every rule lives in SECURITY DEFINER functions across 27 migrations. An alert engine with seven kinds runs on pg_cron and is idempotent by unique key.

345 SQL assertions run against a disposable Dockerised database in CI on every push.