Skip to content

iReporter is a web application that enables any/every citizen 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.

Notifications You must be signed in to change notification settings

katherine95/iReporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Coverage Status Maintainability

iReporter

iReporter enables any/every citizen 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.

This site is published at https://katherine95.github.io/iReporter/UI/index.html

Prerequisites

Html5, CSS3, python, flask, flask_restful 

Getting Started

  1. Clone this repository git clone https://github.com/katherine95/iReporter.git

  2. Change the directory into the project directory. cd iReporter

  3. Fetch all origin to get all branches git fetch origin

  4. Checkout to develop-api-v2 branch. git checkout develop-api-v2

  5. Create a virtual environment to allow you to manage separate package installations for different projects. virtualenv -p python3 venv

  6. Activate virtual environment source venv/bin/activate

  7. Install requirements(all packages that the project needs) pip install -r requirements.txt

  8. Start server export FLASK_APP=run.py flask run

  9. Test the endpoints on postman.

    EndPoint Url Functionality
    POST /api/v2/auth/signup Register a user
    POST /api/v2/auth/login User log-in with valid username and password
    GET /api/v2/auth/signup Allow an athenticated admin to get all registered users
    POST /api/v2/incidents Allow authenticated user to create an incident
    GET /api/v2/incidents Allow authenticated user to fetch all incidents created
    GET /api/v2/incidents/int:id Allow authenticated user to fetch a single incident
    PATCH /api/v2/incidents/int:id Allow only an admin to change the status of an incident
    PATCH /api/v2/user/incidents/int:id Allow user to edit comment/location of his/her records
    DELETE /api/v2/incidents/int:id Allow authenticated user to delete his/her records
    PATCH /auth/users/ Allow an authenticated admin user to create a new admin
  10. To run migrations: run python3 migrate.py

  11. To run tests: run pytest

  12. To check test coverage: run py.test --cov=app/api/v2

    Link to Hosted demo

About

iReporter is a web application that enables any/every citizen 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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published