Giter VIP home page Giter VIP logo

aayush301 / stackoverflow-clone Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 2.0 1.03 MB

A place to share and organize knowledge where you can ask or answer questions.

Home Page: https://knowledge-bytes.vercel.app/

JavaScript 99.21% HTML 0.40% CSS 0.39%
css html javasript react expressjs mern-stack-app mongodb mongoose nodejs nodemailer react-router-dom redux axios bcrypt cors googleapis jsonwebtoken jspdf knowledge-management stackoverflow-clone

stackoverflow-clone's Introduction

Knowledge Bytes

A place to share and organize knowledge where you can ask or answer questions.

image

Table of Contents

Features

User-oriented features

  • Signup
  • Login
  • Logout
  • Forgot and reset password
  • Users can ask questions providing the title and body with formatting as well.
  • Users can edit the questions asked by them.
  • The already asked questions with their answers can be viewed by all people.
  • Users can answer the questions by selecting any from all the questions present.
  • Users can also view questions specifically asked by them.
  • Users can view and edit their profile. This also includes changing their username and password as well.
  • Users can bookmark/unbookmark a question or a specific answer.
  • Users can view the bookmarks on separate page, where they can directly toggle those.
  • Users can like the questions/answers of others. The like count is publicly visible.
  • All the likes of a user can also be accessed separately.
  • Users can view their activities in separate page.
  • Link to question or a specific answer to question can also be copied.
  • Questions along with the answers can also be downloaded.

Developer-oriented features

  • Loaders used when fetching data
  • Dynamic document titles
  • Date formatting to "X time ago" for displaying dates
  • DARK and LIGHT theme
  • Editors used in website for providing various styles
  • Emails sent using nodemailer for account activation, reset password etc.
  • Form validations in frontend and backend
  • Global user state using Redux
  • Highlight specific answer on page load based on link url
  • Prompt login modal when non-logged persons try to perform auth activity
  • Responsive Sidebar with toggle option
  • Slugs used for SEO friendly URLs
  • Search params used for applying filters
  • Toasts for success and error messages
  • Use of 404 page for wrong urls
  • Use of layout component for pages
  • Usage of Tooltips
  • Usage of Popconfirm modals for asking for confirmation
  • Usage of React hooks like useState, useEffect, etc.
  • Custom hooks used like useFetch, useDebounce etc.
  • Resource availability checking (to check availability of username of a user while he types)
  • Website themed using tailwind config
  • Middleware for verifying the user in backend
  • Routes protection
  • Token based Authentication
  • Use of Promise.all in backend to improve efficiency
  • Use of different HTTP status codes for sending responses

Tools and Technologies

  • HTML
  • CSS
  • Javascript
  • Tailwind CSS
  • Node.js
  • Express.js
  • React
  • Redux
  • Mongodb
  • Vitejs
  • Font Awesome
  • Google Fonts

Dependencies

Following are the major dependencies of the project:
Frontend:

  • axios
  • jspdf
  • react
  • react-dom
  • react-redux
  • react-router-dom
  • react-simple-wysiwyg
  • react-toastify
  • redux
  • redux-thunk

Backend:

  • bcrypt
  • cors
  • dotenv
  • express
  • googleapis
  • jsonwebtoken
  • mongoose
  • nodemailer

Dev-dependencies

Following are the major dev-dependencies of the project:

  • nodemon
  • concurrently

Prerequisites

  • Node.js must be installed on the system.
  • You should have a MongoDB database.
  • You should have a code editor (preferred: VS Code)

Installation and Setup

  1. Download the source code in your desired location on your system.

  2. Open the code in your code editor.

  3. Go to terminal and type the following command and hit enter:

    npm run install-all

    This will install all the dependencies and dev-dependencies required at root, at frontend and at backend in your project.

  4. Create a file named ".env" inside the backend folder and add data from .env.example file and substitute your credentials there.

  5. Go to terminal and type the following command and hit enter:

    npm run dev

    This will start both backend and frontend.

  6. Open browser and go to url: http://localhost:3000. You can see the app running now.

Backend API

The backend api docs file is already provided in the project.
Please refer to this link to view.

Frontend pages

The list of routes for frontend pages can be found on the RouteProvider Component in project.
Please refer to this link to view.

npm scripts

At root:

  • npm run dev: Starts both backend and frontend
  • npm run dev-server: Starts only backend
  • npm run dev-client: Starts only frontend
  • npm run install-all: Installs all dependencies and dev-dependencies required at root, at frontend and at backend.

Inside frontend folder:

  • npm run dev: Starts frontend server in development mode.
  • npm run build: Builds frontend into dist folder.
  • npm run preview: For Previewing the build.

Inside backend folder:

  • npm run dev: Starts backend using nodemon.
  • npm start: Starts backend without nodemon.

Contributing

  • Feature Requests:
    Want a new feature or improve already existing feature in the app? Feel free to create an issue at issue tracker about the feature you want to see in the app.

  • Bug reports:
    Found a bug in the application? Feel free to create a new issue at issue tracker stating the clear description of the bug.

  • Code contributions:
    Want to contribute code to the project? You can do so by either correcting bugs or adding new features which can be found in the issues tab and then submitting a Pull Request referencing that issue.

  • Security vulnerabilities:
    Discovered a security vulnerability within this project? Please send an email to Aayush (author) at [email protected].

Useful Links

Contact

stackoverflow-clone's People

Contributors

aayush301 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

stackoverflow-clone's Issues

What may be the id and password

I am using simple email id and and google app password for that , am I going wrong, then what will be the email and password how will i configure them to use
How will i configure them with smtp server

Please help me to get.........

Please

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.