{"id":14036771,"url":"https://github.com/flexyourrights/openpolice","last_synced_at":"2026-01-11T16:37:21.106Z","repository":{"id":44434146,"uuid":"44276706","full_name":"flexyourrights/openpolice","owner":"flexyourrights","description":"OpenPolice empowers people to prepare, file, and track police misconduct complaints. By allowing users to publish reports online, we aim to establish an independent and transparent repository of police activity in the U.S.","archived":false,"fork":false,"pushed_at":"2022-01-21T01:46:22.000Z","size":76748,"stargazers_count":24,"open_issues_count":4,"forks_count":7,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-11-27T05:32:21.278Z","etag":null,"topics":["cop","cops","justice","nationwide","open-data","police-brutality","police-complaint","police-misconduct","police-reports","transparency","united-states"],"latest_commit_sha":null,"homepage":"http://OpenPolice.org","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flexyourrights.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-14T21:12:15.000Z","updated_at":"2024-09-26T19:06:00.000Z","dependencies_parsed_at":"2022-08-21T08:40:33.980Z","dependency_job_id":null,"html_url":"https://github.com/flexyourrights/openpolice","commit_stats":null,"previous_names":[],"tags_count":66,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexyourrights%2Fopenpolice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexyourrights%2Fopenpolice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexyourrights%2Fopenpolice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexyourrights%2Fopenpolice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flexyourrights","download_url":"https://codeload.github.com/flexyourrights/openpolice/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227762244,"owners_count":17815990,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cop","cops","justice","nationwide","open-data","police-brutality","police-complaint","police-misconduct","police-reports","transparency","united-states"],"created_at":"2024-08-12T03:02:13.327Z","updated_at":"2026-01-11T16:37:21.044Z","avatar_url":"https://github.com/flexyourrights.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"\n# FlexYourRights/OpenPolice\n\n[![Laravel](https://img.shields.io/badge/Laravel-8.5-orange.svg?style=flat-square)](http://laravel.com)\n[![Survloop](https://img.shields.io/badge/Survloop-0.3-orange.svg?style=flat-square)](https://github.com/rockhopsoft/survloop)\n[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n\n# Table of Contents\n* [About](#about)\n* [Requirements](#requirements)\n* [Getting Started](#getting-started)\n* [Documentation](#documentation)\n* [Roadmap](#roadmap)\n* [Change Logs](#change-logs)\n* [Contribution Guidelines](#contribution-guidelines)\n* [Reporting a Security Vulnerability](#security-help)\n\n\n# \u003ca name=\"about\"\u003e\u003c/a\u003eAbout\nCode bytes measured as stored on Mac disk:\n* PHP Controllers ~ 741 KB (17%)\n* Blade Template Views HTML with some JS CSS ~ 668 KB (16%)\n* Survloop-Generated PHP Eloquent Data Table Models ~ 340 KB (8%)\n* Survloop-Generated PHP Laravel Database Migration \u0026 Seeders ~ 2.5 MB (59%)\n\n\u003ca href=\"https://packagist.org/packages/flexyourrights/openpolice-departments\" target=\"_blank\"\n\u003eSeparate package\u003c/a\u003e:\n* Survloop-Generated PHP Police Departments \u0026 Oversight Seeders ~ 15.9 MB\n\nOpenPolice 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. OpenPolice extends \u003ca href=\"https://github.com/rockhopsoft/survloop\" target=\"_blank\"\u003eSurvloop\u003c/a\u003e, which runs atop \u003ca href=\"https://laravel.com/\" target=\"_blank\"\u003eLaravel\u003c/a\u003e.\n\n\u003ca href=\"https://openpolice.org\" target=\"_blank\"\u003eOpenPolice.org\u003c/a\u003e\nThis 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.\n\nThe upcoming OpenPolice web app can be tested out here, feedback welcome via the end of the \u003cb\u003ebeta demo\u003c/b\u003e submission process: \u003ca href=\"https://openpolice.org/file-your-police-complaint\" target=\"_blank\"\u003e/file-your-police-complaint\u003c/a\u003e\nThe resulting database designed using the engine, as well as the branching tree which specifies the user's experience: \u003ca href=\"https://openpolice.org/db/OP\" target=\"_blank\"\u003e/db/OP\u003c/a\u003e, \u003ca href=\"https://openpolice.org/tree/complaint\" target=\"_blank\"\u003e/tree/complaint\u003c/a\u003e\nAmong other methods, the resulting data can also be provided as XML included an automatically generated schema: \u003ca href=\"https://openpolice.org/complaint-xml-schema\" target=\"_blank\"\u003e/complaint-xml-schema\u003c/a\u003e, \u003ca href=\"https://openpolice.org/complaint-xml-example\" target=\"_blank\"\u003e/complaint-xml-example\u003c/a\u003e, \u003ca href=\"https://openpolice.org/complaint-xml-all\" target=\"_blank\"\u003e/complaint-xml-all\u003c/a\u003e\n\n\n# \u003ca name=\"requirements\"\u003e\u003c/a\u003eRequirements\n\n* php: \u003e=7.4\n* \u003ca href=\"https://packagist.org/packages/laravel/laravel\" target=\"_blank\"\u003elaravel/laravel\u003c/a\u003e: 8.5.*\n* \u003ca href=\"https://packagist.org/packages/rockhopsoft/survloop\" target=\"_blank\"\u003erockhopsoft/survloop\u003c/a\u003e: \u003e=0.3\n* \u003ca href=\"https://packagist.org/packages/flexyourrights/openpolice-departments\" target=\"_blank\"\u003eflexyourrights/openpolice-departments\u003c/a\u003e: \u003e=0.*\n* \u003ca href=\"https://packagist.org/packages/flexyourrights/openpolice-website\" target=\"_blank\"\u003eflexyourrights/openpolice-website\u003c/a\u003e: \u003e=0.*\n\n# \u003ca name=\"getting-started\"\u003e\u003c/a\u003eGetting Started\n\n## Installing OpenPolice\n\n\u003ca href=\"https://openpolice.org/how-to-install-local-openpolice\" target=\"_blank\"\u003eFull install instructions\u003c/a\u003e also describe how to set up a development environment using VirutalBox, Vargrant, and \u003ca href=\"https://laravel.com/docs/8.x/homestead\" target=\"_blank\"\u003eLaravel's Homestead\u003c/a\u003e. For these instructions, the new project directory is 'myopenpolice'.\n\n### Install Laravel, Survloop, \u0026 OpenPolice on Homestead\n```\n% composer create-project laravel/laravel myopenpolice \"8.5.*\"\n% cd myopenpolice\n\n```\n\nEdit these lines of the environment file to connect the default MYSQL database:\n```\n% nano .env\n```\n```\nAPP_NAME=\"My Open Police\"\nAPP_URL=http://myopenpolice.local\n\nDB_HOST=localhost\nDB_PORT=33060\nDB_CONNECTION=mysql\nDB_DATABASE=myopenpolice\nDB_USERNAME=homestead\nDB_PASSWORD=secret\n```\n\nNext, install Laravel's out-of-the-box user authentication tools, Survloop, and the OpenPolice.org software:\n```\n% php artisan key:generate\n% php artisan cache:clear\n% COMPOSER_MEMORY_LIMIT=-1 composer require mpdf/mpdf rockhopsoft/survloop flexyourrights/openpolice\n% nano composer.json\n```\n\nFrom your Laravel installation's root directory, update `composer.json` to require and easily reference OpenPolice:\n```\n$ nano composer.json\n```\n```\n...\n\"autoload\": {\n    ...\n    \"psr-4\": {\n        ...\n        \"FlexYourRights\\\\OpenPolice\\\\\": \"vendor/flexyourrights/openpolice/src/\",\n        \"RockHopSoft\\\\Survloop\\\\\": \"vendor/rockhopsoft/survloop/src/\",\n        \"Predis\\\\\": \"vendor/predis/predis/src/\",\n    }\n    ...\n}, ...\n```\n\nHopefully, editing `config/app.php` is no longer needed, but this can be tried if later steps break.\n```\n$ nano config/app.php\n```\n```\n...\n'providers' =\u003e [\n    ...\n    App\\Providers\\FortifyServiceProvider::class,\n    FlexYourRights\\OpenPolice\\OpenPoliceServiceProvider::class,\n    RockHopSoft\\Survloop\\SurvloopServiceProvider::class,\n    ...\n],\n...\n'aliases' =\u003e [\n    ...\n    'OpenPolice' =\u003e 'FlexYourRights\\OpenPolice\\OpenPoliceFacade',\n    'Survloop' =\u003e 'RockHopSoft\\Survloop\\SurvloopFacade',\n    ...\n], ...\n```\n\nIf installing on a server, you might also need to fix some permissions before the following steps...\n```\n% chown -R www-data:33 storage database app/Models\n```\n\nClear caches and publish the package migrations...\n```\n% php artisan config:clear\n% php artisan route:clear\n% php artisan view:clear\n% echo \"0\" | php artisan vendor:publish --force\n% composer dump-autoload\n% curl http://myopenpolice.local/css-reload\n```\n\nWith certain databases (like some managed by DigitalOcean), you may need to tweak the Laravel migration:\n```\n$ nano database/migrations/2014_10_12_100000_create_password_resets_table.php\n$ sudo nano database/migrations/2019_08_19_000000_create_failed_jobs_table.php\n```\nAdd this line before the \"Schema::create\" line in each file:\n```\n\\Illuminate\\Support\\Facades\\DB::statement('SET SESSION sql_require_primary_key=0');\n```\n\nThen initialize the database:\n```\n$ php artisan migrate\n$ php artisan db:seed --class=OpenPoliceSeeder\n$ php artisan db:seed --class=OpenPoliceDeptSeeder\n$ php artisan db:seed --class=ZipCodeSeeder\n$ php artisan db:seed --class=ZipCodeSeeder2\n$ php artisan db:seed --class=ZipCodeSeeder3\n$ php artisan db:seed --class=ZipCodeSeeder4\n```\n\n### Initialize OpenPolice Installation\n\nThen browsing to the home page should prompt you to create the first admin user account:\u003cbr /\u003e\nhttp://myopenpolice.local\n\nIf everything looks janky, then manually load the style sheets, etc:\u003cbr /\u003e\nhttp://myopenpolice.local/css-reload\n\nAfter logging in as an admin, this link rebuilds many supporting files:\u003cbr /\u003e\nhttp://myopenpolice.local/dashboard/settings?refresh=2\n\n\n# \u003ca name=\"documentation\"\u003e\u003c/a\u003eDocumentation\n\nOnce 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\u0026alt=1 or publicly visible links like those above.\n\nBetter documentation is juuust beginning to be created...\u003cbr /\u003e\n\u003ca href=\"https://openpolice.org/code-package-files-folders-and-classes\" target=\"_blank\"\u003eopenpolice.org/code-package-files-folders-and-classes\u003c/a\u003e\n\nMore on the Survloop level is also starting here: \u003cbr /\u003e\n\u003ca href=\"https://survloop.org/package-files-folders-classes\" target=\"_blank\"\u003esurvloop.org/package-files-folders-classes\u003c/a\u003e.\n\n# \u003ca name=\"roadmap\"\u003e\u003c/a\u003eRoadmap\n\nHere's the TODO list for the next release (**1.0**). It's my first time building on Laravel, or GitHub. So sorry.\n\n* [ ] Correct all issues needed for minimum viable product, and launch Open Police Complaints.\n* [ ] Integrate options for MFA using Laravel-compatible package.\n* [ ] Code commenting, learning and adopting more community norms.\n* [ ] Add decent levels of unit testing. Hopefully improve the organization of objects/classes.\n\n\n# \u003ca name=\"contribution-guidelines\"\u003e\u003c/a\u003eContribution Guidelines\n\nPlease help educate me on best practices for sharing code in this community. Please report any issue you find in the issues page.\n\n# \u003ca name=\"security-help\"\u003e\u003c/a\u003eReporting a Security Vulnerability\n\nWe 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.\n\nPublicly disclosing a vulnerability can put the entire community at risk. If you've discovered a security concern, please email us at rockhoppers *at* runbox.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 rockhoppers *at* runbox.com our highest priority, and work to address any issues that arise as quickly as possible.\n\nAfter a security vulnerability has been corrected, a release will be deployed as soon as possible.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflexyourrights%2Fopenpolice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflexyourrights%2Fopenpolice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflexyourrights%2Fopenpolice/lists"}