Skip to content

Local development

LOCAL_MODE=1 swaps Firestore and Cloud Storage for an in-memory store and a local directory that speaks the same resumable-upload protocol. The full flow, encryption included, runs without any cloud account.

  • Go 1.26 or later
  • Node 24 or later
Terminal window
make dev

This starts the Go server on :8080 in local mode and Vite on :5173 with hot reload. Open http://localhost:5173. Vite proxies /api and /_local to Go.

Local mode: the browser talks to Vite, which proxies /api and /_local to the Go server running with an in-memory store and a local blob directory.

To run the production binary instead:

Terminal window
make build # → ./bin/file-vault, UI embedded
LOCAL_MODE=1 ./bin/file-vault # → http://localhost:8080
Command What it runs
make api-test Go tests with the race detector: the store suite and the HTTP handlers
make web-check svelte-check type checking
make web-test Encryption tests: round trips at record boundaries, and rejection of truncation, reordering, tampering and wrong keys
make test All three
make e2e Builds the binary, starts it in local mode, and runs a full encrypt, upload, finalize, download, decrypt round trip with the browser modules from Node

The store suite also runs against Firestore when FIRESTORE_EMULATOR_HOST is set:

Terminal window
gcloud emulators firestore start --host-port=localhost:8081 &
FIRESTORE_EMULATOR_HOST=localhost:8081 make api-test
api/ Go service
cmd/file-vault/ entrypoint
internal/server/ handlers, client IP, security headers, rate limits
internal/store/ Firestore and in-memory stores, shared test suite
internal/blob/ GCS and local-disk blob backends
internal/webui/ go:embed of the built UI
web/ SvelteKit UI, built statically
src/lib/crypto.ts encryption format
src/lib/transfer.ts chunked upload, streaming download and decrypt
terraform/ modules and environments
docs/ this site (Starlight)
cicd/ Workload Identity bootstrap script
Terminal window
cd docs && npm ci && npm run dev # → http://localhost:4321