Skip to content

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

License

nraufu/politico

Repository files navigation

Build Status Coverage Status Maintainability

politico

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

features

  • A user can create an account.
  • A user can log into his/her account.
  • A user can reset his password.
  • An admin can create a political party.
  • A user can view all political parties information.
  • A user can view a specific political party.
  • An admin can modify a specific political party detail.
  • An admin can delete a specific political party.
  • An admin can create a government office.
  • A user can view all government offices information.
  • A user can view a specific government office.
  • An admin can modify a specific government office information.
  • An admin can delete a specific government office information.
  • An admin can register a politician running for a specific government office.
  • A user can vote for one politician per a specific government office.
  • A user can view vote results for a specific government office.
  • A user can create a petition challenging the outcome of a concluded election.
  • A user can view his profile information.

UI Template

To view the UI Template click here

API Host

API endpoints are hosted Here

API Documentation

API endpoints Documentation are hosted Here

Technologies && Tools

  • NodeJS - JavaScript Runtime Environment
  • ExpressJs - A Minimal Web Application Framework
  • PostgreSQL - A free and open-source relational database management system
  • Mocha - A JavaScript test framework for Node.js programs, asynchronous testing, test coverage reports, and use of any assertion library
  • Airbnb - A set of standards that outline how code should be written and organized.
  • ESlint - A static code analysis tool for identifying problematic patterns found in JavaScript code.

Getting Started

Prerequisites

Ensure you have NodeJS installed on your computer by entering node -v on your terminal. If you don't have NodeJS installed go to the NodeJS Website, and follow the download instructions

Installation

Clone the app

  • git clone https://github.com/nraufu/politico.git

Install all the packages

  • npm install

Run the server

  • npm start

Testing

Run Test case

  • npm run test

Working Routes

Endpoint Functionality
POST /auth/signup create an account
POST /auth/login log into his account
POST /auth/reset reset password
POST /parties/ create a political party
GET /parties/  retrieve all political parties information
GET /parties/:partyId retrieve a specific political parties information
PATCH /parties/:partyId modify a specific political party
DELETE /parties/:partyId delete a specific political party
POST /offices/ create a government office
GET /offices/ retrieve all government offices information
GET /offices/:officeId retrieve a specific government office information
PATCH /offices/:officeId modify a specific government office info
DELETE /offices/:officeId delete a specific government office
POST /offices/:officeId/register register a politician for a specific office elections
POST /votes/ vote for a specific politician in a specific office
GET /offices/:officeId/result view election results for a specific office
POST /petitions/ create a petition
GET /auth/profile view profile information

License

  • MIT

Author

Niyonzi Raufu ✌👋

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published