/Politico

An app that enables citizens vote for different government offices transparently

Primary LanguageJavaScript

Build Status

Coverage Status

Politico

An app that enables citizens vote for different government offices transparently

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Have a text editor (vs-code, atom or sublime text) and
  • Have Postman running on your local
  • Set up postgres on your local with db name as
politico

  • Assign the following to created db in the environment file
PASSWORD

USER

DB_PORT

DATABASE

HOST=localhost

Installing

After cloning, cd into it and on your command line run npm install to automatically install all the dependencies in the package.json file.

e.g
user~
$ cd politico
user~/politico
$ npm install

Use npm start to start the app

e.g
user~/politico
$ npm start

FUNCTIONAL API ENDPOINTS

S/NHTTP VERBSAPI ENDPOINTSCORRESPONDING EFFECTS
1POST /api/v1/auth/signup Signs up a user
2POST /api/v1/auth/login Signs in a user
3POST /api/v1/parties Creates parties
4POST /api/v1/offices Creates an office
5GET /api/v1/parties Gets all parties
6GET /api/v1/offices Gets all offices
7GET /api/v1/parties/:id Gets one party
8GET /api/v1/offices/:id Gets one office
9PATCH /api/v1/parties/:id/name Edits the party name
10DELETE /api/v1/parties/:id Deletes a party
11POST /api/v1/offices/:id/register Registers a user as a candidate
12POST /api/v1/votes Creates a vote
13GET /api/v1/office/:id/result Gets the result for a particular office

Built With

Heroku

UI/UX Template

API Documentation

Versioning

Git-Hub

Project Board

(https://www.pivotaltracker.com/n/projects/2238819)

Authors

  • Chiazokam Echeta - Initial work

Acknowledgments

  • My ever supportive team during the project build up