Files
427e7578-d7bf-49c8-aee9-2dd…/specs/005-poll-creation-management/README.md
2026-03-16 22:44:21 +13:00

2.1 KiB

status, created, tags, priority, created_at, depends_on, updated_at, related
status created tags priority created_at depends_on updated_at related
planned 2026-03-16
polls
management
high 2026-03-16T07:51:49.209Z
004-poll-data-model
2026-03-16T07:52:06.762Z
011-mobile-first-ui

Poll Creation & Management

Status: 🗓️ Planned · Priority: High · Created: 2026-03-16 · Tags: polls, management

Overview

UI and logic for creating, configuring, and managing polls. The poll creator (owner) can set title, description, anonymity mode, add initial options, manage the poll lifecycle (draft → open → closed), and delete the poll.

Design

Poll Creation Flow

  1. User taps "Create Poll"
  2. Fills in: title, description, anonymous (toggle), initial options (optional)
  3. Poll is created in draft status (only owner can see it)
  4. Owner shares poll link → users who join get viewer role; owner promotes to participant/moderator
  5. Owner (or moderator) starts the poll → status becomes open
  6. Owner (or moderator) stops the poll → status becomes closed

Owner Capabilities

  • Delete poll: Only the owner can permanently delete
  • Start/stop: Owner and moderators can transition draft→open→closed
  • Re-open: Owner can move closed→open (but not change anonymity)

Pages

  • /app/create — poll creation form
  • /app/poll/[id] — poll view/management (adapts based on role)
  • /app/polls — list of user's polls (owned + participating)

Plan

  • Build poll creation form (title, description, anonymous toggle, initial options)
  • Implement poll lifecycle state machine (draft → open → closed)
  • Build poll list page (my polls, polls I participate in)
  • Build poll detail/management page
  • Add delete poll functionality (owner only)
  • Wire up to PeerJS—poll becomes "live" when owner opens it
  • Build user/role management UI in poll detail page
  • Implement invite flow (shareable link — users join as viewer, owner promotes)

Test

  • Poll can be created with all fields
  • Anonymity toggle locks after first vote
  • Poll lifecycle transitions work correctly
  • Owner can delete poll; others cannot