Giter Club home page Giter Club logo

voting-service's People

Contributors

bmaximilian avatar

Stargazers

 avatar

Watchers

 avatar

voting-service's Issues

Invite a new participant to the session

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.

Basic websocket implementation

  • Initialize websocket gateway
  • Provider requests access token for participant to session via backend api (access token stores session, participant and expiry date)
  • Client authorizes via requested access token on WS gateway - Access token is not valid anymore
  • Authenticated client joins session and is able to send/receive events

Get all participants of the client

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.

End/Disable voting for a topic

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.

Add a topic to a session

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.

Remove a participant from the session

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.

Create a voting session

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.

Start/Enable voting for a topic

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.

Revoke a mandate between two participants

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.

Get a voting session

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

Remove a topic from a session

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.

Grant a mandate between two participants

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.

Get all sessions of the client

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.

Update a topic

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 change
  • completed: To manually mark the topic as completed and end the vote

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.