Purpose
The Storage module browses and manages Firebase Storage buckets with emulator-proven workflows and guarded production controls. It also supports Auth photo URL handoff and thumbnail workflows; direct Auth file-picker upload proof remains open.
Browser Output
The BROWSER output mode is the primary file navigation surface. Users can browse folders/files, switch between list and grid layouts, sort entries by name, size, or updated date, inspect metadata, preview supported files, and run object actions. Selecting one or more objects reveals a toolbar with the selection count, an actions menu, and a clear-selection control.
Additional output modes:
JSON: raw listing/action payloadsLOGS: Storage API and app logs
Actions
Supported workflows:
- browse bucket paths
- sort by name, size, or updated date
- switch between list and grid views
- create folders and upload files by picker or drag and drop
- upload files
- download files
- delete files
- rename, duplicate, copy, move, and delete folders
- download selected objects individually or as a ZIP archive
- copy selected download URLs
- copy, move, or delete selected objects in bulk
- copy URL
- generate signed URL with configurable expiration
- open URL
- show thumbnail preview when an object is image-compatible
- integrate Auth photo URL handoff from Storage
Emulator and Production
Storage uses the selected project and Storage emulator endpoint when configured. Production object mutations must be explicit and visible, but approved live bucket verification remains open. Production signed URLs use linked service account JSON credentials for V4 signing; emulator links generate local emulator download URLs with the selected expiration for deterministic UI coverage.
Safety
- Read-only projects block uploads and deletes.
- Pro access gates Storage writes.
- Destructive deletes show the target project/environment, bucket, and object path.
- Production single-object and bulk-object deletes require
DELETE PRODUCTIONbefore queueing. - Production folder deletes require
DELETE FOLDER PRODUCTIONbefore queueing. - Long uploads/downloads/deletes should report progress through Tasks where applicable.
Current Verification
- Storage emulator UI coverage proves browser, sort/grid, visible selection controls, details, preview, signed URL, upload, download, delete, folder, ZIP, and bulk object workflows against seeded emulator objects.
- Storage CLI emulator coverage proves upload/download/delete, browser output, ZIP payloads, folder copy/move, task retention, and read-only mutation rejection.
StorageProductionDeleteGuardTests/testProductionObjectDeleteRequiresProductionConfirmationBeforeQueueingTask,testProductionBulkDeleteRequiresProductionConfirmationBeforeQueueingTask, andtestProductionFolderDeleteRequiresFolderProductionConfirmationBeforeQueueingTaskprove production deletes require typed production confirmation before task enqueue.- Approved live bucket list/upload/signed-URL/download/delete cleanup proof remains open.
Source Anchors
Sources/FirestructApp/Features/Storage/UI/StorageModuleView.swiftSources/FirestructApp/Features/Storage/Services/AppModel+StorageActions.swiftSources/FirestructApp/Features/Storage/Model/StorageStore.swiftSources/FirestructCore/StorageService.swift