Copcast Admin is part of the Copcast solution to help improve police accountability using mobile phones to record the video and the audio and register their GPS location.
Copcast Admin is developed with AngularJS
First, install Node.js in your development machine. We are using, currently, version 0.10.40.
With node installed, install Bower, Gulp, Karma and PhantomJs (the last two, to run the tests). And then, run npm install and bower install for the packages in the root of the project.
npm install -g bower
npm install -g gulp
npm install -g karma
npm install -g node-gyp
npm install phantomjs
npm install
bower install
Now you have Copcast Admin installed. To connect it with the server, you must have installed Copcast Server. If you did not install it yet, this is the time!
To connect Copcast Admin with the server, you must create a config.js file inside the directory src/app and include the folowing line
angular.module('copcastAdminApp').constant('ServerUrl', '<SERVER URL>');
IMPORTANT: we user cookie's validation to guarantee that all requests are authenticated (even requests straigth from the HTML). The domain of Copcast Server must be the same from Copcast Admin.
Now finally run the app:
gulp copy-bs-fonts
gulp serve
or
gulp server
Gulp is not suited for the production environment and you should use a real web server for the task, like Apache or Nginx. Once you have configured your web server, you can instruct gulp to build your files with:
gulp
The generated files will be deployed to the dist directory, which should serve as your web root.
If you want to have your service running under HTTPS, configure your web server as usual and do not forget to omit the schema part from the ServerUrl.
To test copcast completely, you must have also the Copcast Android app installed in an Android phone and connected to the Copcast Server.
Copcast Admin is developed by Instituto Igarapé as part of the Smart Policing Project.