2026-10-13 19:04:36 +03:30
2026-10-12 23:20:56 +03:30
2026-10-13 19:04:36 +03:30
2026-10-12 23:20:56 +03:30
2026-10-12 23:20:56 +03:30
2026-10-12 23:20:56 +03:30
2026-10-12 23:20:56 +03:30
2026-10-12 23:20:56 +03:30
2026-10-12 23:20:56 +03:30
2026-10-13 19:04:36 +03:30
2026-10-13 00:25:42 +03:30
2026-10-13 00:25:42 +03:30
2026-10-12 23:20:56 +03:30
2026-10-12 23:20:56 +03:30
2026-10-12 23:20:56 +03:30
2026-10-12 23:20:56 +03:30
2026-10-12 23:20:56 +03:30
2026-10-12 23:20:56 +03:30
2026-10-12 23:20:56 +03:30
2026-10-12 23:20:56 +03:30
2026-10-12 23:20:56 +03:30
2026-10-12 23:20:56 +03:30
2026-10-12 23:20:56 +03:30
2026-10-12 23:20:56 +03:30
2026-10-13 19:04:36 +03:30
2026-10-12 23:20:56 +03:30
2026-10-12 23:20:56 +03:30

Siphoned Guild Vault

Persian RTL Albion Online guild ledger. Public read access; ChatGPT-authenticated admin write access restricted by the server-side ADMIN_EMAIL runtime secret. The supplied 17 transactions are the initial immutable ledger baseline; subsequent imports are stored in D1 and merged with that baseline on every read.

Run

npm run dev for local preview, node --test lib/ledger.test.mjs for ledger tests, npm run db:generate for schema migrations, npm run build for production.

Apply the generated SQL to local D1 before previewing the ledger API. Production migrations are deployed through Sites. Configure ADMIN_EMAIL in the hosted environment before deployment. The local starter simulates ChatGPT as seedy@sites.test; grant that email only in an ignored local environment file when testing the admin workflow locally. Never configure it as the production administrator.

Data rules

Paste the tab-separated Albion export with Date, Player, Reason, Amount headers. Imports accept up to 2,000 records, reject the entire import if any row is invalid, and use an atomic D1 batch with INSERT OR IGNORE. Identity is the exact game timestamp, case-insensitive player name, reason, and integer amount. Genuine indistinguishable rows cannot be differentiated because the game export supplies no transaction ID. Different amounts, timestamps, players, or reasons remain distinct. No timezone conversion is applied to game timestamps.

Balances are net amounts in the supplied history, without any inferred opening balance. Minimum readiness balance is 10. Rank is net balance, not total deposits. Import writes require authenticated administrator identity and same-origin requests. Public responses have no cache so balances update on refresh.

Live social previews

/api/share-image generates a 1600×1200 PNG server-side from D1 and the baseline using the bundled next/og renderer. It shows balance, deposits/withdrawals, low-balance count, top eight members, eight members needing a refill and their required top-ups, the four most recent transactions, and the latest game timestamp. Both the image and ledger API bypass application caching. Root metadata reads the same data and adds a content-derived revision to the image URL. The internal image revision changes for backdated imports too; duplicates leave it unchanged. Shared page links contain only the Unix timestamp (?t=...), without the internal revision. The header's sharing button adds the current Unix time in seconds as t to the clean page URL, then copies the URL. Root metadata propagates the same timestamp to the image URL, allowing a fresh Discord unfurl even if ledger data has not changed. If clipboard access is unavailable, a selectable URL is shown. Discord controls its own cache: embeds already posted are not guaranteed to refresh automatically. The image endpoint always reads current data, including when requested using an older revision query.

The live card uses bundled OFL-licensed Vazirmatn regular/bold fonts. Persian labels are shaped into presentation forms for Satori, with explicit column ordering so player names and numbers retain their correct order. Persian numbers and dates use Persian digits; game timestamps are not converted to another timezone. The card edition is included in revisioned share links to invalidate earlier English previews.

Energy palette and icon

The primary color is cyan-blue (#56d3ff) over deep navy (#080f18). The vector vial in lib/energy-art.mjs is shared by the hero, brand, live card, SVG/ICO/PNG favicon and Apple touch icon. It follows the cyan energy, dark metal bands and brass cap visible in the Siphoned Energy item reference: https://www.albiondatabase.com/items/siphoned-energy (icon: https://assets.albiondatabase.com/icons/items/UNIQUE_GVGTOKEN_GENERIC.png). Run node scripts/generate-favicon.mjs after changing the vector. Warning/debt colors remain amber/red to communicate balance status.

S
Description
Your guild’s energy, ranked. Track contributions, settle balances, and fuel the next victory.
Readme
1.3 MiB
0 Stars 1 Watchers 0 Forks
Languages
TypeScript 85.4%
JavaScript 10.3%
Shell 2.4%
HTML 1.9%