Files
2026-09-16 09:24:46 -04:00
..
2026-03-02 13:39:47 -05:00
2026-07-01 14:47:52 -04:00
2026-03-02 13:39:47 -05:00
2026-07-25 20:48:51 -04:00
2026-07-01 14:47:52 -04:00
2026-07-01 14:47:52 -04:00
2026-09-16 09:24:46 -04:00
2026-06-14 13:14:01 -04:00
2026-07-01 14:47:52 -04:00

@blade-and-brawn/portal

Admin portal for Blade & Brawn — manage the level calculator's standards configs/datasets, review apparel orders/products, and inspect activity events. Talks to apps/api via a typed @elysia/eden client.

Stack

  • SvelteKit 5 + Vite, deployed with svelte-adapter-bun
  • Tailwind 4 + daisyUI
  • jose for verifying the auth JWT cookie server-side

Environment variables

Variable Purpose
PUBLIC_API_URL Base URL of apps/api, used by the Eden client (src/lib/api.ts)
AUTH_SECRET JWT verification secret — must match AUTH_SECRET in apps/api

Auth

src/hooks.server.ts gates every route except /login behind a valid auth JWT cookie (issued by the API's /auth/login endpoint). Requests without one are redirected to /login.

Scripts

Run from the repo root as bun run dev:portal / bun run build:portal, or from this directory:

  • dev — Vite dev server
  • build — production build
  • preview — preview a production build locally
  • check / check:watch — svelte-check type checking

Structure

  • src/routes/(app)/calculator/ — standards configs and datasets
  • src/routes/(app)/apparel/ — Printful/Webflow orders and products
  • src/routes/(app)/activity/ — activity events
  • src/routes/login/ — login page
  • src/lib/api.ts — Eden client used to call apps/api