# {{projectName}} / {{appName}}

Voltro backend scaffold (template: **api-backend-mariadb**) — MariaDB-backed
with binlog CDC real-time + file storage.

## Boot

```bash
pnpm install                # at the repo root
cp .env.example .env        # then adjust DB_URL / secrets
# Start MariaDB (binlog ROW) + MinIO — see the compose baseline.
pnpm --filter @{{projectName}}/{{appName}} dev
# → http://localhost:4000
# → ws://localhost:4000/ws
```

## What's in here

| File | Role |
|---|---|
| `app.config.ts`            | `store: 'mariadb'` (binlog CDC) + the storage plugin. |
| `.env.example`             | DB / storage / AI / auth / cluster env. |
| `database/schema.ts`       | One example table (`notes`) with the `tenant()` mixin. |
| `queries/notes.*`          | Streaming subscription example. |
| `mutations/notes.create.*` | Tenant-guarded mutation example. |

`store: 'mariadb'` fans subscriptions out across replicas via the binary
log — the DB must run with `binlog_format=ROW` + `binlog_row_image=FULL`
and a replication user (the compose baseline sets this up). Drop more
`*.query.ts` + `*.query.server.ts`, `*.mutation.ts` + `*.mutation.server.ts`, `*.action.ts` + `*.action.server.ts`, or `*.stream.ts` + `*.stream.server.ts`, `*.workflow.tsx`, or `*.cron.tsx` files
anywhere in this tree — discovery is by file convention.
