Skip to main content

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.

Start with the general Firebase setup:

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:

  1. register two users;
  2. upload profile photos;
  3. follow users from search/discover;
  4. create a video or post with a caption and hashtag;
  5. like and comment on a post;
  6. 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.json file.

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

ProblemFix
Feed is emptyCreate users, follow relationships, posts, and required indexes.
Upload failsCheck Storage, media permissions, Functions, and Firebase billing.
Missing index errorCreate the index from the error link or deploy firestore.indexes.json.
Hashtags do not appearVerify caption parsing and hashtag collection writes.
Song picker is emptyAdd composer_songs documents and valid media URLs.

Next Steps