Asistente Judicial en Línea: an offline-first Flutter app for the courts

A mission-critical Flutter field app for Cuban judicial assistants — write-first SQLite cache + contract-first REST + checkpointed delta sync — so a day offline in low-connectivity zones still ends with zero data loss.

Client
Tribunal Supremo Popular (Cuban Judiciary)
Role
Project Lead — Mobile
Year
2025
Timeline
Multi-quarter engagement
Flutter Dart SQLite ERPNext / Frappe Python REST
Asistente Judicial en Línea: an offline-first Flutter app for the courts

Problem

The Cuban judiciary needed a field tool for judicial assistants who monitor the social reintegration of sanctioned individuals — presentations, controls, evaluations, family situation reports — and feed those observations back into a central ERPNext (Frappe) system at the Tribunal Supremo Popular.

The hard constraint was connectivity. Field workers operate across the entire country, including municipalities where mobile data is unreliable for hours or full days. A failed sync at the wrong moment can mean a missed control or a lost evaluation — and in this domain, missing data is not just inconvenient, it has legal consequences for the person being monitored. The system had to behave correctly with NO network, then heal itself when network returned, with zero loss.

Approach

I architected the mobile client as a local-first SQLite-backed Flutter app that treats the network as an enhancement, not a dependency. Every write — a presentation logged, an evaluation filled, a notification opened — commits to the local SQLite database first, before any network call. A background sync engine then reconciles with the ERPNext backend over REST when connectivity is available. Conflicts resolve via timestamped last-write-wins.

The non-obvious decision was the API contract, not the storage layer. I led a contract-first REST documentation effort with the backend team: versioned endpoints, explicit pagination, and delta-fetch semantics with checkpoint resume — so the sync queue could pick up exactly where it left off after a long disconnect, instead of re-syncing the entire dataset on every reconnect. That single design choice was what kept hours-long offline windows fully operational.

Loading diagram…
Write-first local SQLite + background sync queue with checkpointed delta fetch — the network is optional, never blocking

Outcome

Field workers can run a full day offline — log presentations, fill evaluations, record notifications — and the queue reconciles transparently the next time they reach signal. No data was lost in the months observed after rollout. The sync visualization (the screen above, paused at 30%) became a recognizable trust signal for the operators: they could see the queue draining and know nothing was stuck.

The contract-first API discipline reduced cross-team integration friction enough that a second mobile surface (an internal admin tool) was scaffolded against the same endpoints without a backend rewrite.

Most product fields and identifiers in the screenshots are blurred or test data — the production system is operated by the Tribunal Supremo Popular and is not publicly accessible.

Technologies used

Flutter Dart SQLite ERPNext / Frappe Python REST
Visuals

Screens

Keep exploring

More work

Linkeum Wallet: a multi-currency fintech wallet in 30 days
Fintech · 30 days · 2 engineers

Linkeum Wallet: a multi-currency fintech wallet in 30 days

Shipped a production fintech wallet in 30 days with a 2-engineer team — multi-currency, KYC, 2FA, real-time notifications. Built on Nest.js + Next.js Server Actions over a Turborepo monorepo.

Nest.js Next.js Turborepo PostgreSQL
Read the case study
A fuel and cooking-gas marketplace for Cuba, with QR pickup
Fuel & Gas · Web + Android · External integration

A fuel and cooking-gas marketplace for Cuba, with QR pickup

Muévete y Cocina turns the daily scramble for fuel and cooking gas in Cuba into an order-ahead flow: browse nearby service centers and live prices, reserve litres or a gas cylinder, pay, and pick up against a QR. Since the team white-labelled it, the same codebase reaches customers under two selling brands, Mercaful and Gasolero. I proposed and built its offline-first Flutter courier app end to end, shipped heavily on the customer web app alongside the company's frontend lead and a designer, and over time took my work into the backend too: delivery evidence, access control, and per-brand legal documents.

Flutter React Router Vite TypeScript
Read the case study
AI News Intelligence — n8n agent over FastAPI + Redis + SvelteKit
Side project · n8n · Agent · RAG

AI News Intelligence — n8n agent over FastAPI + Redis + SvelteKit

Personal side project: an AI agent that orchestrates news data via n8n, serves it through a FastAPI + Redis cache layer, and talks to users through a SvelteKit chat UI. Whole stack containerized with Docker Compose for one-command deploy.

FastAPI Python Redis Docker
Read the case study