nwamugo / politico

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status Coverage Status

Politico

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.

Links to output

The UI is hosted on Github pages here

The API is deployed on heroku here

And a Pivotal Tracker Board you can find here

Prerequisites

In developing this software, I set up

Citizen should be able to sign up

Implemented Features

  • 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

API Information

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

Running tests

Tests were written using Mocha and Chai dev-dependencies

end to end tests

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);
    });
  });

And coding style tests too

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,
      }

Built With

Version Control

I use Github for version control.

Authors

  • Duziem Ugoji

This project is a Duziem and Andela bootcamp project 2019

Acknowledgments

  • Hat tip to the cipher Felix Amande and the superheroine Jane 'JCanaks' Anaekwe!

About

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


Languages

Language:HTML 45.8%Language:JavaScript 33.5%Language:CSS 20.7%