WebVote is a web application that can provide online referendums or elections. The app has three levels of privileges. Managers register users, admin creates a pool. Then voters vote. Finally admins and managers publish results. Most of the user interface is responsive and looks good on mobile devices. It was developed using ASP.NET Core and Angular.
- Back-end
- Front-end
- Docker
Check it now on webvote.tk (Self-hosted on my 10 y.o. PC using docker).
There are 200 demo voters. Login and password - numbers from 1 to 200.
The system has three levels of user privileges (voter, manager, administrator). Users with a higher level of privileges have access to all services, as do users with a lower level of privileges.
| Ability to | admin | manager | voter |
|---|---|---|---|
| View active polls list | + | + | + |
| View archived polls list | + | + | + |
| Vote on active polls | + | + | + |
| View archived polls | + | + | + |
| Change password | + | + | + |
| Register a single voter | + | + | |
| Request analytic queries | + | + | |
| Export analytic queries as CSV | + | + | |
| Register multiple voters via CSV | + | ||
| Create polls | + | ||
| View pending polls list | + | ||
| Edit pending polls | + | ||
| Delete pending polls | + | ||
| View registration log | + |
A poll has a title, a description and a list of options. Also, admin should specify date-time, when poll will start and date-time when poll will end.
An option has a title and a description.
- Pending - poll that has not yet started. Can be deleted or edited by admin
- Active - poll that already started and not yet ended. All users can vote
- Archived - poll that already ended. All users can still view it. Admins and managers can view results
When user votes on active poll, it moves to archive (only for him)
There are three types of toolbars: admin, manager, voter and unauthorized
Available to unauthorized users.
- Login field
- Password field
Submitbutton
- Full name field
- Birth field
- Region field
- Individual tax number field
- Login field
- Password field
Submitbutton
There is account info and ability to change password.
- Old password field
- New password field
Change passwordbutton
If there are any errors in the file, they will appear under file input.
- File input field
Submitbutton
Admin can delete or edit pending poll
Editpoll button. Opens edit formDeletepoll button. Deletes poll
Votebutton. Opens vote form
Viewbutton. Opens read only vote form
The similar form is used for editing polls.
- Poll title field
- Poll description field
- Start datetime. Should be within one hour of the present
- End datetime. Should be greater than start datetime
- List of options. Number of options must be greater than 0
- Option title field
- Option description field
Delete optionbuttonSubmitbuttonAdd optionbutton
In the similar form for viewing poll, check marks and submit button are disabled.
- Check mark. Selects an option
- Highlighted check mark. Indicates that the option is selected
Submit votebutton
Admin can view who was registered by whom and when
Returns the number of votes per each option of the selected poll
- Option name
- Votes count
- Votes percent = votesCount / totalVotes * 100%
Request resultbuttonDownload CSVbutton. Starts downloading results as CSV file
Id,Title,Count,Percent
14,SpongeBob SquarePants,47,0.235
13,Patrick Star,43,0.215
8,Squidward Tentacles,40,0.2
11,Plankton and Karen,39,0.195
12,Mr. Krabs,31,0.155
Returns the number of votes from each region of the selected poll. Can help you to see voters activity
- Region name
- Votes count
- Citizens count
- Voters activity = votesCount / citizensCount * 100%
- Votes percent = votesCount / totalVotes * 100%
There is a bug in this query: the citizen count should be fixed at the moment the poll is completed, but it represents actual number of citizens
Request resultbuttonDownload CSVbutton. Starts downloading results as CSV file
Id,Name,VotesCount,CitizensCount,VotersActivityPercent,VotesPercent
5,Vinnytsia Oblast,15,24,0.625,0.075
16,Kherson Oblast,12,20,0.6,0.06
11,Mykolaiv Oblast,13,22,0.5909090909090909090909090909,0.065
12,Luhansk Oblast,13,22,0.5909090909090909090909090909,0.065
24,Cherkasy Oblast,12,21,0.5714285714285714285714285714,0.06
ETC...
There are a couple things that I want to implement to make the system more consistent
- Ability to change user privileges. Admin will be able to change other users' privileges
- Ability to reset a password if user forgets it. Admin will be able to reset user's password
- Ability to change user's personal information, for example region if user moves to another
- Ability to link Google account to sign in with it
- Ability to link email. To reset password with it and receive email notifications about new polls
- Ability to attach files to polls, for example, some documents
- Ability to attach photos to options. For example, photos of candidates in elections
- Add more analytic queries
- Cover all code with unit tests 😉
- CI / CD with GitHub Actions













