Open Police is an open-source web app empowering citizens to prepare, file, and track reports of police conduct. The site helps users submit complaints or commendations to appropriate police oversight agencies. By allowing users to publish reports online, we aim to establish better public transparency and oversight of police activity in the U.S..
PHP HTML Other
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.md

FlexYourRights/OpenPolice

Laravel SurvLoop License: GPL v3

Open Police is an open-source, open data web app empowering citizens to prepare, file, and track reports of police conduct. The site helps users submit complaints or commendations to appropriate police oversight agencies. By allowing users to publish reports online, we aim to establish better public transparency and oversight of police activity in the U.S.. Open Police is built using SurvLoop, atop Laravel.

OpenPolice.org

It is currently in continued, heavy development, with much happening here in early 2018, almost ready to go live. I plan to provide more documentation in the coming weeks. Thank you for your interest and patience!

The upcoming Open Police web app can be tested out here, feedback welcome via the end of the beta demo submission process:
https://openpolice.org/test
The resulting database designed using the engine, as well as the branching tree which specifies the user's experience: /db/OP
/tree/complaint
Among other methods, the resulting data can also be provided as XML included an automatically generated schema, eg.
/complaint-xml-schema
/complaint-xml-example
/complaint-xml-all

Table of Contents

Requirements

Getting Started

Instructions if you are new to Laravel, or just want to install its local development environment, Homestead: WikiWorldOrder.org/2016/11/26/coding-with-laravel-installing-homestead-on-a-mac/.

Instructions if you are new to Laravel, or just want to install it to an online server: WikiWorldOrder.org/2018/03/15/how-to-install-the-laravel-php-framework-on-digital-ocean/.

The instructions below include the needed steps to install SurvLoop, as well as the Open Police system.

  • Install Laravel's default user authentication, one required package, and SurvLoop:
$ php artisan make:auth
$ php artisan vendor:publish --tag=laravel-notifications
  • Update composer.json to add requirements and an easier SurvLoop and OpenPolice reference:
$ nano composer.json
...
"require": {
	...
    "wikiworldorder/survloop": "0.*",
    "flexyourrights/openpolice": "0.*",
	...
},
...
"autoload": {
	...
	"psr-4": {
		...
		"SurvLoop\\": "vendor/wikiworldorder/survloop/src/",
		"OpenPolice\\": "vendor/flexyourrights/openpolice/src/",
		"MatthiasMullie\\Minify\\": "vendor/matthiasmullie/minify/src/",
		"MatthiasMullie\\PathConverter\\": "vendor/matthiasmullie/path-converter/src/",
	}
	...
},
...
$ composer update
  • Add the package to your application service providers in config/app.php.
$ nano config/app.php
...
    'name' => 'Open Police Complaints',
...
'providers' => [
	...
	SurvLoop\SurvLoopServiceProvider::class,
	OpenPolice\OpenPoliceServiceProvider::class,
	...
],
...
'aliases' => [
	...
	'SurvLoop'	 => 'WikiWorldOrder\SurvLoop\SurvLoopFacade',
	...
],
...
  • Swap out the SurvLoop user model in config/auth.php.
$ nano config/auth.php
...
'model' => App\Models\User::class,
...
  • Update composer, publish the package migrations, etc...
$ php artisan vendor:publish --force
$ php artisan migrate
$ composer dump-autoload
$ php artisan db:seed --class=SurvLoopSeeder
$ php artisan db:seed --class=OpenPoliceSeeder
$ php artisan db:seed --class=OpenPoliceDepartmentSeeder
  • Log into Open Police admin dashboard...
user: open@openpolice.org
password: openpolice

Documentation

Once installed, documentation of this system's database design can be found at /dashboard/db/all . This system's user experience design for data entry can be found at /dashboard/tree/map?all=1&alt=1 or publicly visible links like those above.

Roadmap

Here's the TODO list for the next release (1.0). It's my first time building on Laravel, or GitHub. So sorry.

  • Correct all issues needed for minimum viable product, and launch beta site.
  • Code commenting, learning and adopting more community norms.
  • Finish migrating all raw queries to use Laravel's process.
  • Adding tests.

Change Logs

Contribution Guidelines

Please help educate me on best practices for sharing code in this community. Please report any issue you find in the issues page.

Reporting a Security Vulnerability

We want to ensure that Open Police Complaints is a secure HTTP open data platform for everyone. If you've discovered a security vulnerability in OpenPolice.org, we appreciate your help in disclosing it to us in a responsible manner.

Publicly disclosing a vulnerability can put the entire community at risk. If you've discovered a security concern, please email us at wikiworldorder at protonmail.com. We'll work with you to make sure that we understand the scope of the issue, and that we fully address your concern. We consider correspondence sent to wikiworldorder at protonmail.com our highest priority, and work to address any issues that arise as quickly as possible.

After a security vulnerability has been corrected, a release will be deployed as soon as possible.