Politico is the voting system for any goverment where user can register and candidates can register and vote for the candiates applying on different goverment offices
Politico Features
- Users can sign up.
- Users can login.
- Logged in User can create a Political Party
- Admin can make an office
- candidate can make a petition
- Admin can update the existing office
- Admin can delete a Party
- User can view Candidates
- User can view one particular candidate
- User admin can view all candidates
- user can create a vote
- admin can view results for the office votes
- admin can delete an office
- admin can view All users
Api App hosted on Heroku
Api App hosted on GH-Pages
you can check the Documentation on Heroku docs API documentation
| Method | Endpoint | Functionality |
|---|---|---|
| POST | /api/v1/auth/signup | Create user account |
| POST | /api/v1/auth/signin | User login |
| GET | /api/v1/allusers | Get all the users |
| GET | /api/v1/useraccount/:accountid | Get one accounts |
| POST | /api/v1/parties/ | Create a political party |
| PUT | /api/v1/parties/:partyid/ | Update the party info |
| POST | /api/v1/offices/ | Create an office |
| PUT | /api/v1/offices/:officeid/ | update the office |
| DELETE | /api/v1/offices/:officeid/ | Delete the Office |
| DELETE | /api/v1/parties/:partyid/ | Delete a party |
| GET | /api/v1/parties/ | View all parties |
| GET | /api/v1/offices/ | View all offices |
| POST | /api/v1//votes/ | vote for a candidate |
| GET | /api/v1/office/:officeid/result | view All results from the voting made |
| GET | /api/v1/candidates | view All all candidates |
| POST | /api/v1//petition/ | create a petition |
-
Clone the repository
git clone https://github.com/horix7/politico.git -
Install dependencies
npm install -
Start the server
npm start -
Start the development server
```npm run dev```
- Use Postman to test api on
localhost:5000
- Node
- Postman
To run the application test run the following command in terminal
npm test