Coder Social home page Coder Social logo

eliasafara / facebookclone Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 0.0 950 KB

Facebook Clone using React & Firebase

Home Page: https://facebook-clone-8f0b2.web.app/

License: MIT License

HTML 5.50% JavaScript 65.54% CSS 28.96%
react firebase flexbox context-api react-hooks material-ui deployment communityexchange ghdesktop github learn microsoftvisualstudio student-vscode

facebookclone's Introduction

๐Ÿ‘ฉโ€๐Ÿ’ป Short Description

Facebook clone with React.

Firebase for Hosting, Google athentication(Full Log-In) and real time Database.

๐Ÿš€ Build a Facebook Clone with REACT & Firebase

  • React + React HOOKS
  • React Context API -> REDUX pattern
  • MATERIAL UI (Icons) is a library for css. One of the most popular css libraries. brings pristine icons. _ on terminal, install npm install @material-ui/core to your local repository and install npm install @material-ui/icons. _ more icons can be found here
  • FLEXBOX (responsive)
  • firebase's Firestore realtime DB
  • Firebase Hosting
  • Firebase Google Authentication (Full Log-In)

Why firebase?

firebase lets you host all the data you want real time database Google's eco system on the back (firebase, google authentication) and react on the front :ties together

๐Ÿ”’ Hide Firebase Environment Variables

  1. Create .env file in the root of your project & add it to .gitignore
  2. Copy whats inside env.example & modify according to your firebase env variables. Make sure each variable name starting with REACT_APP_
  3. Access the variables directly in your firebase.js using process.env.REACT_APP_INSERT_VARIABLE_NAME_HERE. Check firebase.js
  4. ALREADY DONE โœ”๏ธ To access the environment-specific file, install the env-cmd npm package using the following command: npm install env-cmd
  5. ALREADY DONE โœ”๏ธ Change the package.json file script section to use env-cmd command: "start": "env-cmd -f .env react-scripts start"

So now, when you run the npm start command from the terminal, it will load the environment variables from the .env file.

๐Ÿ“• Facebook Widgets at

https://developers.facebook.com/docs/plugins/page-plugin/

๐Ÿ“— when need to update time

use the following code <p>{new Data(timestamp?.toDate()).toUTCString}</p>

๐Ÿ“’ Firebase Hosting

  1. npm i -g firebase-tools
  2. firebase login
  3. firebase init
  4. npm run build
  5. firebase deploy

facebookclone's People

Contributors

eliasafara avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.