How it should work?

This page explains some rules about uses cases

How does it should work?

  1. Every participants should have an account

  2. Each participants is labeled with role

    1. for the example of Malagasy National Assembly, role can be deputy and sessionLeader

    2. deputies are the voters

    3. the one that lead and manage the session. He does not vote.

  3. In a session come one or more Yes/No questions.

  4. Each question has to be voted by voters.

  5. Right after a vote, every body can get the statistic automatically.

  6. Right after a session, every body can get a resume about the session.

In order to be transparent as possible these are some rules to follow:

Rules for session

  1. A session has 3 states: created, open, close

  2. Numbers of voters in a session can be updated only if the state of the session is `created`, you cannot change an open or a closed session.

  3. Questions can be added if and only if session exists and not closed.

Rules for question

  1. Yes,No, NoIdea question-arrays should be empty by creation.

  2. Voted attribute should be `false` by creation.

  3. State attribute should be `created` by creation

  4. Session should not be empty and should match a created or an open session in the database. It tells us, in which session belongs the question.

  5. Sentence attribute can be updated only if the attribute voted is `false`.

  6. Every question has a state : created, open, close

    1. created: No one can vote

    2. open: Every body can vote

    3. close : No one can vote

Rules of vote

  1. Only Session Leader can open the vote.

  2. The vote is Open for a certain time period, decided by the Session Leader. And only during this time, user can vote.

  3. After the periode of time, the vote is automatically closed.

  4. Every registered User can vote

  5. Client sends request to the endpoint vote

  6. The client's ID will be pushed to the set (every item is unique) of their decision (Yes, No, NoIdea)

  7. A voter has only one vote, which means, that if he already voted for `Yes`, he canot vote for `No` or `NoIdea` any more .

  8. The vote cannot be updated. Once the request arrives at server side, you are done.

Last updated