PHPackages                             flexyourrights/openpolice-extension - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. flexyourrights/openpolice-extension

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

flexyourrights/openpolice-extension
===================================

This package provides a starting point to build country-specific variations of OpenPolice.org.

v0.3.0(5y ago)08GPL-3.0-or-laterPHP

Since Jan 30Pushed 5y ago2 watchersCompare

[ Source](https://github.com/flexyourrights/openpolice-extension)[ Packagist](https://packagist.org/packages/flexyourrights/openpolice-extension)[ RSS](/packages/flexyourrights-openpolice-extension/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

FlexYourRights/OpenPoliceExtension
==================================

[](#flexyourrightsopenpoliceextension)

[![Laravel](https://camo.githubusercontent.com/63c355db3df3f1e1b3ad5e48714d903407a63ffe150798f38dc65e4059bf5e0b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d382e352d6f72616e67652e7376673f7374796c653d666c61742d737175617265)](http://laravel.com)[![Survloop](https://camo.githubusercontent.com/830bf008e0086fc986f0f0254b308649efcfb47050b814bbf6de73cf76bc4730/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f537572766c6f6f702d302e332d6f72616e67652e7376673f7374796c653d666c61742d737175617265)](https://github.com/rockhopsoft/survloop)[![License: GPL v3](https://camo.githubusercontent.com/1b0c7e4911720d0444c16a1ffd145a039f14a1a7305362ab51184f757a4dd6bc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d47504c25323076332d626c75652e737667)](https://www.gnu.org/licenses/gpl-3.0)

Table of Contents
=================

[](#table-of-contents)

- [About](#about)
- [Requirements](#requirements)
- [Getting Started](#getting-started)
- [Documentation](#documentation)
- [Roadmap](#roadmap)
- [Change Logs](#change-logs)
- [Contribution Guidelines](#contribution-guidelines)
- [Reporting a Security Vulnerability](#security-help)

About
======================================

[](#about)

This package provides a starting point to build variations of OpenPolice.org. Hopefully, you should be able to...

- Make a copy of this repository for your new project
- In you new project, replace all FlexYourRights\\OpenPoliceExtension references with your package's primary class name, like MyVendorName\\MyOpenPoliceProject"
- Replace all flexyourrights\\openpolice-extension references with your package's directory, like my-org-name\\my-open-police-project"
-

[OpenPolice.org](https://openpolice.org)[OpenPolice.org is an open-source, open data web app](https://github.com/flexyourrights/openpolice) 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 [Survloop](https://github.com/rockhopsoft/survloop), which runs atop [Laravel](https://laravel.com/).

Requirements
====================================================

[](#requirements)

- php: &gt;=7.4
- [laravel/laravel](https://packagist.org/packages/laravel/laravel): 8.5.\*
- [rockhopsoft/survloop](https://packagist.org/packages/rockhopsoft/survloop): &gt;=0.3.\*
- [flexyourrights/openpolice](https://packagist.org/packages/flexyourrights/openpolice): &gt;=0.3.\*

Getting Started
==========================================================

[](#getting-started)

Installing OpenPolice
---------------------

[](#installing-openpolice)

[Full install instructions](https://openpolice.org/how-to-install-local-openpolice) also describe how to set up a development environment using VirutalBox, Vargrant, and [Laravel's Homestead](https://laravel.com/docs/8.x/homestead). For these instructions, the new project directory is 'myopenpolice'.

### Install Laravel, Survloop, &amp; OpenPolice on Homestead

[](#install-laravel-survloop--openpolice-on-homestead)

```
% composer create-project laravel/laravel myopenpolice "8.5.*"
% cd myopenpolice

```

Edit these lines of the environment file to connect the default MYSQL database:

```
% nano .env

```

```
APP_NAME="My Open Police"
APP_URL=http://myopenpolice.local

DB_HOST=localhost
DB_PORT=33060
DB_CONNECTION=mysql
DB_DATABASE=myopenpolice
DB_USERNAME=homestead
DB_PASSWORD=secret

```

Next, install Laravel's out-of-the-box user authentication tools, Survloop, and the OpenPolice.org software:

```
% php artisan key:generate
% php artisan cache:clear
% COMPOSER_MEMORY_LIMIT=-1 composer require flexyourrights/openpolice-extension
% nano composer.json

```

From your Laravel installation's root directory, update `composer.json` to require and easily reference OpenPoliceExtension:

```
$ nano composer.json

```

```
...
"autoload": {
    ...
    "psr-4": {
        ...
        "FlexYourRights\\OpenPoliceExtension\\": "vendor/flexyourrights/openpolice-extension/src/",
        "FlexYourRights\\OpenPolice\\": "vendor/flexyourrights/openpolice/src/",
        "RockHopSoft\\Survloop\\": "vendor/rockhopsoft/survloop/src/",
    }
    ...
}, ...

```

Hopefully, editing `config/app.php` is no longer needed, but this can be tried if later steps break.

```
$ nano config/app.php

```

```
...
'providers' => [
    ...
    FlexYourRights\OpenPoliceExtension\OpenPoliceExtensionServiceProvider::class,
    FlexYourRights\OpenPolice\OpenPoliceServiceProvider::class,
    RockHopSoft\Survloop\SurvloopServiceProvider::class,
    ...
],
...
'aliases' => [
    ...
    'OpenPoliceExtension' => 'FlexYourRights\OpenPoliceExtension\OpenPoliceExtensionFacade',
    'OpenPolice' => 'FlexYourRights\OpenPolice\OpenPoliceFacade',
    'Survloop' => 'RockHopSoft\Survloop\SurvloopFacade',
    ...
], ...

```

If installing on a server, you might also need to fix some permissions before the following steps...

```
% chown -R www-data:33 storage database app/Models

```

Clear caches and publish the package migrations...

```
% php artisan config:clear
% php artisan route:clear
% php artisan view:clear
% echo "0" | php artisan vendor:publish --force
% composer dump-autoload
% curl http://myopenpolice.local/css-reload

```

With certain databases (like some managed by DigitalOcean), you may need to tweak the Laravel migration:

```
% nano database/migrations/2014_10_12_100000_create_password_resets_table.php
% nano database/migrations/2019_08_19_000000_create_failed_jobs_table.php

```

Add this line before the "Schema::create" line in each file:

```
\Illuminate\Support\Facades\DB::statement('SET SESSION sql_require_primary_key=0');

```

Then initialize the database:

```
$ php artisan migrate
$ php artisan db:seed --class=OpenPoliceSeeder

```

And if you want to import our list of United States police departments and zip codes:

```
$ php artisan db:seed --class=OpenPoliceDeptSeeder
$ php artisan db:seed --class=OpenPoliceDeptSeeder2
$ php artisan db:seed --class=OpenPoliceDeptSeeder3
$ php artisan db:seed --class=OpenPoliceDeptSeeder4
$ php artisan db:seed --class=ZipCodeSeeder
$ php artisan db:seed --class=ZipCodeSeeder2
$ php artisan db:seed --class=ZipCodeSeeder3
$ php artisan db:seed --class=ZipCodeSeeder4

```

### Initialize OpenPolice Installation

[](#initialize-openpolice-installation)

Then browsing to the home page should prompt you to create the first admin user account:

If everything looks janky, then manually load the style sheets, etc:

After logging in as an admin, this link rebuilds many supporting files:

Documentation
======================================================

[](#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&amp;alt=1 or publicly visible links like those above.

Better documentation is juuust beginning to be created...
[openpolice.org/code-package-files-folders-and-classes](https://openpolice.org/code-package-files-folders-and-classes)

More on the Survloop level is also starting here:
[survloop.org/package-files-folders-classes](https://survloop.org/package-files-folders-classes).

Roadmap
==========================================

[](#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 Open Police Complaints.
- Integrate options for MFA using Laravel-compatible package.
- Code commenting, learning and adopting more community norms.
- Add decent levels of unit testing. Hopefully improve the organization of objects/classes.

Contribution Guidelines
==========================================================================

[](#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
===========================================================================

[](#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 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.

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

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1927d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/15270653?v=4)[Morgan Lesko](/maintainers/rockhopsoft)[@rockhopsoft](https://github.com/rockhopsoft)

---

Top Contributors

[![rockhopsoft](https://avatars.githubusercontent.com/u/15270653?v=4)](https://github.com/rockhopsoft "rockhopsoft (5 commits)")

---

Tags

laravelAccountabilitysurveySurvLoopOpen PoliceOpen Police ComplaintsFlex Your Rightsmisconductcomplimentscommendationspolice departmentsoversight

### Embed Badge

![Health badge](/badges/flexyourrights-openpolice-extension/health.svg)

```
[![Health](https://phpackages.com/badges/flexyourrights-openpolice-extension/health.svg)](https://phpackages.com/packages/flexyourrights-openpolice-extension)
```

###  Alternatives

[matt-daneshvar/laravel-survey

Create surveys inside your Laravel app

28770.3k](/packages/matt-daneshvar-laravel-survey)[tapp/filament-survey

Filament Laravel Survey plugin.

3119.2k](/packages/tapp-filament-survey)[tapp/filament-form-builder

User facing form builder using Filament components

131.2k1](/packages/tapp-filament-form-builder)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
