Dough Git

clove/system

README.md

back to tree

Doughmination System

A real-time plural system tracker for the Doughmination System — current fronters, system members, and switching patterns. Member data lives in this site's own API and D1 database, so pages render fresh on every request.

Tech stack

  • SvelteKit (Svelte 5)
  • Plain CSS, shared with doughmination.gay
  • Its own API (Hono, D1, R2) at /api/plural, with a small typed client in src/lib/api.ts and a live socket
  • Deployed to Cloudflare Workers via @sveltejs/adapter-cloudflare

Read API data as JPCL

Data GET endpoints under /api/plural return JPCL text by default. Add ?format=json for JSON or ?format=yml for YAML. Use &format=json or &format=yml when the URL already has query parameters.

The JPCL responses for /members, /switches, and /users wrap their arrays under the corresponding members, switches, and users keys. Those routes return bare arrays in JSON and YAML. In JavaScript, parse JPCL with loads from jpcl-lang/core.

Local development

bun install
bun run dev

Runs the Vite dev server at http://localhost:5173.

To preview in the real Workers runtime (closer to production):

bun run preview

Deploy

bun run deploy

This runs vite build and then wrangler deploy. Worker config lives in wrangler.jsonc. Member pages (/[member_id]) are server-rendered on demand so Discord embeds and live data stay current with no rebuild; signed-in pages (/user, /admin, /owner) render in the browser, since the API token lives in localStorage.

Scripts

ScriptDescription
bun run devVite dev server
bun run buildProduction build for Workers
bun run previewBuild + serve in the local Workers runtime
bun run deployBuild + deploy to Cloudflare Workers
bun run checksvelte-check type checking