A platsbank for Jamboree26. Users can post requests (tasks needing people) to coordinate staffing.
Built with TanStack Start (React + Nitro SSR), Material-UI, and Prisma.
- Node.js + pnpm
- Docker (for local PostgreSQL)
-
Install dependencies
pnpm install
-
Start the database
docker-compose up -d
-
Configure environment
Create a
.env.localfile:cp .env.local.template .env.local
-
Run migrations and seed
pnpm db:migrate pnpm db:seed
-
Start the dev server
pnpm dev
The app runs at http://localhost:3000.
Authentication requires the j26-cli dev tool. Install it globally:
npm install -g @scouterna/j26-cliThen get a .j26.local.yaml config file from an admin and place it in the project root before starting the dev server.
To start the local dev environment, run j26 up. You'll then be able to access the application att https://local.j26.se/platsbank
| Command | Description |
|---|---|
pnpm db:migrate |
Run pending migrations |
pnpm db:generate |
Regenerate Prisma client after schema changes |
pnpm db:push |
Push schema to DB without a migration file |
pnpm db:studio |
Open Prisma Studio |
pnpm db:seed |
Seed the database |
After editing prisma/schema.prisma, always run pnpm db:generate.
The UI is internationalized with Tolgee. Languages: sv, en, uk, nl (default sv). The active language is read from the j26-language cookie set by the shell.
- Components call
useTranslate("platsbank")and render text viat("key", "<Swedish default>", params?). - Swedish is embedded in the code as the default value of every
t()call, so the app always renders correct Swedish during SSR/first paint and degrades gracefully if Tolgee never loads. Other languages overlay once Tolgee data is fetched.
- In the component, use
t("section.key", "Svensk text", params?). - Add the same key to
scripts/translations.jsonwith itssv+envalues. - Run
pnpm tolgee:push.
The Swedish in scripts/translations.json must match the in-code default — keep them in sync.
scripts/push-translations.mjs (wired as pnpm tolgee:push) upserts every key with its sv + en values. It only sets those two languages, so machine-translated uk/nl are left untouched. Safe to re-run.
pnpm tolgee:push --dry-run # print all keys, no network
pnpm tolgee:push --check # validate credentials only (1 request)
pnpm tolgee:push # upload sv + enRequires J26_PUBLIC_TOLGEE_API_URL, J26_PUBLIC_TOLGEE_PROJECT_ID, and a write token in TOLGEE_API_KEY (a Project API Key with scopes keys.create + translations.edit, or a Personal Access Token) in .env.local.
The J26_PUBLIC_ prefix means the value is exposed to the client bundle (see envPrefix in vite.config.ts).
| Variable | Scope | Purpose |
|---|---|---|
J26_PUBLIC_TOLGEE_BACKEND_FETCH_PREFIX |
client | Static translation export URL used in production. |
J26_PUBLIC_TOLGEE_API_URL |
client | Tolgee instance URL (dev live fetch + push script). |
J26_PUBLIC_TOLGEE_PROJECT_ID |
client | Tolgee project id. |
J26_PUBLIC_TOLGEE_API_KEY |
client | Optional. Enables dev-mode live fetch + in-context editing. Bundled to client — use a low-scope key. |
TOLGEE_API_KEY |
server | Write token for the push script (preferred over the public key). Never bundled. |
To see non-Swedish languages in dev, set J26_PUBLIC_TOLGEE_API_KEY; Tolgee then fetches live from the API and you get in-context editing (alt-click a string).
pnpm build # Production build
pnpm test # Run tests (Vitest)
pnpm lint # Lint with Biome
pnpm format # Format with Biome
pnpm check # Lint + format combined