Package Data | |
---|---|
Maintainer Username: | rockhopsoft |
Maintainer Contact: | morgan@flexyourrights.org (Morgan Lesko) |
Package Create Date: | 2015-10-14 |
Package Last Update: | 2022-01-21 |
Home Page: | http://OpenPolice.org |
Language: | PHP |
License: | GPL-3.0-or-later |
Last Refreshed: | 2024-12-22 03:09:44 |
Package Statistics | |
---|---|
Total Downloads: | 255 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 24 |
Total Watchers: | 8 |
Total Forks: | 7 |
Total Open Issues: | 4 |
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 extends SurvLoop, which runs atop Laravel.
OpenPolice.org
It is currently in continued, heavy development, with the pilot program rolling now in early 2019. I plan to provide more documentation in the coming weeks. Thank you for your interest and patience! This software began as an internal tool to design our database, then prototype survey generation. Then it was adapted to the Laravel framework, and has continued to grow towards a content-management system for data-focused websites.
The upcoming Open Police web app can be tested out here, feedback welcome via the end of the beta demo submission process: /filing-your-police-complaint 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
First, install Docker on Mac, Windows, or an online server. Then grab a copy of Laravel (last tested with v5.8.3)...
$ git clone https://github.com/laravel/laravel.git opc
$ cd opc
Next, install and boot up Laradock (last tested with v7.14).
$ git submodule add https://github.com/Laradock/laradock.git
$ cd laradock
$ cp env-example .env
$ docker-compose up -d nginx mysql phpmyadmin redis workspace
After Docker finishes booting up your containers, enter the mysql container with the root password, "root". This seems to fix things for the latest version of MYSQL.
$ docker-compose exec mysql bash
# mysql --user=root --password=root default
mysql> ALTER USER 'default'@'%' IDENTIFIED WITH mysql_native_password BY 'secret';
mysql> exit;
$ exit
At this point, you can optionally browse to http://localhost:8080 for PhpMyAdmin.
Server: mysql
Username: default
Password: secret
Finally, enter Laradock's workspace container to download and run the Open Police installation script.
$ docker-compose exec workspace bash
# git clone https://github.com/flexyourrights/docker-openpolice.git
# chmod +x ./docker-openpolice/bin/*.sh
# ./docker-openpolice/bin/openpolice-laradock-postinstall.sh
And if all has gone well, you'll be asked to create a master admin user account when you browse to http://localhost/. If it loads, but looks janky (without CSS), reload the page once... and hopefully it looks like a fresh install.
The instructions below include the needed steps to install Laravel, SurvLoop, and Open Police Complaints. For more on creating environments to host Laravel, you can find more instructions on SurvLoop.org.
If you've got PHP running, and Composer installed, you can just run this install script...
$ git clone https://github.com/flexyourrights/docker-openpolice.git
$ chmod +x ./docker-openpolice/bin/*.sh
$ ./docker-openpolice/bin/openpolice-compose-install.sh ProjectFolderName
$ composer global require "laravel/installer"
$ composer create-project laravel/laravel ProjectFolderName "5.8.*"
$ cd ProjectFolderName
$ php artisan key:generate
$ php artisan make:auth
$ composer require flexyourrights/openpolice
$ sed -i 's/App\\User::class/App\\Models\\User::class/g' config/auth.php
$ echo "0" | php artisan vendor:publish --force
$ php artisan migrate
$ composer dump-autoload
$ php artisan db:seed --class=SurvLoopSeeder
$ php artisan db:seed --class=ZipCodeSeeder
$ php artisan db:seed --class=OpenPoliceSeeder
$ php artisan db:seed --class=OpenPoliceDeptSeeder
$ chown -R www-data:33 app/Models
$ chown -R www-data:33 database
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.
More on the SurvLoop level is also starting here: https://survloop.org/package-files-folders-classes.
Here's the TODO list for the next release (1.0). It's my first time building on Laravel, or GitHub. So sorry.
Please help educate me on best practices for sharing code in this community. Please report any issue you find in the issues page.
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.