Giter Club home page Giter Club logo

instagram-clone-react-native's Introduction

How to build an Instagram Clone with React Native

Read the full tutorial here: >> How to build an Instagram Clone with React Native

Technology

This demo uses:

  • @cometchat-pro/react-native-calls
  • @cometchat-pro/react-native-chat
  • @react-native-async-storage/async-storage,
  • @react-native-community/cli,
  • @react-native-picker/picker,
  • @react-navigation/bottom-tabs,
  • @react-navigation/native,
  • @react-navigation/native-stack,
  • @react-navigation/stack,
  • emoji-mart-nativebeta,
  • firebase,
  • react,
  • react-native,
  • react-native-autolink,
  • react-native-document-picker,
  • react-native-elements,
  • react-native-fast-image,
  • react-native-gesture-handler,
  • react-native-get-random-values,
  • react-native-image-picker,
  • react-native-keep-awake,
  • react-native-reanimated,
  • react-native-safe-area-context,
  • react-native-screens,
  • react-native-sound,
  • react-native-swipe-list-view,
  • react-native-vector-icons,
  • react-native-video,
  • react-native-video-controls,
  • react-native-webview,
  • reanimated-bottom-sheet,
  • rn-fetch-blob,
  • uuid,
  • validator

Running the demo

To run the demo follow these steps:

  1. Head to CometChat Pro and create an account
  2. From the dashboard, add a new app called "instagram-clone-react-native"
  3. Select this newly added app from the list.
  4. From the Quick Start copy the APP_ID, APP_REGION and AUTH_KEY. These will be used later.
  5. Also copy the REST_API_KEY from the API & Auth Key tab.
  6. Navigate to the Users tab, and delete all the default users and groups leaving it clean (very important).
  7. Download the repository here or by running git clone https://github.com/hieptl/instagram-clone-react-native.git and open it in a code editor.
  8. Head to Firebase and create a new project
  9. Create a file called env.js in the root folder of your project.
  10. Import and inject your secret keys in the env.js file containing your CometChat and Firebase in this manner.
export const fbConfig = {
  apiKey: xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx,
  authDomain: xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx,
  databaseURL: xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx,
  projectId: xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx,
  storageBucket: xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx,
  messagingSenderId: xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx,
  appId: xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx,
  measurementId: xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx
};

export const cometChatConfig = {
  cometChatAppId: xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx,
  cometChatRegion: xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx,
  cometChatAuthKey: xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx,
  cometChatRestApiKey: xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx
};
  1. cd to your root folder and hit npm i --force to install the packages.
  2. Run cd to the ios folder then run pod install to install the pods. Once pods are installed run cd .. to go back to the root folder.
  3. Run the app on iOS using npx react-native run-ios & on Android using npx react-native run-android
  4. Make sure to include env.js in your gitIgnore file from being exposed online.
  5. If you would like to test your application on IOS and you are using a Macbook - Apple Chip, you need to follow this link to configure your xcode and your ios project. CometChat - Set up for IOS
  6. If you would like to test your application on Android and you have to face with an issue related to ANDROIRD_ROOT_SDK. Please refer to this link to get the solution.

Questions about running the demo? Open an issue. We're here to help โœŒ๏ธ

Useful links

instagram-clone-react-native's People

Contributors

hieptl avatar

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.