All Projects → flexyourrights → openpolice

flexyourrights / openpolice

Licence: GPL-3.0 license
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.

Programming Languages

PHP
23972 projects - #3 most used programming language
Blade
752 projects
CSS
56736 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to openpolice

Police Brutality
Repository containing evidence of police brutality during the 2020 George Floyd protests
Stars: ✭ 2,724 (+11250%)
Mutual labels:  justice, cop, cops, police-brutality, police-reports
transparencia-dados-abertos-brasil
A survey of Brazilian states' and municipalities' transparency and open data portals, as well as institutional websites, obtained from several public data sources. 🇧🇷 Levantamento de portais estaduais e municipais de transparência e dados abertos, bem como os portais institucionais, obtido a partir de diversas fontes públicas de dados.
Stars: ✭ 46 (+91.67%)
Mutual labels:  open-data, transparency
Catalogos Dados Brasil
Mapeamento de iniciativas (e catálogos) de dados abertos governamentais no Brasil.
Stars: ✭ 187 (+679.17%)
Mutual labels:  open-data, transparency
us-house
117th United States House of Representatives - Contact Information, including: Phone Number, Mailing Address, Official Website, Twitter & Facebook Accounts.
Stars: ✭ 31 (+29.17%)
Mutual labels:  open-data, united-states
wetterdienst
Open weather data for humans
Stars: ✭ 190 (+691.67%)
Mutual labels:  open-data, united-states
cityvizor
Cityvizor je aplikace pro všechny, které zajímá hospodaření obcí v ČR – pro občany, zastupitele, pracovníky obce i novináře. Přináší přehlednou vizualizaci rozpočtu obce s detailními daty, která jsou získávána přímo z jejích účetních systémů a následně zobrazována přehledně, srozumitelně a v souvislostech.
Stars: ✭ 51 (+112.5%)
Mutual labels:  open-data, transparency
Electrophysiologydata
A list of openly available datasets in (mostly human) electrophysiology.
Stars: ✭ 143 (+495.83%)
Mutual labels:  open-data
Data Curator
Data Curator - share usable open data
Stars: ✭ 199 (+729.17%)
Mutual labels:  open-data
Osd Bike Routes
Open source release of bike routes in Chicago.
Stars: ✭ 140 (+483.33%)
Mutual labels:  open-data
Awesome Portugal Data
🇵🇹 Lista de repositórios de dados abertos em Portugal
Stars: ✭ 209 (+770.83%)
Mutual labels:  open-data
Magda
A federated, open-source data catalog for all your big data and small data
Stars: ✭ 193 (+704.17%)
Mutual labels:  open-data
Awesome Italian Public Datasets
A selection of interesting Open dataset from the Italian Public Administration and Civic Data use cases
Stars: ✭ 132 (+450%)
Mutual labels:  open-data
Dados Abertos
Repositório do serviço de Dados Abertos da Câmara. Consulte as "Issues" para atendimento a dúvidas e sugestões.
Stars: ✭ 153 (+537.5%)
Mutual labels:  open-data
Pudl
The Public Utility Data Liberation Project
Stars: ✭ 200 (+733.33%)
Mutual labels:  open-data
Data.gov
Data.gov source code and issue tracker
Stars: ✭ 1,856 (+7633.33%)
Mutual labels:  open-data
City Scrapers
Scrape, standardize and share public meetings from local government websites
Stars: ✭ 220 (+816.67%)
Mutual labels:  open-data
Gnaf Loader
A quick way to get started with PSMA's open GNAF & Admin Boundaries
Stars: ✭ 132 (+450%)
Mutual labels:  open-data
Rsocrata
Provides easier interaction with Socrata open data portals http://dev.socrata.com. Users can provide a 'Socrata' data set resource URL, or a 'Socrata' Open Data API (SoDA) web query, or a 'Socrata' "human-friendly" URL, returns an R data frame. Converts dates to 'POSIX' format. Manages throttling by 'Socrata'.
Stars: ✭ 182 (+658.33%)
Mutual labels:  open-data
Scihub
Source code and data analyses for the Sci-Hub Coverage Study
Stars: ✭ 205 (+754.17%)
Mutual labels:  open-data
Onebusaway Application Modules
The core OneBusAway application suite.
Stars: ✭ 174 (+625%)
Mutual labels:  open-data

FlexYourRights/OpenPolice

Laravel Survloop License: GPL v3

Table of Contents

About

Code bytes measured as stored on Mac disk:

  • PHP Controllers ~ 741 KB (17%)
  • Blade Template Views HTML with some JS CSS ~ 668 KB (16%)
  • Survloop-Generated PHP Eloquent Data Table Models ~ 340 KB (8%)
  • Survloop-Generated PHP Laravel Database Migration & Seeders ~ 2.5 MB (59%)

<a href="https://packagist.org/packages/flexyourrights/openpolice-departments" target="_blank"

Separate package:

  • Survloop-Generated PHP Police Departments & Oversight Seeders ~ 15.9 MB

OpenPolice 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 Survloop, which runs atop Laravel.

OpenPolice.org 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 OpenPolice web app can be tested out here, feedback welcome via the end of the beta demo submission process: /file-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: /complaint-xml-schema, /complaint-xml-example, /complaint-xml-all

Requirements

Getting Started

Installing OpenPolice

Full install instructions also describe how to set up a development environment using VirutalBox, Vargrant, and Laravel's Homestead. For these instructions, the new project directory is 'myopenpolice'.

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 mpdf/mpdf rockhopsoft/survloop flexyourrights/openpolice
% nano composer.json

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

$ nano composer.json
...
"autoload": {
    ...
    "psr-4": {
        ...
        "FlexYourRights\\OpenPolice\\": "vendor/flexyourrights/openpolice/src/",
        "RockHopSoft\\Survloop\\": "vendor/rockhopsoft/survloop/src/",
        "Predis\\": "vendor/predis/predis/src/",
    }
    ...
}, ...

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

$ nano config/app.php
...
'providers' => [
    ...
    App\Providers\FortifyServiceProvider::class,
    FlexYourRights\OpenPolice\OpenPoliceServiceProvider::class,
    RockHopSoft\Survloop\SurvloopServiceProvider::class,
    ...
],
...
'aliases' => [
    ...
    '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
$ sudo 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
$ php artisan db:seed --class=OpenPoliceDeptSeeder
$ 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

Then browsing to the home page should prompt you to create the first admin user account:
http://myopenpolice.local

If everything looks janky, then manually load the style sheets, etc:
http://myopenpolice.local/css-reload

After logging in as an admin, this link rebuilds many supporting files:
http://myopenpolice.local/dashboard/settings?refresh=2

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.

Better documentation is juuust beginning to be created...
openpolice.org/code-package-files-folders-and-classes

More on the Survloop level is also starting here:
survloop.org/package-files-folders-classes.

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

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 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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].