// Web app for the {{projectName}} project — the customer BILLING + ACCOUNT // portal over the sibling `api-saas-starter` api. Slim by design: the screens a // customer visits to manage their account OUTSIDE the product — plan, payment // method, invoices, API keys, profile. // // - `/login` — static sign-in that POSTs to the api's `/auth/*`. // - The authed portal in the SILENT route group `src/pages/(portal)/`. Its // `layout.tsx` loader is the auth gate (asks the api's `session.me`, // RedirectErrors an anonymous visitor to /login). Its pages are // `renderMode: 'ssr'` so the gate runs per request. // // Billing is plugin-orchestrated: `billing.subscription` / `billing.invoices` // are live reads, and card management / plan changes go through the provider via // `billing.portalUrl` / `billing.changePlan` — the template never renders an // invoice or holds a card itself. import { defineEnv, envVar } from '@voltro/env' 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}}, theme: 'system' as const, env, locales: ['en', 'de'] as const, defaultLocale: 'en' as const, // The api this portal consumes. Pair with api-saas-starter: // `voltro init my-saas --api=api-saas-starter --web=frontend-portal`. // The hooks pass 'app' as the lookup key; codegen pulls its typed rpc surface // (session.me + the billing plugin's `billing.*`). apis: { app: { package: '@{{projectName}}/api' }, }, }