Politico is a platform that enables citizens give their mandate to politicians running different government offices while building trust in the process through transparency.
Politico is a platform that enables citizens give their mandate to politicians running different government offices while building trust in the process through transparency.
Airbnb (Javascript style guide)
Preview UI templates 👍 Github Pages
Users can sign up
.Users can login
.Admin (electoral body) can create political parties
.Admin (electoral body) can delete a political party
.Admin (electoral body) can create different political offices
.Users can vote for only one politician per political office
.Users can see the results of election
.
Ensure you have NodeJS installed by entering node -v
on your terminal
If you don't have NodeJS installed go to the NodeJS Website, and follow the download instructions
To install this app
git clone https://github.com/amaechi-chuks/Politico
And install the required dependencies
npm install
Run server
npm run start:dev
Server listens on port 6000
To run test cases
npm test
Endpoint | Functionality | HTTP method |
---|---|---|
/api/v1/auth/signup | Create a user account | POST |
/api/v1/auth/login | Login a user | POST |
/api/v1/parties | Create a political party | POST |
/api/v1/office/user_id/register | Register a user as candidate running for a specific office | POST |
/api/v1/votes | Vote for a candidate | POST |
/api/v1/offices | Create a political office | POST |
/api/v1/parties | Fetch all political parties | GET |
/api/v1/offices | Fetch all political offices | GET |
/api/v1/parties/party_id | Fetch the details of a single political party | GET |
/api/v1/offices/office_id/ | Fetch the details of a single political office | Get |
/api/v1/office/office_id/result | Fetch the result of a specific office following the conclusion of an election | GET |
/api/v1/parties/party_id/name | Update political party name | PATCH |
/api/v1/parties/party_id | Delete a political party by id | DELETE |
This projects is under the MIT LICENSE
If you want to contribute to this project:
Fork it! :fork_and_knife:
Create your feature branch: git checkout -b my-new-feature
Commit your changes: git commit -m 'Add some feature'
Push to the branch: git push origin my-new-feature
Create a pull request.
You can test the api endpoints :+1: Here