Skip to content
Strata v1.2.6

Configuration

Strata runs on the same machine in two distinct modes. This page documents the differences.

DevelopmentProduction
Commandnpm run docker:devnpm run docker:prod
DB filebackend/.data/strata-dev.dbbackend/.data/strata.db
NODE_ENVdevelopmentproduction
Swagger UIhttp://localhost:3000/swaggerhttp://localhost:3000/swagger
Seed dataDemo assets seeded on first startReal personal data — never auto-seeded
Version badgeShows DEV badgeShows clean version number
Docker restart policynonealways
Reset DBnpm run docker:reset⚠️ Manual only — backup first!
Desktop app data dirbackend/.data/ (for tauri:dev)~/Library/Application Support/Strata/ (for .app builds)

In development mode (npm run docker:dev), you can access the app in two ways:

Access methodWhereWhen to use
Web browserhttp://localhost:4321Day-to-day dev — fast reload, browser devtools, React hot update
Tauri Desktop App./scripts/tauri-dev.shTest native macOS window/menu bar while sharing dev DB

Web browser mode uses backend on http://localhost:3000/api/v1 (Docker). tauri:dev runs sidecar backend on http://localhost:3456/api/v1, but both modes use the same backend/.data/strata-dev.db file.

In production mode (npm run docker:prod):

  • Use ./scripts/tauri-build.sh to build the Tauri .app bundle — the full native experience with your real data in ~/Library/Application Support/Strata/
  • Or use docker:prod if you want a headless server scenario (e.g., running on a NAS or cloud VM)
VariableDescriptionDev defaultProd default
NODE_ENVRuntime modedevelopmentproduction
DATABASE_URLPrisma connection stringfile:../backend/.data/strata-dev.dbfile:../backend/.data/strata.db
DB_FILEDB filename inside .data/strata-dev.dbstrata.db
PUBLIC_API_URLFrontend build-time API base URLhttp://localhost:3000/api/v1http://localhost:3000/api/v1
ENABLE_SWAGGERSet to false to disable Swagger UI(on by default)(on by default)

PUBLIC_API_URL is a build-time variable — it is baked into the Astro frontend at build time. Rebuilding the frontend image is required if the API URL changes.

The most important rule in Strata operations: dev and prod data never mix.

FilePurpose
backend/.data/strata-dev.dbDevelopment & demo data. Safe to wipe at any time.
backend/.data/strata.dbYour real personal financial data. Never auto-wiped.

Both files are git-ignored. The .data/ directory must exist before running Docker (it is created automatically if missing).

See ADR-003: Database Strategy for the full rationale.

When you run docker:reset or start with an empty dev DB, the seed script creates:

  • 6 demo assets (checking account, savings account, apartment, home loan, two vehicles)
  • Categories and tags reflecting a realistic European personal balance sheet
  • 4 historical portfolio snapshots (January–April 2025) so the net worth chart has data immediately

Seed data is idempotent — running it twice does not duplicate records.

Terminal window
npm run docker:reset

This deletes strata-dev.db, rebuilds Docker images with --no-cache, applies migrations, and re-seeds. Use this after migrations or when the dev DB state is unknown.

Your production data in strata.db is never touched by docker:reset.