Skip to content

Local-disk object store for development, swappable to S3 in production #330

Description

@codebestia

apps/backend/src/lib/storage.ts issues real S3 presigned URLs in production but falls back to fakeUrl() in development — a string-templated URL never backed by an actual file. Nothing exercises the upload/download flow end-to-end locally. Build a real local-filesystem-backed object store for development implementing the same surface as ObjectStore (putObject/getObject/deleteObject/getPresignedPutUrl/getPresignedGetUrl), backed by files under a gitignored local directory and served through a local Express route.

Acceptance criteria:

  • A local-disk object store implementation exists, matching ObjectStore's shape, storing bytes under a gitignored local directory
  • A local route serves GET/PUT against stored bytes so presigned URLs issued in development are real, working URLs
  • lib/storage.ts's isProduction() branch selects local-disk in dev/test and real S3 in production
  • No Docker/MinIO required — the local store is pure Node fs
  • fileCleanup.ts's hard-delete pass works correctly against the local store in dev

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions