// 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 (file metadata + grants persist there). // // This variant ships file storage out of the box via // `@voltro/plugin-storage`. The `memory` provider keeps blobs in-process // (zero-config, dev only) — swap to `'s3'` / `'minio'` (+ S3_* env) for // real object storage, or `'filesystem'` for on-disk dev. // // - PUBLIC objects are served direct from the bucket/CDN (set // `cdnBaseUrl`); the app's serve route is only a dev fallback. // - PRIVATE objects are gated by an access policy (owner / roles / // groups / scopes / tenant / api-key / password / custom guard) PLUS // per-object grants you manage from the dashboard's Storage tab. import { defineEnv, envVar } from '@voltro/env' import { storagePlugin } from '@voltro/plugin-storage' // 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: [ storagePlugin({ provider: 'memory' }), ], }