Back
Tempo: Conflict-proof invoicing for tenant-safe time tracking
TEMPO TEMPO TEMPO

Tempo

Conflict-proof invoicing for tenant-safe time tracking

Tempo is a multi-workspace time tracking and billing system for teams that need to turn recorded work into defensible invoices without exposing another workspace’s data or charging for the same time twice.

ivanprtljaga/int-time-tracker

104

Hours

3.5

Weeks

282

Commits

Solo Developer

Role

Private
Tempo: Conflict-proof invoicing for tenant-safe time tracking
About

Tempo is a multi-workspace time tracking and billing system for teams that need to turn recorded work into defensible invoices without exposing another workspace’s data or charging for the same time twice. It supports timezone-aware timers, approvals, client and project reporting, and Clockify CSV migration, but its central workflow is transactional invoice drafting: eligible entries are linked before totals are calculated, unique conflict handling blocks concurrent double billing, and persisted snapshots produce immutable PDF invoices with annual numbering.

Built with TypeScript, Next.js, React, Drizzle ORM, and PostgreSQL, Tempo centralizes authorization through a resolveScope layer and surface-specific scope map rather than scattering user predicates across queries. Workspace membership roles remain separate from billing, payroll, and own-pay grants, allowing operational access without automatically disclosing rates or margins. PostgreSQL advisory locks serialize first-login workspace provisioning, while transactions and database constraints enforce billing invariants under retries and concurrent requests. Custom Argon2 credential verification uses timing equalization, namespaced persistent throttles, and JOSE session tokens tied to database session versions for credential-change revocation. A five-level billable and cost-rate resolver freezes source-tracked entry snapshots, preserving historical amounts while allowing controlled, lock-aware repricing of permitted records.

Enables teams and independent professionals to track work across clients and workspaces, control rate visibility, approve time, and turn billable records into reliable multi-currency invoices.

Key Features

Engineered transactional invoice drafting that links eligible entries before totaling, using unique conflict handling to prevent double-billing and persisted snapshots to render immutable PDFs.

Engineered multi-workspace authorization with surface-specific scope axes and PostgreSQL advisory locks, preventing cross-tenant exposure while serializing concurrent first-login workspace provisioning.

Implemented revocable HS256 credential sessions with Argon2 timing equalization, namespaced persistent throttles, and database session versions that invalidate every token after credential changes.

Built timezone-aware time-entry workflows with validated `(startedAt, id)` keyset cursors, local week/day grouping, and approval locks that preserve approved timesheet history.

Modeled independent billable and cost rates across a five-level assignment hierarchy, freezing source-tracked entry snapshots while permitting lock-aware historical repricing.

Added a Clockify CSV migration flow with browser-side dry-run previews and idempotent re-import safeguards, letting users move historical tracked time without duplicate entries.

Designed build-time white-label isolation that validates brand identity and excludes alternate routes, preventing cross-brand assets or marketing copy from reaching client bundles.

Built with
TypeScriptNext.jsReactDrizzle ORMZodTailwind CSSArgon2JOSELuxonReact PDFExcelJSPapa ParseResendPostgreSQL
Impact

Enables teams and independent professionals to track work across clients and workspaces, control rate visibility, approve time, and turn billable records into reliable multi-currency invoices.