Skip to content
ONDISTUDIOS
Case file · web · realtime

Project Halcyon

A live control room for a delivery fleet: every van on one screen, updated each second.

Fleet role: full build. One lead, four builders, two reviewers.

Stack: typescript · websocket · canvas · postgres

Sample project: there is no live site or repository behind these buttons yet.

Watch

Walkthrough

Video slot · a 1–2 minute walkthrough goes here

Now playing: a generated placeholder, drawn on your device. No file is loaded.

In plain words

What it does

  1. 01Dispatchers open one page and see where every van is right now.
  2. 02Late deliveries turn amber before the customer notices.
  3. 03It keeps working on a weak connection and catches up when the signal returns.
How it is built

Four layers

Pull the layers apart and pick one to see what it does and where its code lives.

  1. L1 · Interface

    The map and the tables the dispatcher sees. Only the rows on screen are drawn, so 2,000 vans scroll smoothly.

    apps/console/src/views
  2. L2 · Live channel

    One open connection per browser. The server sends only what changed since the last message.

    services/stream/src/delta.ts
  3. L3 · Rules engine

    Decides when a delivery counts as late. Rules are plain data, so support staff can change them.

    services/rules/src/engine.ts
  4. L4 · Storage

    Positions for the last 30 days, split by day so old data is dropped cheaply.

    infra/db/migrations
Honest part

What went wrong and how we fixed it

Incident 01

The map froze with 500 vans

symptom
Every position update redrew the whole map.
cause
The browser was asked to repaint 500 markers each second.
fix
Markers moved to one canvas layer and updates are grouped per frame.
frame time
before 240 ms
after 9 ms
Incident 02

Phones lost updates in tunnels

symptom
After a short signal loss the screen showed old positions.
cause
The client reconnected but never asked for what it missed.
fix
Each message carries a number; on reconnect the client asks for everything after its last one.
missed updates
before 31%
after 0%
Figures

By the numbers

41tasks shipped
118review rounds
1.2supdate delay
96%defects caught before merge

Sample figures: invented, like the rest of this project.

Keep going

Neighbouring projects

All projects