This repository contains the Andela Challenge Project
WeConnect is a web application that has a Restful backend api that feeds a Reactjs front-end app
The front ent version of the application is currently made with Bootstrap it is stored in the UI folder which includes the templates of that capture the following. User registration,User login, A page where an authenticated user can register his/her business. A page that shows the profile of a business and shows the available reviews from users about that business. A page where a user updates his/her business profile. A page where a user updates his/her business profile.
- UI Designs for the front-end application are hosted on Github-Pages
The API Back-end is implemented using flask and it is a RestFul API it is also implemented using unittests (Test Driven Development)
- flask
- flask-Restplus
- pytest
- virtualenv
- flask
- Pytest
In order to run the API Application
-
Clone this Repository to your development machine
- Start by copying the url to this Repository
- Run this command in git bash to create the repo locally
git clone https://github.com/tibetegya/WeConnect.git
-
Create a virtual environment inside api-appliction folder using in a terminal shell
virtualenv ENV
-
Activate the virtual environment but running the following command
env\scripts\activate
-
Install the dependencies by running the following command in a terminal shell
pip install requirements.txt
-
Now set Flask App name by running
export FLASK_APP = run.py
(for Linux and Mac) In case you are on Windows useset
instead ofexport
-
Run the application by running commands
flask run
EndPoint | Method |
---|---|
/api/auth/register |
POST |
/api/auth/login |
POST |
/api/auth/logout |
POST |
/api/auth/reset-password |
POST |
/api/businesses |
POST |
/api/businesses/<businessId> |
PUT |
/api//businesses/<businessId> |
DELETE |
/api/businesses |
GET |
/api/businesses/<businessId> |
GET |
/api/businesses/<businessId>/reviews |
POST |
/api/businesses/<businessId>/reviews |
GET |
-
Use Pytest to test the endpoints For example Run
pytest tests.py
The application is deployed on Heroku Server at
The project is licensed using MIT License therefore you are free to clone the repository and modify the code base in any way you would like.
Copyright 2018 Tibetegya MIT