StackOverflow-lite is a platform where people can ask questions and provide answers.
- Users can create an account and log in.
- Users can post questions.
- Users can delete the questions they post.
- Users can post answers.
- Users can view the answers to questions.
- Users can accept an answer out of all the answers to his/her question as the preferred answer.
- Users can upvote or downvote an answer.
- Users can comment on an answer.
- Users can fetch all questions he/she has ever asked on the platform
- Users can search for questions on the platform
- Users can view questions with the most answers.
Endpoint | Task |
---|---|
POST api/v1/auth/register |
signing up a user |
POST api/v1/auth/# |
log in user |
DELETE api/v1/auth/logout |
logout user |
POST api/v1/questions |
User create a question |
GET api/v1/questions |
User can view all questions |
PUT api/v1/questions/<question_id> |
User gets a single question |
GET api/v2/questions/myquestions |
User gets all their questions (all) |
GET api/v1/users/<int:id> |
Get user details |
GET api/v2/questions/mostanswers |
User gets questions with most answers(all) |
GET api/v2/questions/search/{search_item} |
User searches for a question or answer(all) |
GET api/v2/questions/{question_id}/answers/{answer_id}/accept |
User can accept an answer to their question |
GET api/v2/questions/{question_id} |
User can delete the questions they post |
GET api/v1/myquestions |
User gets all their questions (all) |
GET api/v2/questions/{question_id}/answers/{answer_id}/upvote |
User can upvote an answer to their question |
GET api/v2/questions/{question_id}/answers/{answer_id}/downvote |
User can downvote an answer to their question |
Clone the repository.
$ git clone https://github.com/asheuh/StackOverflow-lite
$ cd StackOverflow-lite
On linux
$ python -m venv venv
$ source venv/bin/activate
On Windows
$ py -3 -m venv venv
$ venv\Scripts\activate
$ pip install -r requirements.txt
After the configuration, you will run the app
$ export FLASK_APP="app.py"
$ export FLASK_DEBUG=True
$ export APP_SETTINGS="development"
$ export DATABASE_URL="Your DATABASE_URL here"
Run the application
$ flask run
or
$ python app.py
http://127.0.0.1:5000/api/v1/
http://127.0.0.1:5000/api/v2/
- Fileds required to #
- Username
- Email address
- Password
- Conform Password
- Email address
- Password
- You can view the UI template on Github Pages
- Deployed to Heroku, V1 of the app
- Brian Mboya - Initial work - asheuh
This project is licensed under the MIT License - see the LICENSE file for details
- Thank's for my follow bootcampers at Open Andela
- Inspiration
- The power is w3school is really awesome. N
- Don't let life craft you, craft it