bmaximilian / voting-service Goto Github PK
View Code? Open in Web Editor NEWA microservice used for voting that can be embedded in any bigger architecture
License: GNU General Public License v3.0
A microservice used for voting that can be embedded in any bigger architecture
License: GNU General Public License v3.0
As a customer of the voting service, i want to add participants to the voting session, so they can join via the frontend
By calling POST /api/v1/session/{id}/participants
, with the payload described in the API docs, a new participant will be created and added to the session.
As a customer of the voting service, i want to view all the participants
By calling GET /api/v1/participants
, i receive all my registered participants.
As a customer of the voting service, i want to end the vote for a topic
By calling POST /api/v1/session/{id}/topics/end
, the voting for a topic is disabled. Votes won't be received anymore.
As a customer of the voting service, i want to add new topics to the voting session to be able to vote them
By calling POST /api/v1/session/{id}/topics
, with the payload described in the API docs, a new topic will be created.
As a customer of the voting service, i want to remove participants from the voting session, to deny access to the voting session
By calling DELETE /api/v1/session/{id}/participants/{id}
, the participant will be removed from the session.
If some participants have mandates for the removed participant, they will be deleted as well.
Participants that have voted cannot be removed.
As customer of the voting service, i want to be able to create a new voting session to embed it in my system.
The voting service will expose an API the client can call.
By calling POST /api/v1/session
with the payload described in the API docs, a new voting session will be created and returned from the endpoint.
As a customer of the voting service, i want to start the vote for a topic
By calling POST /api/v1/session/{id}/topics/start
, the voting for a topic is enabled. Votes for the topic can be received now.
By calling DELETE /api/v1/session/{id}/participants/{id}/mandates/{mandatedParticipantId}
, the mandate will be revoked.
Mandates that are used (if participants have voted via the mandate) cannot be revoked.
As a customer of the voting service, i want to retrieve session information
By calling GET /api/v1/session/{id}
, the session with the passed id will be returned
As a customer of the voting service, i want to remove topics from a voting session in case they are obsolete
By calling DELETE /api/v1/session/{id}/topics/{id}
, a topic will be removed.
As a customer of the voting service, i want to grant mandates for participants, that other participants can vote in case of e.g. illness
By calling POST /api/v1/session/{id}/participants/{id}/mandates
, with the payload described in the API docs
(the participant ids for the mandate), a new participant will be created. The mandate will enable the participant in the URL to vote for the passed participant in the payload.
As a customer of the voting service, i want to view all the sessions
By calling GET /api/v1/sessions
, i receive all sessions as overview.
As a customer of the voting service, i want to update topics of a voting session
By calling PUT /api/v1/session/{id}/topics/{id}
, a topic will be updated with the passed payload (described in the API docs).
Fields that might need to update are:
requiredNumberOfShares
: In case a new participant is added, the required number of shares might changecompleted
: To manually mark the topic as completed and end the voteA declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.