Politico enables citizens to give their mandate to politicians running for different government offices while building trust in the process through transparency.
- 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.
To view the UI Template click here
API endpoints are hosted Here
API endpoints Documentation are hosted Here
- 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.
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
Clone the app
git clone https://github.com/nraufu/politico.git
Install all the packages
npm install
Run the server
npm start
Run Test case
npm run test
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 |
- MIT