Task ID
PB-045
Owner Role
agent1
Depends On
Context
Document upload code expects a storage bucket (default project-documents), but fresh environments do not provision this bucket from repo-owned setup. Upload behavior can fail in new setups unless bucket creation is done manually.
Goal
Make storage bucket setup reproducible from repository migrations/setup so document upload works in fresh environments without manual Supabase dashboard steps.
Acceptance Criteria
Constraints
- Keep current upload API surface and storage key pattern unchanged.
- Do not expose private storage objects publicly.
- Align with Supabase migration/management approach already used in this repo.
Files to create or edit
- EDIT:
/ProjectBeacon/ProjectBeacon/supabase/migrations/* (new migration/setup step)
- EDIT:
/ProjectBeacon/ProjectBeacon/lib/storage/upload-project-document.ts
- EDIT:
/ProjectBeacon/ProjectBeacon/lib/env.ts
- EDIT:
/ProjectBeacon/ProjectBeacon/README.md
- EDIT:
/ProjectBeacon/ProjectBeacon/HANDOFF.md
Expected output / interface
Fresh repo setup consistently provisions usable document storage so project file uploads work without manual infra patching.
Blocking Issues
Task ID
PB-045Owner Role
agent1Depends On
Context
Document upload code expects a storage bucket (default
project-documents), but fresh environments do not provision this bucket from repo-owned setup. Upload behavior can fail in new setups unless bucket creation is done manually.Goal
Make storage bucket setup reproducible from repository migrations/setup so document upload works in fresh environments without manual Supabase dashboard steps.
Acceptance Criteria
project-documentsby default)./api/projects/:projectId/documents.Constraints
Files to create or edit
/ProjectBeacon/ProjectBeacon/supabase/migrations/*(new migration/setup step)/ProjectBeacon/ProjectBeacon/lib/storage/upload-project-document.ts/ProjectBeacon/ProjectBeacon/lib/env.ts/ProjectBeacon/ProjectBeacon/README.md/ProjectBeacon/ProjectBeacon/HANDOFF.mdExpected output / interface
Fresh repo setup consistently provisions usable document storage so project file uploads work without manual infra patching.
Blocking Issues