Skip to content

24vishwas/stack-overflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

StackOverflow Clone - README

This repository contains a StackOverflow clone developed using the MERN (MongoDB, Express.js, React.js, Node.js) stack. The project aims to replicate the core functionalities of the popular question-and-answer website StackOverflow.

Table of Contents

Features

  • User registration and authentication.
  • User profile management.
  • Posting questions and answers.
  • Commenting on questions and answers.
  • Voting system for questions, answers, and comments.
  • Search functionality to find specific questions.
  • Tagging system for organizing questions by topic.
  • Notification system for updates and replies.
  • Markdown support for formatting questions and answers.
  • User reputation system based on contributions.
  • Admin panel for managing users and content.
  • RESTful API for integration with external applications.

Installation

To run the StackOverflow clone on your local machine, follow these steps:

  1. Clone the repository:

    git clone https://github.com/your-username/stackoverflow-clone.git
  2. Navigate to the project directory:

    cd stackoverflow-clone
  3. Install the dependencies for both the server and client:

    # Install server dependencies
    cd server
    npm install
    
    # Install client dependencies
    cd ../client
    npm install
  4. Configure the environment variables:

    • Create a .env file in the server directory.
    • Set the following variables in the .env file:
      PORT=3001
      MONGODB_URI=your-mongodb-connection-uri
      JWT_SECRET=your-jwt-secret
      
  5. Start the development server:

    # Start the server
    cd ../server
    npm run dev
    
    # Start the client
    cd ../client
    npm start
  6. Open your browser and visit http://localhost:3000 to access the StackOverflow clone.

Usage

  • Register a new account or log in with an existing one.
  • Explore questions and answers on various topics.
  • Ask new questions or provide answers to existing ones.
  • Upvote or downvote questions, answers, and comments.
  • Comment on questions, answers, or comments.
  • Use the search bar to find specific questions.
  • Tag questions with relevant topics.
  • Customize your profile and view other users' profiles.
  • Receive notifications for updates and replies.
  • Access the admin panel to manage users and content.

Technologies

The StackOverflow clone is developed using the following technologies:

  • MongoDB: A NoSQL database for storing data.
  • Express.js: A web application framework for Node.js.
  • React.js: A JavaScript library for building user interfaces.
  • Node.js: A JavaScript runtime environment for server-side development.
  • Redux: A state management library for JavaScript applications.
  • Mongoose: An object modeling tool for MongoDB.
  • Passport.js: An authentication middleware for Node.js.
  • JWT: JSON Web Tokens for secure user authentication.
  • Axios: A promise-based HTTP client for the browser and Node.js.

Contributing

Contributions to the StackOverflow clone are welcome! If you find a bug or have a suggestion, please open an issue on the repository. If you would like to contribute code, please fork the repository and create a pull request with your changes.

Before contributing, please ensure that your code adheres to the existing coding style and follows the established guidelines.

License

The StackOverflow clone is open-source

and available under the MIT License. Feel free to use, modify, and distribute the code as per the terms of the license.

'yarn install'

use the above command on the client side to install dependencies

'npm install'

use the above command on the server side to install dependencies

'npm start'

use the above command on the server side to run