Firebase Setup for the TikTok-Style React Native App
The TikTok-style app uses Firebase for user accounts, post metadata, feeds, comments, reactions, chat, media references, hashtags, and optional backend functions.
Quick Answer
Create your own Firebase project, replace the iOS and Android config files, enable Auth, Firestore, and Storage, deploy rules/indexes/functions if included, add test users, upload a test video/post, create a hashtag, and confirm feed, comments, reactions, and discover screens populate from your Firebase project.
1. Link Your Firebase Project
Start with the general Firebase setup:
- Configure a Firebase Project
- Link Firebase Account to Your App
- Enable Firebase Auth
- Enable Firebase Firestore
- Enable Firebase Storage
The app must not ship with demo Firebase credentials.
2. Deploy Backend Configuration
If the package includes a firebase/ folder, deploy rules, indexes, and
functions:
cd firebase
firebase use --add
firebase deploy --only firestore:rules
firebase deploy --only firestore:indexes
firebase deploy --only storage
firebase deploy --only functions
Functions may be used for feed fan-out, notifications, moderation, media processing, or cleanup depending on the package version.
3. Generate Initial Data From App Flows
Use the app to create realistic records:
- register two users;
- upload profile photos;
- follow users from search/discover;
- create a video or post with a caption and hashtag;
- like and comment on a post;
- send a chat message if chat is enabled.
Then check Firebase Console for collections related to users, posts, comments, reactions, feeds, hashtags, and chat.
4. Create Required Indexes
Complex feed and discover queries often require Firestore indexes. During testing, Metro or Functions logs may show a message with a Firebase Console link to create the missing index.
You can either:
- open the index creation link from the error message; or
- deploy the included
firestore.indexes.jsonfile.
After creating an index, wait until Firebase marks it as ready before retesting.
5. Configure Songs
The composer can use a song catalog stored in Firestore and media URLs from Storage or another CDN.
See:
Verification Checklist
- New users appear in Firebase Auth.
- User profile documents appear in Firestore.
- Media upload writes files or URLs through your configured storage flow.
- Posts include caption, author, media, and hashtag data.
- Feed/discover screens load after required indexes are ready.
- Comments and reactions write to Firestore.
- Song picker loads catalog data if the feature is enabled.
Troubleshooting
| Problem | Fix |
|---|---|
| Feed is empty | Create users, follow relationships, posts, and required indexes. |
| Upload fails | Check Storage, media permissions, Functions, and Firebase billing. |
| Missing index error | Create the index from the error link or deploy firestore.indexes.json. |
| Hashtags do not appear | Verify caption parsing and hashtag collection writes. |
| Song picker is empty | Add composer_songs documents and valid media URLs. |