Iteration 3 Plan - Phantawat/ku-polls GitHub Wiki

Goals

  • Implement user authentication for voting and changing votes.
  • Restrict users to only one vote per poll.
  • Provide users with the ability to change their vote during the voting period.
  • Enhance the user interface to improve consistency, especially for login/logout functionality.
  • Log important user events for better system tracking.

Milestones

  • Add authentication requirement for submitting and changing votes.
  • Allow users to change their vote on a poll during the active voting period.
  • Display the previously selected choice when a user revisits a poll they have voted on.
  • Implement visual confirmation upon vote submission.
  • Create a consistent “Login” or “Logout” link across all pages.
  • Build a common base template for all polls pages to centralize the header, footer, and CSS.
  • Log events such as login, logout, failed login, and vote submissions.

Features

  • A visitor must authenticate (login) in order to submit or change votes.
  • Each authenticated user can only vote once per poll.
  • Users can change their votes during the voting period, with new votes replacing old ones.
  • Display a user’s previous vote in the list of choices when they revisit a poll, with the previously selected option pre-selected.
  • After submitting a vote, display a visual confirmation such as "Your vote for choice has been recorded."
  • Implement login and logout functionality.
  • Show a consistent “Login” or “Logout” link on every page.
  • Build a base template for all poll pages, containing common UI elements like header, footer, and CSS.

Acceptance Criteria

  • Users cannot submit or change votes without logging in.
  • Logged-in users can only vote once per poll, with the ability to change their vote during the voting period.
  • When revisiting a poll, users will see their previously selected choice as pre-selected.
  • After voting, users receive a visual confirmation on the results page. "Login" and "Logout" links appear consistently across all pages and direct users appropriately.
  • All polls pages use the new base template to ensure UI consistency.
  • The system logs key events including login, logout, failed login attempts, and voting actions.