Skip to content

kzyangiro/WeConnect

Repository files navigation

Build Status Coverage Status

WeConnect

WeConnect is an application that links individuals to businesses. A user is able to view avaiable businesses, view their profiles and reviews and also create an account. An authorised user is able to create a business and manage the businesses by either updating or deleting as well as adding reviews to businesses.

Link to WeConnect design template: https://kzygit.github.io/designs/UI/index.html

Link to Heroku: https://weconnectapi-v2.herokuapp.com/

Link to WeConnect API documentation: https://app.swaggerhub.com/apis/Andela19/Weconnect-v2/1.0.0

Technology used

  • Flask Microframework
  • Restful Api
  • Python 3.6.0

Installation and Setup

Create and activate virtual environment:

python3 -m venv env
source ./env/bin/activate 

Clone or download the api from github. To clone:

git clone https://github.com/kzyGit/WeConnect.git

Move into our WeConnect directory

cd WeConnect

Install Dependencies: run requirements file

pip install -r requirements.txt

Running the api

  • To run the application use the comand:
python run.py

  • Once running, open postman and add the first url: http://127.0.0.1:5000

  • Add the route of your endpoint to the default url: Example: http://127.0.0.1:5000/api/v1/businesses

  • Select body section on the postman navigation tabs, select raw, then Json, add parameters as indicated in the route methods then Send request

Unit Testing

- Use pytest or nosetests for running the tests
- Using pytest to run tests:
pytest

UI Templates

The UI is hosted on github pages. Link: https://kzygit.github.io/designs/UI/index.html

Features

  • A user can create an account
  • Registered user can login, reset password,logout, add a business, manage the businesses and add business reviews
  • All sers can view businesses and their reviews

Api Endpoints


FunctionalityEndpoint
Create a new userPOST /api/v1/auth/register
Log in a registered UserPOST /api/v1/auth/login
Logout a UserPOST /api/v1/auth/logout
Password ResetPOST /api/v1/auth/reset-password
Register a businessPOST /api/v1/businesses
Update a businessPUT /api/v1/businesses/businessId
Delete a BusinessDELETE /api/v1/businesses/businessId
Add a business reviewPOST /api/v1/businesses/businessId/review
Get reviews of a businessGET /api/v1/businesses/businessId/review

Author : Kezzy Ang'iro

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages