Giter Club home page Giter Club logo

tiktok's Introduction

TikTok made with React Native and Firebase

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.

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:

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.