// Backend app for the {{projectName}} project. Read by `voltro dev`. // // This template demonstrates the framework's DURABLE-EXECUTION surface // end-to-end on an order-fulfillment domain. Everything is wired so it // boots with ZERO infra: // // - `store: 'memory'` — no docker, no postgres. Workflows run with // the in-process durable engine (replay within one process; swap to // `'postgres'` for multi-instance cluster runners). Memory resets on // every supervised restart, which is fine for kicking the tyres. // // What's in here (all auto-discovered by file convention — nothing is // registered in this config): // // mutations/orders.place.mutation.* — insert an order, then emit a // post-commit `order.placed` event // triggers/order.placed.trigger.tsx — event → start `orders.fulfill` // workflows/order.fulfill.workflow.* — step → sleep → awaitSignal // (human approval) → step // mutations/orders.approve.mutation.* — inject the `approval` signal // schedules/nightlyReport.cron.tsx — nightly summary cron // subscribers/orderChanges.subscribe.ts— react to every orders write // aggregates/orderStats.aggregate.ts — materialized per-status roll-up // startup/warm.startup.tsx — run-once boot hook // // Add your own env below; it's validated at boot (fail-fast) and read on // the server via `serverEnv` / `getSecret` from '@voltro/env/server'. import { defineEnv, envVar } from '@voltro/env' 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: '{{capProjectName}}{{capAppName}}', store: 'memory' as const, env, }