Giter Site home page Giter Site logo

mayank0255 / stackoverflow-clone-frontend Goto Github PK

View Code? Open in Web Editor NEW
535.0 18.0 205.0 13.54 MB

Clone project of a famous Q/A website for developers built using MySQL, Express, React, Node, Sequelize :globe_with_meridians:

Home Page: https://stackoverflow-clone-client.vercel.app

License: MIT License

JavaScript 68.78% HTML 1.01% CSS 0.23% SCSS 29.98%
mysql express react nodejs redux sass javascript css mern-stack database

stackoverflow-clone-frontend's Introduction

Stack-Overflow-Clone-V2-Fast.mp4

Version NPM NODE MYSQL License

API Hosted On

As the name suggests, this project is a clone of a famous Q/A website for professional and enthusiast programmers built solely by me using a completely different stack.

This repo consists of the Frontend code of the project, the backend code is in Stackoverflow-Clone-Backend

My Tech Stack (MERN)

Front-end

  • Front-end Framework: React.js (with Redux)
  • Styling: SASS and BOOTSTRAP

Back-end

  • For handling index requests: Node.js with Express.js Framework
  • As Database: MySQL with Sequelize
  • API tested using: POSTMAN

Guidelines to setup

There are two ways to setup the project: manually or using the Dockerfile. Read below for more details:

Manual Setup

  1. Open your local CLI -

    mkdir Stackoverflow-Clone
    cd Stackoverflow-Clone
    
  2. Setup the backend code -

    NOTE: For Frontend Developers, if they dont want to setup the Backend Code, they can skip the Step 2, and make sure they follow the optional step mentioned in Step 4

    • Create a .env file and the format should be as given in .env.example.

    • Clone the code & install the modules-

      git clone https://github.com/Mayank0255/Stackoverflow-Clone-Backend.git
      cd Stackoverflow-Clone-Backend
      
      npm install
      
    • Open your MySQL Client -

      CREATE DATABASE stack_overflow;
      

      NOTE: Don't forget to keep the database name same in the .env and here.

    • Run the index npm start.

  3. Open a new CLI terminal and goto the root Stackoverflow-Clone folder you created in the first step.

  4. Setup the Frontend code -

    • Clone the code & install the modules-

      git clone https://github.com/Mayank0255/Stackoverflow-Clone-Frontend.git
      cd Stackoverflow-Clone-Frontend
      
      npm install
      
    • Run the client index npm start.

    OPTIONAL (Recommended For Frontend Developers): Can just change the path here to this https://stackoverflow-clone-backend.herokuapp.com Now, it will hit PROD

Let me know if you are interested and would want me to assign it to you

Docker Setup

The back-end has support for Docker. So if you want to run the back-end in a container, you need do:

  • Setup environment variables in .env file. Note when you use Docker setup and run the database in localhost (host machine), you need to setup the environment variables for use correct IP of MySQL Database. Please, read here and here for more details.

  • Build the Docker image:

    docker build -t stackoverflowclone .
    
  • Run the container. For example, if you want to run the container in a new terminal, you can do:

    docker run -d -p 5000:5000 stackoverflowclone
    

The default port of api is 5000. After running the container, you can access the api by typing:

http://localhost:5000/api/<endpoint that you request - see next section>

Follow the steps properly (manual or Docker) and you are good to go.

Contributing

  • Go to Contributing.md

DEMO

Video Last Updated on 7th March, 2022

IMAGES

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.