Commit+ keeps Firebase configuration local. The app remains usable in guest mode when the configuration file is absent.
- Create or select the Firebase project used by Commit+.
- Register an Apple app with bundle ID
dev.thanhtran.macgit. - In Firebase Authentication, enable:
- Email/Password.
- Google.
- Do not enable email verification as an application requirement for the Firebase foundation phases.
- Create a Cloud Firestore database. Deploy Firestore rules from the private
landing-pagerepository before using production data.
Google Sign-In on macOS uses an OAuth client whose application type is iOS.
- Open Google Cloud Console for the same project.
- Create or verify an iOS OAuth client with bundle ID
dev.thanhtran.macgit. - Return to Firebase Authentication, verify Google remains enabled, and download a fresh
GoogleService-Info.plist. - Confirm the downloaded file contains
CLIENT_IDandREVERSED_CLIENT_ID.
-
Save the downloaded file at:
macgit/GoogleService-Info.plist -
Do not commit this file. The path is ignored by Git.
-
Add the plist's
REVERSED_CLIENT_IDas a URL scheme for themacgittarget before enabling the Phase 1 Google sign-in flow. -
Never print
API_KEY, OAuth client IDs, or Firebase tokens in test logs.
FirebaseBootstrap looks for GoogleService-Info.plist in the application bundle. If it is absent or invalid, bootstrap reports missingConfiguration and Commit+ continues in guest mode.
Firestore rules, Cloud Functions, emulator tests, and operator scripts are maintained in the private landing-page repository. See that repository's docs/firebase-backend.md for installation, testing, and deployment commands. Historical plans in this repository use the paths that existed when they were written.
The macOS app still connects directly to the same Firebase project through the Firebase SDK. Auth, Firestore listeners, local caching, and callable function names are unchanged.
Settings sync is optional and device-local. It starts when a Free or Pro user is signed in and enables Sync Settings on that Mac. Guest workflows remain fully local, and entitlement changes do not pause cloud observation or uploads.
The first time a Mac finds different local and cloud values, Commit+ asks whether to use the cloud values or keep that Mac's values. Canceling this choice disables sync on that device. After the initial choice, local changes are debounced and remote changes apply without being uploaded back as echoes.
The only synchronized values are:
- Toolbar button text visibility.
- Submodule visibility.
- Subtree visibility.
Firestore stores these values at users/{uid}/settings/app. The document must contain exactly schemaVersion, the three boolean settings, and the server timestamp updatedAt. Repository state, credentials, Git history, and other preferences are never included.
Check required local keys without printing their values:
for key in BUNDLE_ID PROJECT_ID GOOGLE_APP_ID CLIENT_ID REVERSED_CLIENT_ID IS_SIGNIN_ENABLED; do
/usr/libexec/PlistBuddy -c "Print :$key" macgit/GoogleService-Info.plist >/dev/null
doneThe BUNDLE_ID value must equal dev.thanhtran.macgit and IS_SIGNIN_ENABLED must be true.