Welcome to the General Election Polling Application documentation. This is a single page application served by a database driven RESTful API.
The application has been built using the following key technologies:
- PHP 5.6
- Silex (see composer.json for list of additional packages)
- Backbone.js
- Handlebars.js
- Underscore.js
- jQuery
- mySQL
- Grunt (for SPA build)
- SASS
- Bootstrap
The application uses Apache and a .htaccess file (included) to URL rewrite all requests (except those to /public) to the application entry point (index.php).
Please find included in the archive of this repository a SQL dump of the mySQL database.
-
Please install the relevant project dependencies via Composer (composer install - composer.json included).
-
Build SPA JavaScript bundles and CSS by installing and running Grunt (npm install - package.json included).
-
Ensure that the following file exists and is writable: ./log/error.log (this is not included in the repositoy due to the .gitignore).
-
Please configure the ./src/config.ini for your environment (I reccomend setting DEBUG to false for production).
Although some unit testing has been done and the API is complete I've skipped out functional testing of the API which would usually be performed using the Symfony WebTestCase class to test all the endpoints: http://symfony.com/doc/current/book/testing.html#functional-tests
The following feature has not yet been fully implemented due to time constraints: Results Filter
Things to note about the voting feature:
- Feedback from API (e.g. with problem committing to database / if a user voted).
- Dynamically populates potential candidates based on constituency selected.
- Client side validation
This application has been written by Tom Humphris and is released under the MIT License.