lxxxvi / apollo Goto Github PK
View Code? Open in Web Editor NEWA poll app
License: MIT License
A poll app
License: MIT License
Admin can upload a main picture for the poll
User has many polls.
User has to be authenticated by link, or automatically on create new poll, but only if new user.
User
draft: teal
published: violet
started: green
closed: pink
archived: lightbrown
deleted: grey
introduce tailwind colors
Depends on #100
We want to use the naming "(un)used" for if a user has used the token, but not cast the vote yet.
Once the poll is started #38, a user can cast a vote using a valid token.
Only one vote can be cast per poll/token.
Admin can upload picture for nominee
Currently it's testing for
assert_not_equal record.id, record.to_param
which is not correct, because id
returns an Integer
, to_param
returns a String
.
Change it to
assert_not_equal record.id, record.to_param.to_i
When creating a new poll a start time and end time (see also #35) can be picked.
Start time is mandatory.
Start time has to be before end time.
As soon as start date is reached the poll's (including nominees) can't be modified anymore.
Between start time and end time only votes can be cast.
After end time everything about the entire poll can be modified, except archiving.
On creation of a poll, the user enters an email. This email has to be confirmed before the poll can be published.
After the end date a poll can be archived.
Archived polls can only be accessed through direct link. The polls are not listed anywhere (if public)
We should introduce I18n
Admin can enter a number so that multiple tokens are generated.
Tokens may only be
added, deleted if poll is in draft
or published
.
Create a new token? Reuse? Introduce an expire date?
Currently in poll#show
token values are displayed. This should not be.
poll#show
Controller tests are missing, they should include permission checks
A poll's nominees may only be
added, deleted, updated if poll state is in draft
or published
. After that it should be frozen.
TBD: Multiple tokens can be stored
A poll can be set private, so that it's not listed publicly.
Admin should be able to sign in by sending an email containing a magic link that authenticates the user.
Sign out should also be possible
A token should be locked, it means the cast vote can't be changed anymore after that.
validates :custom_id, presence: true
before_create :create_custom_id
to before_validation :create_custom_id
Certain preconditions need to be met in order to start a poll:
Add this as a checklist for admins
Ideas:
A poll can have a publish time. This time has to be before or same as start time.
Between publish time and start time users can preview the poll but not cast votes. Changes are still possible during that time:
Admin can set an poll end or close the poll immediately.
For example February 30
Make looky look good, consider ARIA https://www.w3.org/TR/wai-aria-practices-1.1/#radiobutton
It should be possible that a user can protect their token with a password. Changing the tokens vote is only possible with that password.
A 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.