/IreporterReactJs

# iReporterApi iReporter is an application whose aim is to reduce corruption in Africa and foster economic development. It allows users to create red flags and interventions. It implents the following list of APIs. ### Framework used The application is built using python: flask framework. >[Flask](http://flask.pocoo.org/) is a microframework for the Python programming language. ### End points Method | Endpoint | Usage | | ---- | ---- | --------------- | |POST| `/api/v2/auth/signup` | Register a user. | |POST| `api/v2/auth/login` | Login user.| |POST| `api/v2/auth/logout` | Logs out a user.| |POST| `api/v2/interventions` | Create a new incident. | |GET| `api/v2/interventions` | Get all the created incidents. | |GET| `api/v2/interventions/user` | Get all incident of the logged in user. | |GET| `api/v2/interventions/<incident_id>` | Get a single incident. | |PATCH| `api/v2/interventions/<incident_id>/location` | Update a single incident location. | |PATCH| `api/v2/interventions/<incident_id>/comment` | Update a single incident comment. | |PATCH| `api/v2/interventions/<incident_id>/status` | Update a single incident status. | |DELETE| `api/v2/interventions/<incident_id>` | Delete a single incident. | ## Installation 🕵 - To run on local machine git clone this project : ``` $ git clone https://github.com/larryTheGeek/iReporterApi.git ``` Copy and paste the above command in your terminal, the project will be downloaded to your local machine. To Install python checkout: ``` https://www.python.org/ ``` - create a virtualenv and make it use python 3 using the following command. ``` $ virtualenv -p python3 env ``` - activate the virtual environment ``` $ source env/bin/activate ``` - Install Requirements ``` $ pip install -r requirements.txt ``` ### Testing - Run Test using pytest with the following command ``` $ py.test --cov=app test` ``` you will get the test coverage report on your terminal The app can also be tested via Postman - Run App ``` $ python run.py ``` The app should be accessiable via : http://127.0.0.1:5000/ open postman and navigate to the API endpoints described above ### HEROKU URL https://ireporter-version2.herokuapp.com/api/v2/ ### Owner - Larry Karani ### Motivation https://www.youtube.com/watch?v=wHRUDL7GKmI

Primary LanguageJavaScript

iReporter

Corruption is a huge bane to Africa’s development. African countries must develop novel and localised solutions that will curb this menace, hence the birth of iReporter. iReporter enables citizens to bring any form of corruption to the notice of appropriate authorities and the general public. Users can also report on things that needs government intervention.

Ireporter Platform implements the following functionality

  • Users can create an account and log in.
  • Users can create a red-flag record i.e a corruption incident.
  • Users can create intervention record i.e situations that need goverment interventions eg building bridges.
  • Users can edit their incident or intervention records.
  • Users can delete their incident or intervention records.
  • Users can add their location.

Instalation

  • Clone the repository git clone https://github.com/larryTheGeek/IreporterReactJs.git

  • Run the build npm run-script build

  • Run the App npm start Open http://localhost:3000 to view it in the browser.

Heroku app

https://ireporter-frontend-app.herokuapp.com

Owener

Larry Karani