Logo Lanfrica

LarryKarani/IreporterReactJs

Domaine:

peace and security

Type de record:

software
Créateur:
Lar
Hôte:
# 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](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/` | Get a single incident. | |PATCH| `api/v2/interventions//location` | Update a single incident location. | |PATCH| `api/v2/interventions//comment` | Update a single incident comment. | |PATCH| `api/v2/interventions//status` | Update a single incident status. | |DELETE| `api/v2/interventions/` | Delete a single incident. | ## Installation 🕵 - To run on local machine git clone this project : ``` $ git clone github.com ``` Copy and paste the above command in your terminal, the project will be downloaded to your local machine. To Install python checkout: ``` 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 : 127.0.0.1 open postman and navigate to the API endpoints described above ### HEROKU URL ireporter-version2.herokuap… ### Owner - Larry Karani ### Motivation youtube.com # 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 github.com` - Run the build `npm run-script build` - Run the App `npm start` Open localhost to view it in the browser. __Heroku app__ ireporter-frontend-app.hero… __Owener__ Larry Karani