/StackOverFlow-Lite

StackOverFlow-Lite Application is a platform where users can ask questions and get answers to their questions

Primary LanguageJavaScript

StackOverFlow-Lite

Build Status Coverage Status Test Coverage Maintainability

StackOverFlow-Lite Application is a platform where users can ask questions and get answers to their questions

Table of content

Problem Statement

  • Life is a complex scene. Most at times, people are faced with problems and need urgent solutions or answers to their problem. This application sees to it that the technological gap in the lifes of people are filled up by building a community or a platform where people can answer questions or get answers to their question in a vital field of life which is technology.

Features

StackOverFlow-Lite Application consists of the following features:

  • Users can create an account and login
  • Users can post questions on StackOverFlow-Lite application
  • Users can delete the questions they post
  • Users can view the answers to questions on the application
  • Users can accept an answer as the most preferred to all answers to his question
  • Users can upvote or downvote an answer
  • Users can comment on an answer
  • Users can fetch all questions he or she has ever asked on the platform
  • Users can search for questions on the platform
  • Users can view questions with the most answers

Background

  • Stack-OverFlow-Lite Application makes use of the below mentioned technologies.

  • ECMAScript 6: Also known as ES2015, this is a version of Javascript with next-generation features like arrow functions, generators, enhanced object literals, spread operators and more. The ES2015 is used in many areas of this project. See this link for details.

  • NodeJS: Node.js is an open-source, cross-platform JavaScript run-time environment for executing JavaScript code on the server-side. See this link for details.

  • ExressJS: ExpressJS, is a web application framework for Node.js, It is designed for building web applications and APIs. see this link.

  • Postgresql : Postgresql is an advanced open source Object-Relational Model (ORM) database. see this link for details.

  • Jsonwebtoken: This application makes use of jwt for authentication. see link

Installation

  • To begin, Install NodeJs on your computer. See this this link for more information.
  • Clone the git repository: git clone https://github.com/augustineezinwa/StackOverFlow-Lite.
  • Navigate into cloned repository and enter npm install on your command-line.
  • Create a .env file at the root folder, following the .env.example file guide. Enter your database details. Get an online Postgres database or install one locally. See link
  • Start the application by entering npm start.
  • Get postman and verify all shortlisted endpoints.

Tests

  • To run tests, Consider typing npm test on your command-line.

Endpoints

*http verbs**Short-listed endpoints* *Functionality*
POST/auth/login Logins a user
POST/auth/signup Registers a new user
POST/questions Adds a question
GET/questions Gets all questions
GET/questions/mostanswers Gets questions with most answers
GET/questions/?search= Search questions by keywords
GET/questions/:questionIdGets a question by id
GET/users/questions Gets all questions belonging to a user
DELETE/questions/:questionIdDelete a particular question
POST /questions/:questionId/answers Adds an answer to a particular question
PUT /questions/:questionId/answers/:answerId Updates or prefers an answer
GET /questions/:questionId/answers/:answerId Gets an answer with all its comments
PUT /questions/:questionId/answers/:answerId/upvote Upvotes an answer
PUT /questions/:questionId/answers/:answerId/downvote Downvotes an answer
POST /questions/:questionId/answer/:answerId/comments Adds a comment to an answer

To Contribute

  • To contribute, clone the repository. Create a branch, add in your contributions, raise a pull request and send in the link to the pull request.

Author

Application client-side is currently under construction ....