Purpose
Workspace Link associates a Firestruct project with a local Firebase workspace. It lets users view local project configuration, inspect rules/index files, diff local vs remote state, and run guarded deploy workflows.
Inputs
- local workspace path
firebase.json.firebaserc- Firestore rules and indexes
- Storage rules where configured
- selected Firebase project
Actions
Users can:
- link a local workspace path
- inspect workspace files
- view rules/index contents
- compare local configuration against remote project state
- deploy selected configuration with explicit confirmation when enabled
The module is useful before any rules or indexes change because it keeps local files, Firebase aliases, selected project metadata, and remote state in the same review surface. A user should be able to see which checkout is linked, which Firebase project will be affected, and what differs before deciding whether a deploy is appropriate.
Diff views should favor deterministic output over interpretation. Show the local file path, remote resource, changed sections, missing files, parse errors, and any Firebase API errors separately so a developer can fix local config or permissions without guessing which layer failed.
Safety
- Workspace link persistence is Pro-gated.
- Deploy is Pro-gated and requires explicit confirmation.
- Production deploys must label target project/environment clearly.
- Deploy operations must run through Tasks and expose errors.
Source Anchors
Sources/FirestructApp/Features/WorkspaceLink/UI/WorkspaceLinkView.swiftSources/FirestructApp/Features/WorkspaceLink/Services/AppModel+WorkspaceLinkActions.swiftSources/FirestructApp/Features/WorkspaceLink/Model/WorkspaceLinkStore.swiftSources/FirestructCore/WorkspaceLinkRemoteService.swiftSources/FirestructCore/WorkspaceLinkRemoteService+Operations.swiftSources/FirestructCore/ProjectRegistry+WorkspaceServices.swift