Skip to content

Case file 06 · Road safety

MANEJO COMENTADO

An offline-first platform that turns every commentary-driving course into auditable evidence: audio, GPS, photos, scoring and reports.

  • Kotlin
  • Jetpack Compose
  • Room
  • WorkManager
  • SvelteKit
  • NestJS

The challenge

A commentary-driving course happens inside a vehicle, often with unreliable coverage, and joins road safety with identity, voice, location, photographs, signatures and scoring. The challenge was not to produce another certificate, but to turn a one-time field session into evidence that can withstand an audit without distracting the instructor or exposing sensitive data.

Manejo Comentado product identity with an illuminated road and GPS route
The public product identity states the contract clearly: auditable evidence, with or without signal.

The approach

I designed the Android experience as an offline-first state machine backed by Room, WorkManager and protected device storage. A contract-first NestJS API receives immutable evidence, recalculates the score and sends discrepancies to human review; SvelteKit then brings audio, GPS, photographs and events together for review, issuance and limited public verification.

Key decisions

  1. Model the session as an explicit state machine and retain the original evidence separately from every derived conclusion.
  2. Capture to Room first, encrypt sensitive material with Android Keystore, and synchronize idempotently by content fingerprint.
  3. Give the evidence link and the printed QR different powers: one opens authorized detail, the other only verifies authenticity.

Technical architecture

Full-stack architecture designed and built end to end by me.

  1. 01 Field application Kotlin · Compose · Room

    A recoverable state machine captures the complete session without connectivity.

  2. 02 Contract and domain OpenAPI · NestJS

    One contract joins the surfaces; the server enforces roles and recalculates results.

  3. 03 Evidence custody PostgreSQL · Hash-addressed files

    Original payloads, immutable files, hashes and versioned rules remain auditable.

  4. 04 Review and delivery SvelteKit · Mapbox · WaveSurfer

    The portal aligns route, sound and events before issuing a revocable report.

Modules

What the product is made of, as its own screens divide it.

  • 01 Field agenda

    Assigned sessions, offline packages and provisional enrolment when operations change.

  • 02 Consent & pre-operation

    Versioned consent, identity checks, signatures and the vehicle go/no-go decision.

  • 03 Guided road session

    Three phases with continuous audio, GPS, photos, hazards and scoring.

  • 04 Offline evidence

    Local-first capture, encrypted storage and resumable synchronization.

  • 05 Review room

    A synchronized timeline for audio, route, photographs, events and score changes.

  • 06 Issuance & verification

    Revocable reports plus a limited QR code that verifies printed authenticity.

  • 07 Client & administration portals

    Scheduling, accounts, templates and result-only access scoped to each company.

Before → after

  • Before

    A signed certificate with little proof behind it.

    After

    Audio, GPS, photos and decisions tied to one traceable session.

  • Before

    Field work blocked whenever coverage disappears.

    After

    The full session runs offline and synchronizes afterwards.

  • Before

    A field score accepted as the final truth.

    After

    Independent server recalculation and human resolution of discrepancies.

Technologies

  • Kotlin
  • Jetpack Compose
  • Room
  • WorkManager
  • SvelteKit
  • NestJS
  • PostgreSQL
  • OpenAPI

The wider toolkit

  • Hilt
  • CameraX
  • MediaRecorder
  • Fused Location
  • Android Keystore
  • Retrofit
  • Prisma
  • WebSockets
  • Mapbox
  • WaveSurfer
  • QRCode
  • Puppeteer
  • Argon2

Brand marks from Simple Icons; concepts without one are drawn in-house.

Project log

Sep 2026 → Sep 2026 · 1 active months

112 commits
1 repository
1 active months
Sep 2026 Busiest month: Sep 2026 · 112 commits Sep 2026
  • platform app · 112 commits Sep 2026 → Sep 2026

In the tree

  • 19 routes
  • 16 API controllers
  • 17 data models
  • 11 migrations
  • 31 test files
  • 126 native source files
  • 468 tracked files

Read from the local Git history on Oct 6, 2026. Aggregates only.

The outcome

The current build covers the technical journey from scheduling and Android capture to synchronization, web review, revocable issuance and public authenticity checks. The repository snapshot contains 103 commits, 28 web routes and handlers, and 30 test files across the native app, API and portal, while the product advances through internal beta.

Private codebase — this file shares the thinking, not the source.