// Web app for the {{projectName}} project — the AUTH surface. Every page is a // static form that POSTs to the sibling api's `/auth/*` routes (contributed by // @voltro/plugin-auth), which set the HttpOnly session cookie. Other apps in the // project (dashboard, cms, portal) link here for sign-in so the auth UI lives in // ONE place. // // The `apis` mapping names the api whose `/auth/*` routes the dev/serve pipeline // proxies to and whose typed rpc surface codegen pulls (this template calls the // HTTP routes directly, so it needs no rpc — the mapping is what wires the proxy // + the shared origin the session cookie is set on). import { defineEnv, envVar } from '@voltro/env' export const env = defineEnv({ VOLTRO_PUBLIC_APP_NAME: envVar.string({ access: 'public', default: '{{capProjectName}}' }), // Where a successful sign-in lands when the request carries no safelisted // `?next=`. Public (build-time) — never a secret in the browser bundle. VOLTRO_PUBLIC_AUTH_HOME: envVar.string({ access: 'public', default: '/' }), }) export default { type: 'web' as const, name: '{{capProjectName}}{{capAppName}}', port: {{port}}, theme: 'system' as const, env, // Bilingual by default (cookie-driven , SSR too). locales: ['en', 'de'] as const, defaultLocale: 'en' as const, // The api whose /auth/* routes back these pages. Pair with the api-auth // template: `voltro init my-app --api=api-auth --web=frontend-auth`. apis: { auth: { package: '@{{projectName}}/api' }, }, }