Politico is a simple app that enables citizens to give their mandate to politicians running for different government offices while building trust in the process through transparency.
A live demo of the app can be access on Heroku Politico
Politico allows users to do the following.
- Register and log into their accounts.
- Admin can view all the political parties
- Admin can create political parties
- Admin can edit political party
- Admin can delete political party
- Admin can create political offices
- Admin can view all the political offices
- Users can vote only one politician per political office
- Users can see the result of the election
- Users can see all politicians running for government office
- Users can see the list of political offices and the candidate(s) he/she voted for
- Registered users can reset their passwords
| Endpoint | HTTP Method | Description |
|---|---|---|
| /api/v1/signup | POST | Returns payload a new user sign up |
| /api/v1/parties | GET | Get all the parties |
| /api/v1/party/:id | GET | Get a specific political party |
| /api/v1/parties | POST | Create new party |
| /api/v1/parties/:id/name | PATCH | Update the name of a specific party |
| /api/v1/parties/:id | DELETE | Delete a particular political party |
The server directory houses the back-end implementation in node.js, express
The UI directory houses the front-end implementation in Github Page
Kindly follow the steps below to setup a local development environment.
-
Clonethis repository from a terminalgit clone https://github.com/adewale2018/Politico -
cdinto the project directory -
install project dependencies
npm install -
Create
.envfile and set up the variables in.env-sample -
and run
npm run start:devfor development -
Go to
http://localhost:3000/
- This app uses Mocha, Chai-Http for
server test- Run npm i mocha -g to install Mocha globally and npm i nyc -g to install nyc globally before running npm test to run
servertests
- Run npm i mocha -g to install Mocha globally and npm i nyc -g to install nyc globally before running npm test to run
-
git clone https://github.com/adewale2018/Politico -
run
npm testforserver test
- Users can not delete their account
- Yes, it's free.
- Yes, It's an open source project, and we encourage anyone who wish to contribute to do so.
If you wish to contribute to this Open source project, kindly fork the respository and raise a Pull Request against develop branch.
For every pull request raised, kindly adhere to this best practises link to conform with the standard to which this project codebase is written.
- For more clarifications, do contant via this email
shittusaheedadewale@gmail.com.
This software is licensed under the MIT License. See the LICENSE file in the top distribution directory for the full license text.