Firebase Setup
SkillDatabases & dataUse when integrating Firebase Authentication, Cloud Firestore, Cloud Messaging, Crashlytics, or Firebase Analytics in Flutter.
Use Firebase Setup in Claude, ChatGPT or Ahel Desktop
Free. Sign in, add Firebase Setup and connect your AI. About a minute.
Also: Claude Code · Cursor · Codex
Then ask your AI: use the Firebase Setup skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; Ahel provides instructions and does not run this skill.
No other account needed.
Add Ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
What this skill tells your AI
The instructions your AI receives, as published by dhruvanbhalara/skills in skills/flutter/flutter-firebase/SKILL.md and read by Ahel’s review.
- Use
firebase_corefor initialization: callFirebase.initializeApp()beforerunApp() - Use
flutterfire configurefor platform-specific setup - Use separate Firebase projects per flavor (see
app-configskill) - Register Firebase services via
injectablefor consistent DI
Authentication
- Use
firebase_authfor user management - Wrap all auth calls in an
AuthRepository: no directFirebaseAuthusage in BLoCs or UI - Support email/password, Google Sign-In, and Apple Sign-In at minimum
- Handle auth state changes via
FirebaseAuth.instance.authStateChanges()stream inAuthBloc - Store auth tokens via
flutter_secure_storage: never inSharedPreferencesor source code - Implement proper sign-out: clear local cache, navigate to login, dispose user-specific BLoCs
Firestore
- Use
cloud_firestorefor remote data persistence - DataSources wrap all Firestore calls (
get,set,update,delete,snapshots) - Use typed model classes with
fromFirestore/toFirestorefactory methods - Prefer
.withConverter<T>()for type-safe collection references - Use batch writes for multi-document operations: never multiple sequential writes
- Implement offline persistence (enabled by default on mobile)
Security Rules
- NEVER rely on client-side validation alone: enforce rules in Firestore Security Rules
- Default deny: start with
allow read, write: if false;and open only what is needed - Always validate
request.auth != nullfor authenticated-only collections - Test rules with the Firebase Emulator Suite before deploying
Push Notifications (FCM)
- Use
firebase_messagingfor push notifications - Request notification permissions early but gracefully (explain value before requesting)
- Handle foreground, background, and terminated-state messages separately
- Store FCM token in Firestore user document for server-side targeting
- Re-register token on
onTokenRefreshstream
Crashlytics
- Use
firebase_crashlyticsfor crash reporting - Enable in staging and production flavors only: disable in dev
- Record Flutter errors:
FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterFatalError - Catch async errors via
PlatformDispatcher.instance.onError - Add custom keys for user context:
Crashlytics.instance.setCustomKey('userId', id)
Analytics
- Use
firebase_analyticsfor user behavior tracking - Log meaningful events with descriptive names:
analytics.logEvent(name: 'purchase_completed') - Set user properties for segmentation:
analytics.setUserProperty(name: 'plan', value: 'pro') - Track screen views via
FirebaseAnalyticsObserverinGoRouter - NEVER log PII (emails, passwords, phone numbers) in analytics events
Remote Config
- Use
firebase_remote_configfor feature flags and A/B testing - Set sensible defaults locally: app MUST work without Remote Config fetched
- Fetch and activate on app start with a timeout fallback
- Cache values and respect minimum fetch intervals to avoid throttling
Signals
- GitHub stars
- 30
- Forks
- 4
- Last commit
- Aug 2026
Advanced
- Item type
- skill
- Key
flutter-firebase- Source
- github.com/dhruvanbhalara/skills
github.com/dhruvanbhalara/skills
Related picks
Skill · evanca
The pick for Dartwrite-dart
Skill · cfug
The pick for Dartflutter-auto-route-navigation
Skill · hoangnguyen0403
The pick for Fluttererror-tracking-flutter
Skill · posthog
The pick for Flutteranalytics
Skill · coreyhaines31
More in Databases & datasupabase
Skill · supabase
More in Databases & data