This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Frosting is a Vue 3/Nuxt frontend (SPA mode, no SSR) for the Cupcake backend. It lets javaBin heroes (helter group) browse JavaZone conferences and sessions to find potential speakers for local events.
pnpm install # Install dependencies
pnpm dev # Start dev server on :3000 (proxies /api/* to :8080)
pnpm build # Production build (outputs to .output/)
pnpm preview # Preview production build
pnpm lint # ESLint check
pnpm lint:fix # ESLint auto-fix
pnpm format # Prettier formatThere are no unit tests in this project.
- OIDC Authorization Code flow via
oidc-client-ts - Tokens in browser
sessionStorage; cleared on browser close - Global auth middleware in
app/plugins/auth.client.tsprotects all routes heltergroup required for access; home page warns if user is not a member- Logic lives in
app/composables/useAuth.ts
app/composables/useApiFetch.ts— wraps$fetchwith Bearer token injection; on 401, silently refreshes token and retriesserver/middleware/proxy.ts— Nitro/h3 server middleware that transparently proxies/api/*,/login, and/refreshto the Cupcake backend, keeping everything same-origin to avoid CORS
- No Pinia — uses Nuxt
useState()composables app/composables/conferences.ts— conference listapp/composables/sessions.ts— sessions per conferenceapp/composables/useSessionData.ts— single session detailapp/composables/useUser.ts— current user from/api/me- Each composable uses
Pending/Loadedflags to prevent duplicate API calls
| Route | File | Purpose |
|---|---|---|
/ |
app/pages/index.vue |
Auth check, user info, role warning |
/conference/[conferenceId] |
app/pages/conference/[conferenceId]/index.vue |
Session browser with format/language/status filters |
/conference/[conferenceId]/session/[sessionId] |
app/pages/conference/[conferenceId]/session/[sessionId]/index.vue |
Session detail with full speaker info |
| Variable | Default | Description |
|---|---|---|
CUPCAKE_BACKEND |
http://127.0.0.1:8080 (dev) / https://cupcake-backend.java.no (prod) |
Backend URL for server-side proxy |
CUPCAKE_FRONTEND |
localhost |
Hostname for Vite allowedHosts |
NUXT_PUBLIC_OIDC_AUTHORITY |
https://auth.home.chrissearle.org/realms/HA12 |
Keycloak realm URL |
NUXT_PUBLIC_OIDC_CLIENT_ID |
cupcake-client |
OIDC client ID |
For local dev against the Cupcake backend with JWT_ENABLED=false, no OIDC config overrides are needed.
- TypeScript throughout;
anyis not acceptable - No semicolons (Prettier config)
- ESLint + Prettier enforced via pre-commit hooks (lint-staged + husky)
- All changes must pass
pnpm lintbefore merging (enforced inpr.yaml) - Use exact versions for dependencies