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.
- Mobile-First responsive design
- Optimized for performance and security
- Features a component based architecture
- Dynamic and cascading HMVC
- Level 3 JSON REST API
Open Police v2 is being used by the Belgian local and federal police.
A few live websites (in dutch or french):
- Federal police
- Local police force of Ghent
- Local police force of Louvain
- Local police force of Namur
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
- The example site application is available at http://police.dev.
- The example admin application is available at http://police.dev/administrator.
email: [email protected] password: police
- MailCatcher is available at http://police.dev:1080/
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
You can use the following commands to manage the server:
vagrant up
to initially start the servervagrant ssh
to SSH into the running Vagrant machinevagrant reload
reboots the servervagrant halt
powers the server downvagrant suspend
&vagrant resume
to make the server sleep/wake upvagrant 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.
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 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.
Check our contributing guide.
The files in this archive are released under the AGPLv3 license. You can find a copy of this license in LICENSE.