PHP JavaScript CSS Ruby HTML Shell
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
application
component
config
install
library
scripts
sites
tests
vendor
.gitignore
CHANGELOG.md
CONTRIBUTING.md
Gemfile
Gemfile.lock
Gruntfile.js
LICENSE.md
README.md
Vagrantfile
bower.json
composer.json
composer.lock
package.json
screenshot.jpg
yarn.lock

README.md

Screenshot

Open Police

Open Police is an open source web publishing platform for police forces. It makes creating an open, modern, affordable, website to better connect with citizens very easy.

It uses a component based architecture. Written in PHP, HTML, CSS and Javascript. Made by passionate open source technologists and built on a purely free and open source software stack.

Check our demo website or visit our project's website.

Features

  • Mobile-First responsive design
  • Optimized for performance and security
  • Features a component based architecture
  • Dynamic and cascading HMVC
  • Level 3 JSON REST API

Discover all features.

Used by

Open Police v2 is being used by the Belgian local and federal police.

A few live websites (in dutch or french):

Installation

You can run the project easily with the supplied Vagrantfile - make sure you understand what Vagrant is.

  • Install Composer
  • Install VirtualBox
  • Install Vagrant
  • Clone this repository
  • Go to the repository folder and bootup the server
    $ vagrant up
    
  • Add the following line to your hosts file
    192.168.52.10 police.dev phpmyadmin.police.dev
    
  • You can now access the sample site at police.dev

Access

Theme development

We are using Grunt to automate repetitive tasks like Sass compilation, synchronised browser testing, etc.

  • Install Bower
  • Install Yarn
  • Go to the repository folder and install the dependencies:
    yarn install
    
  • Finally run Grunt
    grunt
    

Vagrant command-line interface

You can use the following commands to manage the server:

  • vagrant up to initially start the server
  • vagrant ssh to SSH into the running Vagrant machine
  • vagrant reload reboots the server
  • vagrant halt powers the server down
  • vagrant suspend & vagrant resume to make the server sleep/wake up
  • vagrant destroy to stop and destroy all resources of the server

More information about the Vagrant command-line interface can be found at docs.vagrantup.com.

Secure Shell

You can use the following commands to manage the platform:

  • police reinstall to re-create the sample site.

First use the Vagrant command-line interface to access the Secure Shell: vagrant ssh.

Database migrations

Database migrations are being managed using Phpmig.

The Vagrant box will setup everything for you. To make sure you have applied the latest database changes, browse to cd scripts/phpmig and execute bin/phpmig migrate.

To see a list of all migrations and their status, run bin/phpmig status. Use the bin/phpmig up <migration ID>and bin/phpmig down <migration ID> commands to apply or undo specific migrations.

For more information, please refer to the Phpmig GitHub page.

How to contribute?

Check our contributing guide.

License

The files in this archive are released under the AGPLv3 license. You can find a copy of this license in LICENSE.