// Backend app for the {{projectName}} project. Read by `voltro dev`. // // `store: 'memory'` is the dev-friendly default — fast startup, no // docker. Switch to `'postgres'` when you wire `docker compose up` // from the repo root. // // This variant ships transactional email out of the box via // `@voltro/plugin-mail`. The `console` provider just logs what would be // sent (zero-config, no API key) — swap to `'resend'` / `'postmark'` / // `'sendgrid'` / `'smtp'` (+ the matching env var, e.g. RESEND_API_KEY) // for real delivery. Templates live in `emails/*.email.tsx`; preview + // send them from the dashboard's Mail tab. import { defineEnv, envVar } from '@voltro/env' import { mailPlugin } from '@voltro/plugin-mail' // Typed environment — declare your env once; it's validated at boot (fail-fast) // and read on the server via `serverEnv` / `getSecret` from '@voltro/env/server'. // `access` is required: 'public' (browser-safe) or 'secret' (server-only, never // bundled). Run `voltro env` to see the manifest. See the Environment docs. export const env = defineEnv({ LOG_LEVEL: envVar.enum(['debug', 'info', 'warn', 'error'], { access: 'public', default: 'info' }), // Add your own, e.g.: // STRIPE_KEY: envVar.string({ access: 'secret' }), }) export default { type: 'api' as const, name: '{{projectNamePascal}}{{appNamePascal}}', store: 'memory' as const, env, plugins: [ mailPlugin({ provider: 'console', from: '{{projectNamePascal}} ' }), ], }