tracker
All repositories: gitoria
6.6 KB
# tracker.worldapi.orgThe new tracker: a Hybriel app that will track the TV shows (and later movies) the creatorfollows and watches. **`CONCEPT.md` (the creator's) is the source of truth** — read it first;nothing is built that it does not describe. Built step by step, one ticket per step(tracker.worldapi.org#1, #2, …).**Built so far — step 1, ticket #1**: the shell. Sign in with ident, an empty homepage(your identity + a sign-out button), sign out. No shows, no data, no design carried overfrom the old app.Written in **Hybriel** on **hl:web**, same stack and conventions as `ident.worldapi.org`(vendored plugins/binary copied from there, see "Vendored Hybriel").## Run (dev, Loreana)```bashcd /media/STORAGE/projects/tracker.worldapi.orgTRACKER_PORT=8700 setsid nohup ./bin/hybriel project.hl > server.log 2>&1 < /dev/null & echo $! > server.pid# stop: kill $(cat server.pid)```* Config (env; the real environment outranks nothing here — there is no `.env` reader inproject.hl, unlike ident's SMTP settings — set these in the shell or `docker-compose.yml`):| Variable | Default | ||---|---|---|| `TRACKER_PORT` | 45008 | || `TRACKER_URL` | `http://127.0.0.1:<port>` | this app's own origin — the ident login button's `return=` is built from it || `IDENT_URL` | `https://ident.worldapi.org` | || `TRACKER_KEY` / `TRACKER_SECRET` | `''` | this app's API key + secret, from ident's `/apps` (register once, origin = `TRACKER_URL`) — **not set yet on Byrodin**: the first deploy (architect) registers the app in the live ident and puts these in `.env` next to `docker-compose.yml`, exactly like ident's own `.env` holds its SMTP settings || `TRACKER_WATCH` | on | `0` = no dev watcher (the container) || `HL_HOST` (or `HOST`) | 0.0.0.0 | interface to bind; `127.0.0.1` on Byrodin |Without `TRACKER_KEY`/`TRACKER_SECRET`, `/` still renders (signed out); `/login` answers aplain error page ("not registered with ident yet") instead of redirecting — so the app isnever a dead 500 while waiting for that one-time setup.## What it does (step 1)* **Login, exactly like calendar/notes**: ident only, no own passwords (ident's loginbutton flow, ident.worldapi.org README "How apps use ident"). `GET /login` sends thebrowser to `<ident>/login?key=…&return=<this app>/callback`; `/callback` exchanges theone-time code for the identity's **short id** (`POST <ident>/api/exchange` — nothing else:ident does not hand over a display name yet, that is ident#23 done / ident#11 on hold) andsigns this app's OWN session in (`session.user = { identity }`, this app's own cookie`trackersid` — cookies ignore ports, an own name keeps it apart from ident's `identsid` onthe same dev host, hybriel#10/#17). `POST /logout` (the homepage's "Sign out" button) endsonly this app's session; ident's own login is untouched.* **The empty homepage** (`/`, `components/home.hl`): signed out — a "Sign in with ident"link. Signed in — "Signed in as `<shortid>`" and "Sign out". Nothing else.* **No data at all**: no mpackdb table, no `storage/`. Step 2 (tracker.worldapi.org#2, onhold until the architect reopens it) brings the old tracker's data across.## Test```bashnode tests/browser.mjs # THE GATE: a real ident copy (own storage, own mail sink —# no live ident, no real mail) + a real headless Chrome:# signed out -> sign in (email code, skip the optional-names# form, choose the one identity) -> homepage shows the identity# + sign out -> signed out again -> a reload stays signed out.# 13 checks. Own servers :8703 (ident dev copy) / :8704 (this# app); own storage .scratch/browser-gate; Chrome on 8705-8709.ps -eo pid,args | grep [h]l-browser-tier # must print nothing afterwards```## Deploy (Byrodin)Target: `/CONTAINERS/projects/tracker.worldapi.org` on Byrodin, container`tracker.worldapi.org` (`docker-compose.yml`: debian:12-slim, host network,`HL_HOST=127.0.0.1`, `TRACKER_PORT=45008`, `TRACKER_WATCH=0`, the folder mounted at`/home/tracker`, `./bin/hybriel project.hl`), public https://tracker.worldapi.org/ vianginx (TLS ends there; no baseUrl/tls in the app, like ident/notes).* **First deploy: done by the architect** (folder, nginx vhost with WebSocket Upgradeheaders, cert, DNS, **and registering this app in the live ident** — `/apps` → name +origin `https://tracker.worldapi.org` → the API key + secret go into `.env` next to`docker-compose.yml`, `TRACKER_KEY=… TRACKER_SECRET=…`).* **Later: `./deploy.sh`** on Loreana, in this folder: runs the gate (refuses on a failure;`--skip-tests` skips it LOUDLY), rsyncs the code to`[email protected]:/CONTAINERS/projects/tracker.worldapi.org` (never `storage/`,`.sessions/`, `.env`, `.scratch/`, `server.*`, logs — the preview is checked for them; no`--delete`), `docker compose up -d && docker compose restart` over `ssh -F /dev/null`,then waits for https://tracker.worldapi.org/ to answer 200.* `./deploy.sh --dry-run` = the gate + `rsync -n` + the commands it would run (no restart, noURL check). `--target DIR|HOST:DIR` and `--url URL` point it elsewhere (tested against alocal directory, see STATUS.md).## DataNone yet (step 1 has no shows, no per-user data — only this app's own framework session,which holds the signed-in identity's short id and nothing else). Step 2 brings the oldtracker's mpackdb tables (mongo export → mpackdb, new ids, references re-pointed).## Files| File | ||---|---|| `CONCEPT.md` | the creator's concept — do not edit || `project.hl` | manifest: routes (`/login`, `/callback`, `/logout`, `/` component Home), the app's own session cookie || `components/home.hl` | `/`: the empty homepage, signed in / signed out || `components/main.hl` | the shell (header) || `styles.hl` | all CSS (imports the tokens from `shared/tokens.hl`; accent green `#4ec9b0`) || `shared/tokens.hl` | the WorldAPI tokens, vendored verbatim from `ident.worldapi.org/shared/tokens.hl` || `tests/browser.mjs` | the gate (above) || `tests/cdp.mjs`, `tests/ports.mjs` | the CDP browser driver, copied from `ident.worldapi.org/tests/` || `docker-compose.yml`, `Dockerfile`, `deploy.sh` | Byrodin container; the deploy from Loreana (section "Deploy") |## Vendored Hybriel`bin/hybriel` + `plugins/` copied verbatim from `ident.worldapi.org` (2026-09-27), sha256`9e5e95b33680eb68a016e9e48a76c9f92193fd2ffdbdf437c1aab1bda2731a0d` — hybriel master837fe120 (ident's mission 036), the newest vendored+gated build available locally. No localpatch. Re-vendor the same way: copy `bin/hybriel` + `plugins/` from a current worldapi app,run the gate.
Branches
- mainmain branch
Latest commits
- 3691e176tracker#1: empty tracker with the ident login (state of 2026-09-27)mre