Politico is a platform that enables citizens give their mandate to politicians running for different government offices while building trust in the process through transparency.
The UI is hosted on Github pages here
The API is deployed on heroku here
And a Pivotal Tracker Board you can find here
In developing this software, I set up
- a Pivotal Tracker Board to manage the project using stories. For example
Citizen should be able to sign up
- Citizens can sign up and login
- A Citizen's Profile Page
- Politicians can express interest to run for a political office
- Citizens can view all politicians running for a specific government office
- Citizens can vote for only one politician per political office
- Citizens can view all political parties
- Electoral body can edit a political party
- Electoral body can delete a political party
- Electoral body should be able to create political parties
- Electoral body should be able to create different political offices
- Citizens are able to see the results of the election
METHOD | DESCRIPTION | ENDPOINTS |
---|---|---|
GET | Get all political parties | api/v1/parties |
GET | Get a specific political party | api/v1/parties/party_id |
GET | Get all political offices | /api/v1/offices |
GET | Get a specific political office | api/v1/offices/office_id |
POST | Create a political party | /api/v1/parties |
POST | Create a political office | /api/v1/offices |
PATCH | Edit a political party | /api/v1/parties/party_id/name |
DELETE | Delete a political party | /api/v1/parties/party_id |
Tests were written using Mocha and Chai dev-dependencies
Mocha provides the tools for cleaning the state of the software while Chai is an assertion library that is used alongside Mocha in order to ensure that test cases meet expectations. For example
describe('GET /partiess', () => {
it('should fetch all parties', (done) => {
api.get('/api/v1/parties')
.set('Accept', 'application/json')
.expect(200)
.end(done);
});
});
This project was built with the linter eslint and an airbnb style guide
"rules": {
"one-var": 0,
"one-var-declaration-per-line": 0,
"new-cap": 0,
"consistent-return": 0,
}
- HTML5 & CSS3 + Vanilla JavaScript - Web development
- NodeJs - JavaScript runtime environment
- ExpressJs - Node RESTful API framework
- PostgreSQL - Used as database for the app
I use Github for version control.
- Duziem Ugoji
This project is a Duziem and Andela bootcamp project 2019
- Hat tip to the cipher Felix Amande and the superheroine Jane 'JCanaks' Anaekwe!