All projects
Full StackJun 2026

Alcovia

Offline-first study app with two-device sync

The problem

Students study on more than one device and often without internet. Progress made offline on one device must merge cleanly with the other — without trusting device clocks and without double-counting rewards.

How it works

  1. 01Device A / B (offline)
  2. 02Local Lamport clock
  3. 03/sync API
  4. 04SQLite + n8n webhook

What I built

Highlights

Deterministic convergence

Higher Lamport clock wins, with device ID as a tie-break, so both devices always end in the same state.

Safe retries

Each focus session has a UUID checked against a processed-sessions table, so retries never double-reward.

Trade-offs written down

CRDTs were considered and rejected as overkill for toggling statuses; known failure modes are documented.

Stack

TypeScriptExpoZustandExpressSQLiten8n
Next case study
SkillSwap