You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+24-16Lines changed: 24 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,19 +6,19 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
6
6
7
7
```bash
8
8
# Development
9
-
bun dev # Start dev server (Vite + Nitro)
9
+
pnpm run dev # Start dev server (Vite)
10
10
11
11
# Build
12
-
bun run build # Full production build
12
+
pnpm run build # Full production build
13
13
14
14
# Lint & Format (Biome)
15
-
bun run lint # Check linting
16
-
bun run format # Check formatting
17
-
bun run biome check # Lint + format check
18
-
bun run biome check --write # Auto-fix
15
+
pnpm run lint # Check linting
16
+
pnpm run format # Check formatting
17
+
pnpm run biome check # Lint + format check
18
+
pnpm run biome check --write # Auto-fix
19
19
20
20
# Type checking
21
-
bun run typecheck # Run tsc --noEmit
21
+
pnpm run typecheck # Run tsc --noEmit
22
22
```
23
23
24
24
There are no tests in this project.
@@ -33,11 +33,11 @@ Sub-apps are served at `/_services/<appname>` in production. The shell navigates
33
33
34
34
### Dynamic Route Configuration
35
35
36
-
Navigation items are not hardcoded — they are loaded at runtime from URLs listed in the `NITRO_PUBLIC_APP_CONFIGS` env var. Each config URL returns a JSON object validated with ArkType schemas (`src/dynamic-routes/app-config.ts`). Configs are parsed and merged in `src/dynamic-routes/dynamic-routes.ts`, then provided via React context (`src/dynamic-routes/dynamic-routes-context.tsx`). Bottom nav items are filtered to the IDs listed in `NITRO_PUBLIC_BOTTOM_NAV_ITEMS`.
36
+
Navigation items are not hardcoded — they are loaded at runtime from URLs listed in the `J26_PUBLIC_APP_CONFIGS` env var. Each config URL returns a JSON object validated with ArkType schemas (`src/dynamic-routes/app-config.ts`). Configs are parsed and merged in `src/dynamic-routes/dynamic-routes.ts`, then provided via React context (`src/dynamic-routes/dynamic-routes-context.tsx`). Bottom nav items are filtered to the IDs listed in `J26_PUBLIC_BOTTOM_NAV_ITEMS`.
37
37
38
38
### Runtime Config
39
39
40
-
The Nitro server exposes a `/api/config` endpoint (`server/routes/api/config.ts`) that reads `NITRO_PUBLIC_*` environment variables and returns them as JSON. The frontend loads this on startup (`src/config.tsx`) and makes the config available globally.
40
+
The frontend fetches `/config.json` on startup (`src/config.tsx`) and makes the config available globally. In dev, the `runtimeConfigPlugin` in `vite.config.ts` serves this from `J26_PUBLIC_*` env vars. In production, `docker/entrypoint.sh` generates the file before nginx starts.
41
41
42
42
### Authentication
43
43
@@ -64,17 +64,25 @@ Tolgee (`src/tolgee.tsx`) with backend fetch. Two namespaces: `app` (UI strings)
All runtime config vars use the `J26_PUBLIC_` prefix (e.g. `J26_PUBLIC_APP_CONFIGS`). The prefix is stripped and the remainder converted to camelCase when served as `/config.json`.
73
+
72
74
```
73
-
NITRO_PUBLIC_APP_CONFIGS # Comma-separated URLs to app config JSONs
74
-
NITRO_PUBLIC_BOTTOM_NAV_ITEMS # Comma-separated page IDs for bottom nav
Dev proxies (defined in `vite.config.ts`) forward `/auth/**`, `/notifications/**`, and `/_services/signupinfo/**` to `https://app.dev.j26.se/`.
88
+
In dev, these are read from `.env` by the `runtimeConfigPlugin`in `vite.config.ts` and served at `/config.json`. In production, `docker/entrypoint.sh` uses `jq` to write `/config.json` from the container environment before nginx starts.
0 commit comments