Tiktok
iOS/Android TikTok clone built using React Native, Expo, TypeScript, Firebase, and Redux.
Install / Use
/learn @kirkwat/TiktokREADME
This project is a TikTok clone built using React Native, Expo, TypeScript, Firebase, and Redux. Building off of SimCoder's TikTok clone tutorial, this implementation is refactored to incorporate TypeScript and updated to utilize Firebase v10 and Redux Toolkit.
<p align="center"> <img src="https://github.com/kirkwat/tiktok/assets/60279003/24265ba0-d014-4e8c-bed8-ddf099850fb4"> </p>Features
- Authentication
- Post videos using camera or gallery
- User profiles
- View user posts
- Follow/unfollow
- View user stats (following/followers/likes)
- Feed
- Explore posts from other users
- Like/comment on posts
- Directly message users
- User search by email
Setup & Usage
Cloud Environment - Firebase
Firebase is used for data/file storage and authentication. To get started, set up your own Firebase project using this tutorial.
Next, you'll need to update two configuration files to point to your new Firebase project:
- Update the Project ID (located in Firebase Project settings) in
backend/.firebaserc. - Update the firebaseConfig (located in Firebase Project settings under Your apps) in
frontend/firebaseConfig.ts.
Backend - Firebase Functions
Install the Firebase CLI tools globally to be able to manage and deploy Firebase services from your local machine.
npm install -g firebase-tools
Next, authenticate your account with Firebase and gain the necessary permissions.
firebase login
Go to the backend\functions directory and install the needed dependencies.
npm install
Run the following command to deploy the Firebase functions contained in the project, allowing them to be executed on the Firebase servers.
firebase deploy
Frontend - React Native Application with Expo
Go to the frontend directory and install the needed dependencies.
npm install
To start the application, run the following command.
npm run start
This will launch the Expo development server. To view the application, you'll need either an iOS or Android emulator. If you're unfamiliar with setting up an emulator, you can follow the beginning of this tutorial for guidance on configuring an Android emulator. Watch this tutorial to set up an iOS emulator.
When you first run the project, you will encounter the following error related to Firestore:
@firebase/firestore: Firestore (10.3.0): Uncaught Error in snapshot listener: FirebaseError: [code=failed-precondition]: The query requires an index. You can create it here:
This error occurs because Firestore needs to create a specialized index for the query you're running, and it doesn't yet exist. Without this index, Firestore can't execute the query efficiently.
To resolve this issue, you'll need to follow the provided link in the error message and click "Save" to create the required index. Doing so will optimize Firestore for your specific query needs, ensuring smooth and efficient operations.
Next Steps
There are plenty of features to add, so here is what I would work on next. Feel free to contribute if you are interested.
- Ability to reload profile/feed/chat screens
- Ability to share posts through messaging
- For You feed page vs Following feed page
Related Skills
qqbot-channel
350.8kQQ 频道管理技能。查询频道列表、子频道、成员、发帖、公告、日程等操作。使用 qqbot_channel_api 工具代理 QQ 开放平台 HTTP 接口,自动处理 Token 鉴权。当用户需要查看频道、管理子频道、查询成员、发布帖子/公告/日程时使用。
Writing Hookify Rules
110.4kThis skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
docs-writer
100.5k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
review-duplication
100.5kUse this skill during code reviews to proactively investigate the codebase for duplicated functionality, reinvented wheels, or failure to reuse existing project best practices and shared utilities.
