Skip to content

adex001/Politico

Repository files navigation

Politico

Politico enables citizens give their mandate to politicians running for different government offices while building trust in the process through transparency.

Build Status Coverage Status Maintainability Test Coverage

UI Templates

My UI templates can be found here: UI

Pivotal Tracker

My Pivotal Tracker board can be found here

API Documentation

My Swagger API documentation can be found here

API Endpoints

My API can be found here: API

Key Application Features

An admin can perform the following:

  • Admin (electoral body) can create political parties.
  • Admin (electoral body) can modify ​political parties
  • Admin (electoral body) can delete a political party.
  • Admin (electoral body) can create different ​political offices.
  • Admin (electoral body) can delete different ​political offices
  • Admin (electoral body) can modify different ​political offices
  • Users can sign up
  • Users can sign in
  • Users can vote for only one politician per ​political office​.
  • Users can see the results of election

Development

This application was developed using NodeJs with express for routing.

Compiler

  • Babel - Compiler for Next Generation JavaScript

Installation

more info: (https://help.github.com/articles/cloning-a-repository/)

  • Run npm install to install the dependencies in the package.json file.
  • Rename .env.sample to .env and update file as specified.
  • Run npm start to start the application.

Testing

  • Navigate to the project location in your terminal.
  • Run npm test to run the test.

API Endpoints

HTTP VERB ENDPOINT FUNCTIONALITY RESPONSE
GET /parties /api/v1/parties Retrieves all parties { "status": 200, "data": [ { "partyId": 1, "name": "Peoples Democratic Party", "address": "21, Ilupeju Road, Ikeja", "logo": "http://mylogopdp.com/pdp" }, { "partyId": 2, "name": "Alliance National Peoples party", "address": "2, James Owl lane, VI", "logo": "http://mylogodp.com/anpp" } ] }
GET /parties/:id /api/v1/parties/:id Fetch a specific party { "status": 200, "data": [ { "partyId": 1, "name": "Peoples Democratic Party", "address": "21, Ilupeju Road, Ikeja", "logo": "http://mylogopdp.com/pdp" } ] }
POST /parties /api/v1/parties/ Creates a party { "status": 201, "data": [ { "partyId": 3, "address": "No 21,nejhfeuhebwejbgwj", "name": "Councillor", "logo": "http://logo.co" } ] }
PATCH /parties/:id /api/v1/parties/:id Updates a specific party { "status": 200, "data": [ { "partyId": 2, "name": "Councillor", "address": "No 21,nejhfeuhebwejbgwj", "logo": "http://logo.co" } ] }
DELETE /parties/:id /api/v1/parties/:id Deletes a specific political party { "status": 200, "data": [ { "partyId": 2, "name": "Councillor", "address": "No 21,nejhfeuhebwejbgwj", "logo": "http://logo.co" }, { "partyId": 3, "address": "No 21,nejhfeuhebwejbgwj", "name": "Councillor", "logo": "http://logo.co" } ] }
GET /office/:id /api/v1/offices/:id Fetch a specific office { "status": 200, "data": [ { "officeId": 2, "type": "State", "name": "Governor", "description": "Office of the Governor of Lagos State" } ] }
GET /offices /api/v1/offices/ Fetch all offices { "status": 200, "data": [ { "officeId": 1, "type": "Federal", "name": "President", "description": "Office of the president of the federal republic of Nigeria" }, { "officeId": 2, "type": "State", "name": "Governor", "description": "Office of the Governor of Lagos State" } ] }
POST /offices/ /api/v1/offices/ Creates a government office { "status": 201, "data": [ { "officeId": 3, "type": "legislative", "name": "Councillor", "description": "lorem opsum lef" } ] }
PATCH /offices/:id /api/v1/offices/:id Updates a specific government office { "status": 200, "data": [ { "officeId": 2, "type": "legislative", "name": "Councillor", "description": "lorem opsum lef" } ] }
DELETE /offices/:id /api/v1/offices/:id Deletes a specific government office { "status": 200, "data": [ { "officeId": 2, "type": "legislative", "name": "Councillor", "description": "lorem opsum lef" }, { "officeId": 3, "type": "legislative", "name": "Councillor", "description": "lorem opsum lef" } ] }

Technologies Used

Author

  • Olatunbosun Adeoye Ebenezer

License

  • MIT License

About

Politico enables citizens give their mandate to politicians running for different government offices while building trust in the process through transparency.

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors