1.4 KiB
1.4 KiB
@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
josefor 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 serverbuild— production buildpreview— preview a production build locallycheck/check:watch—svelte-checktype checking
Structure
src/routes/(app)/calculator/— standards configs and datasetssrc/routes/(app)/apparel/— Printful/Webflow orders and productssrc/routes/(app)/activity/— activity eventssrc/routes/login/— login pagesrc/lib/api.ts— Eden client used to callapps/api