A Reddit Clone built using TypeScript React, Tailwind CSS, SASS, NextJS, RecoilJS, and Firebase.
# Clone this repository
$ git clone https://github.com/godkingjay/reddit-clone.git
# Go into the repository
$ cd reddit-clone
# Install dependencies
$ yarn install
- Go to Firebase and create an account.
- Go to Console.
- Add a Project.
- Name your project and proceed.
- Go to Authentication tab -> Sign-in Method, and add new provider, select Email/Password and Google.
- Go to Firestore Database and create database, select Test Mode.
- Go to Storage and create storage, select Test Mode.
- In your project, add an application, select web.
- Name your app, and click Next.
- Get the configuration, it should be like this:
// Import the functions you need from the SDKs you need
import { initializeApp } from "firebase/app";
// TODO: Add SDKs for Firebase products that you want to use
// https://firebase.google.com/docs/web/setup#available-libraries
// Your web app's Firebase configuration
const firebaseConfig = {
apiKey: "API_KEY",
authDomain: "APP_NAME.firebaseapp.com",
projectId: "APP_NAME",
storageBucket: "APP_NAME.appspot.com",
messagingSenderId: "MESSAGING_SENDER_ID",
appId: "APP_ID",
};
// Initialize Firebase
const app = initializeApp(firebaseConfig);
- Go to your cloned repo and rename ".env.example" to ".env.local".
- Add the configuration given by Firebase.
NEXT_PUBLIC_API_KEY=#FIREBASE_API_KEY
NEXT_PUBLIC_AUTH_DOMAIN=#FIREBASE_AUTH_DOMAIN
NEXT_PUBLIC_PROJECT_ID=#FIREBASE_PROJECT_ID
NEXT_PUBLIC_STORAGE_BUCKET=#FIREBASE_STORAGE_BUCKET
NEXT_PUBLIC_MESSAGING_SENDER_ID=#FIREBASE_MESSAGING_SENDER_ID
NEXT_PUBLIC_APP_ID=#FIREBASE_APP_ID
- Your good to go!
$ yarn dev
NOTE: After running the app, check your devtools for logs from Firebase. These logs should be a link which will take you to Firebase where it will will ask you to create indices for the queries.