Init with specs
This commit is contained in:
63
specs/005-poll-creation-management/README.md
Normal file
63
specs/005-poll-creation-management/README.md
Normal file
@@ -0,0 +1,63 @@
|
||||
---
|
||||
status: planned
|
||||
created: '2026-03-16'
|
||||
tags:
|
||||
- polls
|
||||
- management
|
||||
priority: high
|
||||
created_at: '2026-03-16T07:51:49.209Z'
|
||||
depends_on:
|
||||
- 004-poll-data-model
|
||||
updated_at: '2026-03-16T07:52:06.762Z'
|
||||
related:
|
||||
- 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
|
||||
Reference in New Issue
Block a user