Firebase Setup for the Instagram React Native App
The Instagram-style app uses Firebase for user accounts, posts, image uploads, profiles, comments, likes, and optional notifications.
Quick Answer
Create your Firebase project, add iOS and Android app entries, replace config files, enable Auth, Firestore, and Storage, deploy rules and indexes, then verify photo upload, feed reads, comments, likes, and profile display.
Required Services
| Service | Use |
|---|---|
| Authentication | sign-up, login, user identity. |
| Firestore | posts, users, comments, likes, social graph. |
| Storage | image posts and profile photos. |
| Functions | notifications, feed fan-out, thumbnails, moderation if included. |
| Cloud Messaging | push notifications if included. |
Setup Steps
- Follow Configure a Firebase Project.
- Replace
GoogleService-Info.plist. - Replace
google-services.json. - Enable Email/password and any social login providers used by the package.
- Enable Firestore.
- Enable Storage.
- Deploy rules and indexes if included.
- Deploy Functions if included.
- Test with two accounts and at least one image post.
Media Upload Checklist
- Storage bucket exists.
- Storage rules allow authenticated writes to the expected path.
- Firestore post document stores the media URL.
- Large images are compressed if the app supports compression.
- Failed upload does not create a broken post.
Troubleshooting
Network request failed during upload
Check Storage setup, rules, file URI, device network, and whether Firebase Functions or billing are required for post-processing.
permission-denied
Check Firestore rules, Storage rules, and whether the user is authenticated.
Missing index
Create the index from the Firebase Console link shown in the error log or deploy the included indexes file.