tobogganSe connecter

starfleet-ui

Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.

NomDernier commitDate
.toboggan/Deploy: no jq in the job's image; trim the Render API keyil y a 2 sem.
.vscode/BATMAN!il y a 2 sem.
deploy/Deploy to Render from a toboggan workflowil y a 2 sem.
docs/Deploy: pin Render's configured image, then deploy itil y a 2 sem.
scripts/Deploy to Render from a toboggan workflowil y a 2 sem.
src/Resume the event stream; tell reused action names apartil y a 2 sem.
static/BATMAN!il y a 2 sem.
.containerignoreDeploy to Render from a toboggan workflowil y a 2 sem.
.gitignoreDeploy to Render from a toboggan workflowil y a 2 sem.
.npmrcBATMAN!il y a 2 sem.
bun.lockBATMAN!il y a 2 sem.
package.jsonDeploy to Render from a toboggan workflowil y a 2 sem.
README.mdAPI "captain" revision; fail gracefully when the API doesil y a 2 sem.
tsconfig.jsonBATMAN!il y a 2 sem.
vite.config.tsDeploy to Render from a toboggan workflowil y a 2 sem.
README.MD

starfleet-ui

A web UI for Starfleet — the space trading game you play over HTTP. Log in with your captain's API key (sfk_…) and fly the galaxy from your browser:

  • Map-first HUD: a live 3D galaxy and system map fills the screen, with panels on top. Select a ship, click a destination, preview the trip (time, fuel, route over jump lanes), and go.
  • Ship console: the API decides which actions are legal (HATEOAS); the UI gives them clear labels, hotkeys, input limits (cargo, credits, supply), cost estimates and dry-run previews, and explains why the rest are greyed out.
  • Guidance: per-ship hints ("fuel low — refuel here", "your iron is wanted at BB-2-B", "scan the derelict") and a trade helper that ranks cargo runs between known markets by profit per minute.
  • Live: the fleet rail, ETAs and captain's log update over SSE.
  • Contracts, postings, federation, factions, messages, codex: drawers over the map.

See docs/architecture.md for the structure, the assumptions the estimates rely on, and the 3D gotchas.

Stack

Bun · SvelteKit (SSR, server loads, cookie auth) · Svelte 5 runes · Tailwind CSS 4 · Threlte/Three.js · @sveltejs/adapter-bun

The game API sends no CORS headers, so all browser traffic goes through a same-origin proxy (/api/[...path]) that attaches your key from an httpOnly cookie. Server-side loads call the API directly.

Run it

bun install
bun run dev          # http://localhost:5173
bun run test         # unit tests (game logic)
bun run check        # type check

Production:

bun run build
bun run build/index.js   # or: bun ./build

Point at a local game server with STARFLEET_API_URL=http://127.0.0.1:8080.