Multi-tenant church partnership management (Flutter + Firebase). See the_pillr_build_doc.md for the full spec.
The app has no built-in fake auth. Use the Admin seed script once per Firebase project.
Credentials — use either A or B:
A) Service account JSON (no Cloud SDK required)
-
Firebase Console → your project → ⚙️ Project settings → Service accounts → Generate new private key.
-
Save the
.jsonsomewhere safe (do not commit it). -
From the repository root:
export GOOGLE_APPLICATION_CREDENTIALS="/full/absolute/path/to/the-downloaded.json" npm run seed-demo --prefix functions
B) No JSON file — Google Cloud CLI
- Install Google Cloud SDK.
gcloud auth application-default logingcloud config set project thepillr2(or your Firebase project id)npm run seed-demo --prefix functions
Set FIREBASE_PROJECT_ID if your project id is not thepillr2.
-
The seed script creates three users in the same demo church (
demo-churchby default). Role is in the local part of the email:Role Email (default domain) Password (all accounts) admin admin@pillr.devDemoPillr1!pastor pastor@pillr.devDemoPillr1!staff staff@pillr.devDemoPillr1!Optional env vars:
DEMO_PASSWORD,DEMO_EMAIL_DOMAIN(defaultpillr.dev),DEMO_CHURCH_ID,DEMO_CHURCH_NAME.DEMO_PASSWORD='YourStr0ng!' DEMO_EMAIL_DOMAIN='yourdomain.test' npm run seed-demo --prefix functions
Security: Never commit the service account JSON. Re-running the script resets each demo user’s password to DEMO_PASSWORD (or the default).
flutter pub get
flutter run -d chromeFirebase Crashlytics is skipped on web in main.dart (the plugin has no web implementation).
- Rules:
firestore.rules - Indexes:
firestore.indexes.json - Cloud Functions:
functions/(npm run build, thenfirebase deploy --only functions)
For invite emails, set RESEND_API_KEY in functions/.env (see earlier setup notes). The From address must use a domain you have verified in Resend (Dashboard → Domains). Override with RESEND_FROM if needed, e.g. RESEND_FROM="The Pillr <invites@thepillr.com>". The default matches thepillr.com, not pillr.app.
- Firestore —
firebase deploy --only firestore:rules,firestore:indexes(includespartnerId+createdByonentriesfor duplicate checks). - Storage —
firebase deploy --only storage(newstorage.rulesfor church branding + period PDFs). - Functions —
npm run build --prefix functions && firebase deploy --only functions(addsupdateChurchMember,onPartnershipPeriodUpdated,dailyPendingDigest, period summary PDF). - App Check — In debug builds, register Android/iOS debug tokens from Logcat / Xcode when prompted. For production, configure Play Integrity / DeviceCheck / App Attest in Firebase Console.
- Secrets —
RESEND_API_KEYfor email; Functions use default Storage bucket for PDF uploads.
See the_pillr_build_doc.md §16 for the full Phase 4 feature matrix and PHASE_PROGRESS.md for status.
- Secrets:
FIREBASE_TOKEN(fromfirebase login:ci),FIREBASE_ANDROID_APP_ID, tester group name (default in CI:testers— must exist in Firebase App Distribution). - Workflow:
.github/workflows/app-distribution.yml(tagsv*or manual run). - iOS: CI IPA upload is optional when
FIREBASE_IOS_APP_IDand signing secrets are available; otherwise use TestFlight manually. Seedocs/RELEASE.md.