// Web app for the {{projectName}} project — an AUTO-ADMIN back-office. // // It points at an api (below) and, at runtime, reads that api's capability map // (`/_voltro/inspect/manifest`) to discover every entity + the procedures that // read/write it — then renders a live, reactive table + form per entity. Point // it at ANY Voltro api and it adapts; there's no per-entity code to write (but // the page code IS yours to edit — see src/pages/admin/). import { defineEnv, envVar } from '@voltro/env' export const env = defineEnv({ VOLTRO_PUBLIC_APP_NAME: envVar.string({ access: 'public', default: '{{capProjectName}} Admin' }), }) export default { type: 'web' as const, name: '{{capProjectName}}{{capAppName}}', port: {{port}}, // Follow the visitor's OS theme, set before first paint (no flash). theme: 'system' as const, 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, // The api this admin introspects + binds to. The NAME ('app') is the lookup // key the hooks + components use (``). The `package` // resolves the sibling api in this project (scaffold it with // `--api=api-backend`); codegen pulls its typed rpc surface — INCLUDING the // __voltro.undo.* built-ins (when undo capture is on) the admin's undo bar uses. apis: { app: { package: '@{{projectName}}/api' }, }, }