CANCRIDOCS · v0.4
DOCS --:--:-- ET
cancri — live-portfolio-terminal: a glowing low-poly globe beside a live terminal dashboard with LIVE badge and mint/rose sparklines

a terminal you
leave open.

cancri is an access-gated, real-time web terminal that streams your own portfolio at cent-level latency. colour and motion carry information — direction, freshness, activity — never decoration. and the terminal always tells the truth about its own data: LIVE vs DELAYED is never hidden.

read-only · per-user · onboarding via Gemini · self-healing data layer that opens a PR, never auto-merges.

[ok] cancri // live-portfolio-terminal — online
[net] establishing socket → primary feed — handshake
[net] subscribing instruments · L1 quotes
[llm] gemini intake channel ready
[ok] freshness monitor armed · live/delayed
[ok] terminal ready
mounting workspace…

What it is

You describe your holdings in plain language (or drop a CSV / Excel), an LLM normalises them into a confirmed inventory, and a live data layer keeps the numbers moving — flashing mint up, rose down, with a sparkline that draws itself on every tick. It is read-only: no orders, no trading. Just the truth about your book, beautifully.

the machine proposes — you dispose. Nothing streams until you confirm your inventory. And the self-healing data layer opens a pull request when the upstream protocol changes — it never merges itself.

The principles

principlewhat it means
colour = meaningup is ▲ + in mint, down is ▼ − in rose. Direction is never colour-only.
freshness is honestLIVE (mint, calm breathing pulse) vs DELAYED (amber, off-beat) — by colour and rhythm and text.
honesty over blackoutwhen the primary feed dies, the dashboard doesn't go dark — it flips to the delayed fallback and says so.
secrets stay server-sidethe client only ever subscribes to normalised ticks. No source internals, no keys.
propose, don't disposethe LLM proposes an inventory; the self-heal proposes a PR. A human always confirms.

Architecture at a glance

Every architecture decision is recorded as a Structured MADR (ADR-0001 … ADR-0011). The deeper walkthrough lives on the maintaining page.

system map
browser (Firebase Hosting)  vanilla-TS terminal · single rAF loop · subscribes to ticks only
        │ reads /quotes,/feed (RTDB, client read-only)   │ callable · Auth + Firestore (the book)
        ▼                                                ▼
Realtime Database  /quotes/{isin} · /feed/status    Cloud Functions  normalize · confirm · logo (Gemini/Vertex, IAM)
        ▲ sole writer (Admin SDK)
Cloud Run: feed-engine (always-on)  FeedManager · SanityOracle · degradation FSM
        ├─ L&S (primary, real-time · ls-protocol break surface)
        └─ Yahoo (fallback ~15m · also the sanity oracle)
        ▲ when the undocumented L&S protocol changes…
Cloud Run Job: self-heal  Playwright captures frames + rendered price → replay finds the fix → reviewable PR (no auto-merge)

Where to next