// Web app for the {{projectName}} project. Read by `voltro dev` / `voltro start`. // // `port` is allocated by `voltro create-project` / `voltro add-app` from // the project's portRange (in project.json). Hard-pinned per app; the // dev server fails fast on conflicts instead of silently incrementing. import { defineEnv, envVar } from '@voltro/env' // Typed PUBLIC environment — public vars are validated + baked into the browser // bundle at build time and read via `publicEnv` from '@voltro/env/public' // (typed, autocompleted). NEVER put a secret here (it would ship to every // visitor) — declare secrets on the api instead. Run `voltro env` for the manifest. export const env = defineEnv({ VOLTRO_PUBLIC_APP_NAME: envVar.string({ access: 'public', default: '{{capProjectName}}' }), }) export default { type: 'web' as const, name: '{{capProjectName}}{{capAppName}}', port: {{port}}, env, // Bilingual by default. The framework auto-wires a cookie-driven // from these codes and loads the matching // `src/locales/.ts` catalog — so `` / `useT()` / // `useLocale()` work app-wide with no manual setup. The // in the layout writes the `voltro:locale` cookie + reloads. Grow the app to // more languages by adding a code here + a `src/locales/.ts`. locales: ['en', 'de'] as const, defaultLocale: 'en' as const, }