kayroy247 / Politico

Politico is an online voting system that enables citizens give their mandate to politicians running for different government offices while building trust in the process through transparency.
MIT License
0 stars 0 forks source link

Build Status Coverage Status Test Coverage Maintainability codecov License: MIT

Politico

Politico is an online voting system that enables citizens give their mandate to politicians running for different government offices while building trust in the process through transparency.

UI Templates on Github pages

This is the link to the UI Templates on Github Pages.

Politico Restful API on heroku

Politico API

Project Management

Pivotal Tracker

User Features

Admin Features

Optional Features

How To Install and Run This Application on your Computer

  1. Download and install GIT, NodeJs and Postgresql on your computer
  2. Create a database with the name Politico (This name will be included in the connectionString).
  3. Clone this repository by running the following on your command line interface git clone https://github.com/kayroy247/Politico.git
  4. Navigate to the root of the cloned or downloaded project directory on your computer
  5. Run npm install to install all dependencies
  6. Rename the .env-example file to .env and set the variable values by following the instruction in the file
  7. Finally Run npm start to start the server. You now have a running copy of Politico application :sparkles:

Access Endpoints

Available endpoints

HTTP METHOD ENDPOINTS FUNCTIONALITY
GET /api/v1 Sends the Welcome message
GET /api/v1/parties Fetch all the political parties
GET /api/v1/offices Fetch all the political office's records
GET /api/v1/parties/:partyId Fetch a specific political party by id
GET /api/v1/offices/:officeId Fetch a specific political office by id
PATCH /api/v1/parties/:partyId/name Edit the name of a specific political party by id
POST /api/v1/parties Create a new political party
POST /api/v1/offices Create a new political office
POST /api/v1/auth/signup Create a new user account
POST /api/v1/auth/login Login a user account
POST /api/v1/:userId/register Register a user for a political office
POST /api/v1/votes Vote a candidate
POST /api/v1/office/officeId/result collate and fetch the result of specific office following a concluded election
DELETE /api/v1/parties/:id Delete a specific political party by id
DELETE /api/v1/parcels/:id Delete a user by id

Optional Endpoints

HTTP METHOD ENDPOINTS FUNCTIONALITY
POST /api/v1/auth/reset Reset a user account password
POST /api/v1/petitions Create a petition challenging the result of a concluded election

How to run unit tests

To run tests on the app run: npm test

Built With

Front End

Author

Okunlade Kayode. :smiley: :thumbsup: :sparkles:

Credits

License

This application is written under the MIT license. Please check the LICENSE.md file for details.