Guidelines for AI agents and collaborators working on BackupForge.
BackupForge is a self-hosted monorepo for managing Convex backups with a Go backend, short-lived Docker runners, SQLite, S3/MinIO storage, and a TanStack Start frontend.
apps/backend Go API server, backup runner, migrations, Docker files, scripts
apps/frontend TanStack Start app, React UI, API client, tests
Folder-specific rules live in:
apps/backend/AGENTS.mdapps/frontend/AGENTS.md
When editing inside an app, follow the local file first, then this root file.
- Backend: Go, chi, GORM, SQLite, Docker SDK, S3-compatible storage, SSE.
- Frontend: TanStack Start, React, TypeScript, TanStack Query, Tailwind CSS, Biome, Vitest.
- JavaScript package manager: pnpm only.
From the repository root:
pnpm run frontend:dev
pnpm run frontend:build
pnpm run frontend:test
pnpm run frontend:check
pnpm run backend:dev
pnpm run backend:server
pnpm run backend:test
pnpm run backend:buildBackend helpers:
cd apps/backend
pnpm run minio
pnpm run compose
go test ./...Frontend helpers:
cd apps/frontend
pnpm run dev
pnpm run build
pnpm run test
pnpm run check- Keep one Node lockfile at the root:
pnpm-lock.yaml. - Do not mix frontend code into
apps/backendor Go code intoapps/frontend. - Document new environment variables in the relevant app README or
.env.example. - If an API contract changes, update backend and frontend code in the same change.
- Do not commit
node_modules, local SQLite databases, binaries, backup artifacts, build output, or secrets. - Prefer root scripts as wrappers; each app remains the source of truth for its own commands.
- Keep BackupForge self-hosted.
- SQLite is the backend source of truth. Do not introduce PostgreSQL unless explicitly requested.
- Do not use Convex as this app's backend.
- Do not switch to Kubernetes unless explicitly requested.
- Do not add endpoints that execute arbitrary shell commands.
- Do not allow arbitrary Docker images from the UI.
- Do not mount
/var/run/docker.sockin runners. - Do not run privileged containers.
- Do not log secrets or return complete secrets to the frontend.
- Do not store permanent signed download URLs.