GitPedia

Facebook Clone

Facebook 2.0 with REACT.JS! (Next.js, Tailwind CSS, Image Uploading, Facebook Authentication, Google Authentication, Dark Mode & Light Mode, Facebook Profile)

From SashenJayathilaka·Updated June 5, 2026·View on GitHub·

Facebook 2.0 with REACT.JS! (Next.js, Tailwind CSS, Image Uploading, Facebook Authentication, Google Authentication, Dark Mode & Light Mode, Facebook Profile) The project is written primarily in TypeScript, first published in 2022. Key topics include: dark-mode-switcher, facebook-authentication, faker-js, firestore, framer-motion.

<div align="center"> <img src="https://user-images.githubusercontent.com/99184393/192714524-ac80004b-8cfa-4bd5-9fd9-880edaf86f58.png" alt="logo" width="160" height="auto" /> <h1>Facebook Clone with React.JS</h1> <p> Facebook 2.0 with REACT.JS! (Next.js, Tailwind CSS, Image Uploading, Facebook Authentication, Google Authentication, Dark Mode & Light Mode, Facebook Profile) </p> <!-- Badges -->

<a href="https://project-delta-brown.vercel.app" target="_blank"></a>




<h4> <a href="https://project-delta-brown.vercel.app">View Demo</a> <span> · </span> <a href="https://github.com/SashenJayathilaka/Facebook-Clone/blob/master/README.md">Documentation</a> <span> · </span> <a href="https://github.com/SashenJayathilaka/Facebook-Clone/issues">Report Bug</a> <span> · </span> <a href="https://github.com/SashenJayathilaka/Facebook-Clone/issues">Request Feature</a> </h4> </div> <br /> <!-- Table of Contents -->

:notebook_with_decorative_cover: Table of Contents

<!-- About the Project -->

:star2: About the Project

<!-- Screenshots -->

:camera: Screenshots

<div align="center"> <a href="https://project-delta-brown.vercel.app" target="_blank"><img width='800' src='https://user-images.githubusercontent.com/99184393/192956366-2b529310-e3c3-4598-af6e-b3aa8a27c8ec.gif' alt='image'/></a> </div>

<a href="https://project-delta-brown.vercel.app" target="_blank">LIVE DEMO 💥</a>

forthebadge
forthebadge
forthebadge

:space_invader: Tech Stack

<details> <summary>Client</summary> <ul> <li><a href="https://www.typescriptlang.org">Typescript</a></li> <li><a href="https://nextjs.org/">Next.js</a></li> <li><a href="https://reactjs.org/">React.js</a></li> <li><a href="https://tailwindcss.com/">TailwindCSS</a></li> </ul> </details> <details> <summary>Database</summary> <ul> <li><a href="https://firebase.google.com">Firebase</a></li> </ul> </details> <br /> <table> <tr> <td> <a href="#"><img src="https://raw.githubusercontent.com/devicons/devicon/master/icons/react/react-original.svg" alt="" width="30" height="30" /></a> </td> <td> <a href="#"><img src="https://user-images.githubusercontent.com/99184393/183096870-fdf58e59-d78c-44f4-bd1c-f9033c16d907.png" alt="" width="30" height="30" /></a> </td> <td> <a href="#"><img src="https://user-images.githubusercontent.com/99184393/179383376-874f547c-4e6f-4826-850e-706b009e7e2b.png" alt="" width="30" height="30" /></a> </td> <td> <a href="#"><img src="https://user-images.githubusercontent.com/99184393/180462270-ea4a249c-627c-4479-9431-5c3fd25454c4.png" alt="" width="30" height="30" /></a> </td> <td> <a href="#"><img src="https://user-images.githubusercontent.com/99184393/177784603-d69e9d02-721a-4bce-b9b3-949165d2edeb.png" alt="" width="30" height="30" /></a> </td> <td> <a href="#"><img src="https://user-images.githubusercontent.com/99184393/192714524-ac80004b-8cfa-4bd5-9fd9-880edaf86f58.png" alt="" width="30" height="30" /></a> </td> </tr> </table>

:toolbox: Getting Started

:bangbang: Prerequisites

  • Sign up for a Firebase account <a href='https://firebase.google.com'>HERE</a>
  • Install Node JS in your computer <a href='https://nodejs.org/en/'>HERE</a>
<!-- Env Variables -->

:key: Environment Variables

To run this project, you will need to add the following environment variables to your .env file

NEXT_PUBLIC_FIREBASE_API_KEY

NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN

NEXT_PUBLIC_FIREBASE_PROJECT_ID

NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET

NEXT_PUBLIC_FIREBASE_MESSAGING_SET

NEXT_PUBLIC_FIREBASE_APP_ID

NEXT_PUBLIC_BASE_URL

This project was bootstrapped with Create React App.

:gear: Installation


Install my-project with npm

npx create-next-app@latest --ts my-project
cd my-project

Install dependencies

:test_tube: Install Tailwind CSS with Next.js

Install Tailwind CSS

Install tailwindcss and its peer dependencies via npm, and then run the init command to generate both tailwind.config.js and postcss.config.js.

npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p

Configure your template paths

Add the paths to all of your template files in your tailwind.config.js file.
<br>

module.exports = {
  content: [
    "./pages/**/*.{js,ts,jsx,tsx}",
    "./components/**/*.{js,ts,jsx,tsx}",
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}

Add the Tailwind directives to your CSS

Add the @tailwind directives for each of Tailwind’s layers to your ./styles/globals.css file.

@tailwind base;
@tailwind components;
@tailwind utilities;

Install dependencies

<a href="https://github.com/SashenJayathilaka/Facebook-Clone/blob/master/package.json" target="_blank">🔷 Other Dependency Info</a>

<!-- Run Locally -->

:running: Run Locally

Clone the project

bash
git clone https://github.com/SashenJayathilaka/Facebook-Clone.git

change directory

bash
cd Facebook-Clone

Install dependencies

bash
npm install

Start the server

bash
npm run dev
<hr />

This is a Next.js project bootstrapped with create-next-app.

<hr />

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.js. The page auto-updates as you edit the file.

API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.js.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

<!-- Deployment -->

:triangular_flag_on_post: Deployment

To deploy this project run

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

:handshake: Contact

Your Name - @twitter_handle - sashenjayathilaka95@gmail.com

Project Link: https://github.com/SashenJayathilaka/Facebook-Clone.git

<hr /> <br /> <div align="center"> <a href="https://project-delta-brown.vercel.app" target="_blank"><img src='https://user-images.githubusercontent.com/99184393/192952836-c2762b43-b25b-45d4-bb63-8c4471482756.png' alt='image'/><img src='https://user-images.githubusercontent.com/99184393/198054676-3369e796-663f-432d-becd-356c6af19baf.png' alt='image'/></a> </div> <br /> <div align="center">Don't forget to leave a star ⭐️</div>

Contributors

Showing top 1 contributor by commit count.

View all contributors on GitHub →

This article is auto-generated from SashenJayathilaka/Facebook-Clone via the GitHub API.Last fetched: 6/27/2026