Skip to content

This is a platform which both the politicians and citizens can use.

License

Notifications You must be signed in to change notification settings

Simplemart17/Politico

Repository files navigation

Build Status Coverage Status Maintainability License: MIT

Politico

Politico enables citizens give their mandate to politicians running for different government offices while building trust in the process through transparency.This is a platform which both the politicians and citizens can use.

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

You need to install the following software

node.js
IDE - VScode, Atom etc.
Browser - Chrome, Mozilla,

Installing

A step by step series of examples that tell you how to get a development env running

Run the following command in your terminal to clone this repository

git  clone https://github.com/Simplemart17/Politico.git

Navigate to the folder politico and run

npm install

setup environmental variable in this format:

DATABASE_URL = postgres://{your_database_user_name}:{your_database_password}@localhost:5432/{your_database_name}
SECRET = {'any_combination_of_your_choice'}

Running the tests

To run the test, run the following command in your terminal

npm test

Testing the API Endpoints

The following API's can be tested locally using Postman. Check API documentation for further information.

Authentication

POST /api/v1/auth/signup
POST /api/v1/auth/login

Users

GET /api/v1/auth/profile
POST /api/v1/auth/forgot-password
GET /api/v1/auth/reset-password/:resetToken

Candidates

GET /api/v1/candidates
POST /api/v1/candidate/interest
GET /api/v1/auth/candidate/registered
POST /api/v1/auth/candidate/:id/register

Offices

POST /api/v1/offices
GET /api/v1/offices
GET /api/v1/offices/:id

Parties

POST /api/v1/parties
GET /api/v1/parties
GET /api/v1/parties/:id
DELETE /api/v1/parties/:id
PATCH /api/v1/parties/:id/name

Votes

POST /api/v1/votes
GET /api/v1/vote/:id/result

Deployment

The app is deployed on heroku. App link

Documentation

https://mart-politico-app.herokuapp.com/docs

Author

License

This project is licensed under the MIT License - see the LICENSE.md file for details

External link

Acknowledgement

  • Andela Nigeria
  • Traversy Media
  • W3School

About

This is a platform which both the politicians and citizens can use.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published