Code Monkey home page Code Monkey logo

reddit-clone's Introduction

Reddit-Clone(Redesign)

A Reddit Clone built using TypeScript React, Tailwind CSS, SASS, NextJS, RecoilJS, and Firebase.

How to Run

Setup

# Clone this repository
$ git clone https://github.com/godkingjay/reddit-clone.git

# Go into the repository
$ cd reddit-clone

# Install dependencies
$ yarn install

Configure Firebase

  1. Go to Firebase and create an account.
  2. Go to Console.
  3. Add a Project.
  4. Name your project and proceed.
  5. Go to Authentication tab -> Sign-in Method, and add new provider, select Email/Password and Google.
  6. Go to Firestore Database and create database, select Test Mode.
  7. Go to Storage and create storage, select Test Mode.
  8. In your project, add an application, select web.
  9. Name your app, and click Next.
  10. 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);
  1. Go to your cloned repo and rename ".env.example" to ".env.local".
  2. 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
  1. 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.

reddit-clone's People

Contributors

godkingjay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

merlinofcode

reddit-clone's Issues

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.