This is a web application designed to be a platform which both the politicians and citizens can use. Politico enables citizens to vote for politicians running for different offices.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Clone Repository
$ git clone https://github.com/nobioma1/Politico.git
- Change Directory
$ cd Politico
- Install Node Modules
$ npm i
- Setup Environment Variables (.env) on root folder
TEST_DATABASE_URL
DATABASE_URL
SECRET
NODE_ENV
- To start API
$ npm start
To run tests on api
$ npm test
- or using Postman
- Javascript
- Express - The web framework used
HTTP VERB | URI PATH | DESCRIPTION |
---|---|---|
POST | /api/v1/auth/signup | User can create account |
POST | /api/v1/auth/login | User can login |
POST | /api/v1/parties | Admin can create Party |
PUT | /api/v1/parties/:partyId | Admin can edit party |
GET | /api/v1/parties | User can get all parties |
GET | /api/v1/parties/:partyId | User can get a party |
DELETE | /api/v1/parties/partyId | User can delete a party |
POST | /api/v1/offices | Admin can create an office |
GET | /api/v1/offices/:officeId | User can get an office |
GET | /api/v1/offices | User can get all offices |
POST | /api/v1/offices/register | Admin can register candidate for office |
POST | /api/v1/vote | User can vote candidate |
GET | /api/v1/voted/userId | Votes by a user |
GET | /api/v1/offices/:officeId/result | User can view election results |
- API Host: https://politicho-ch3.herokuapp.com
- UI: http://nobioma1.github.io/Politico
- Documentation: https://politicho-ch3.herokuapp.com/api-docs
- Obioma Noble Nnaemeka - Initial work - Politico