NextJs Reddit Clone

screenshot of NextJs Reddit Clone

NextJs Reddit Clone

A reddit clone made with NextJs 13, Firebase, Chakra UI, Recoil. Create or join new subreddits, add votes and comments.


NextJs-Reddit-Clone is a reddit clone created using NextJs, Firebase, Chakra UI, Recoil, and TypeScript. It provides a platform for users to create posts and engage in discussions similar to the popular social media platform, Reddit. The project utilizes modern technologies and follows best practices to create an efficient and user-friendly application.


  • NextJs: Built with NextJs, a highly functional and efficient JavaScript framework for creating single-page applications.
  • Firebase: Integrated with Firebase, a cloud-based platform for building web and mobile applications with real-time data synchronization and authentication features.
  • Chakra UI: Utilizes Chakra UI, a responsive and accessible UI component library, to enhance the visual design and user experience of the clone.
  • Recoil: Implements Recoil, a state management library for React, to manage and share state across components in an efficient and predictable manner.
  • TypeScript: Developed using TypeScript, a statically-typed superset of JavaScript, to enable a more scalable and maintainable codebase.


  1. Setup Firebase:

    • Navigate to Firebase Console
    • Click "Add Project" and enter the project name as "reddit-clone"
    • Select your account and create the project
    • Click "Continue" and then select "web"
    • Enter an app nickname and register the app
    • Copy and store the firebaseConfig values
    • Continue to the console and enable authentication with email/password and Google providers
    • Setup the storage rules as per provided instructions
  2. Setup Project:

    • Clone/download the repository
    • Create a file called ".env" in the root directory of the project
    • Inside the .env file, add the firebase keys from the firebaseConfig copied during the Firebase setup
  3. Install Dependencies:

    • Run yarn install (or npm install) to install the required dependencies


NextJs-Reddit-Clone is a reddit clone built using NextJs, Firebase, Chakra UI, Recoil, and TypeScript. It offers a range of features including post creation, discussions, and user authentication. The project is easy to install and comes with clear instructions for setting up the required dependencies. It leverages modern technologies and follows best practices to create a robust and user-friendly application.


Next.js is a React-based web framework that enables server-side rendering, static site generation, and other powerful features for building modern web applications.


React is a widely used JavaScript library for building user interfaces and single-page applications. It follows a component-based architecture and uses a virtual DOM to efficiently update and render UI components

Styled Components

Styled Components is a popular library for styling React components using CSS syntax. It allows you to write CSS in your JavaScript code, making it easier to create dynamic styles that are specific to each component.

Chakra UI

Chakra UI is a popular open-source React component library that provides a set of accessible and customizable UI components to help developers create modern web applications.


Firebase offers a comprehensive set of features, including real-time database, authentication, hosting, cloud functions, storage, and more. Firebase provides an easy-to-use interface and allows developers to focus on building features rather than managing infrastructure.


ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

Framer Motion

Alpine.js is a lightweight JavaScript framework that simplifies the process of creating dynamic, reactive user interfaces on the web. It uses a declarative syntax that offers a higher level of abstraction compared to vanilla JavaScript, while being more performant and easier to use than jQuery.


TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.