Skip to content

Instantly share code, notes, and snippets.

@ThallyssonKlein
Created May 7, 2026 14:10
Show Gist options
  • Select an option

  • Save ThallyssonKlein/927cb97cc2f1a06cd1ee75d6424b3fd2 to your computer and use it in GitHub Desktop.

Select an option

Save ThallyssonKlein/927cb97cc2f1a06cd1ee75d6424b3fd2 to your computer and use it in GitHub Desktop.
prd

PRD — Name Voting

Date: 2026-05-06 Status: Draft


1. Problem and Objective

There is no simple, anonymous, registration-free tool for a group of people to collaboratively vote on a list of names suggested by the participants themselves.

Objective: Deliver a general-purpose website where any visitor can suggest names and vote for a single name, viewing the results in real time, with no login required.


2. Users

  • Anonymous visitor: any person who accesses the site URL, without registration or identification.

3. User Stories

  • As a visitor, I want to suggest a name so that it appears on the voting list.
  • As a visitor, I want to vote for a name on the list to register my preference.
  • As a visitor, I want to see how many votes each name has in real time to follow the results.
  • As a visitor who has already voted, I want to see the updated scoreboard but not be able to vote again.

4. Functional Requirements

# Requirement
RF01 The system displays a single global list of names with the vote count for each one.
RF02 Any visitor can suggest a new name through a text field.
RF03 The suggested name appears immediately in the list after submission.
RF04 Each visitor can vote for only 1 name during their entire session/visit.
RF05 After voting, the visitor stays on the same page and continues to see the updated scoreboard.
RF06 After voting, the voting controls are disabled for that visitor (1 vote per person).
RF07 The vote count is updated in real time for all connected visitors.
RF08 The voting has no closing date — it remains open indefinitely.
RF09 There is no moderation: suggested names appear on the list without prior approval.
RF10 The suggestion field accepts a maximum of 50 characters; submissions exceeding this limit are blocked.

5. Non-Functional Requirements

  • Hosting: Vercel.
  • Frontend: ReactJS with Next.js.
  • Backend: Next.js own API Routes (/api/*) — no separate server.
  • Persistence: Firebase (Firestore) — votes and names persisted and read via API Routes.
  • Single vote control: Implemented via localStorage or cookie in the browser (no authentication).
  • Accessibility: Form and buttons with accessible labels (minimum WCAG AA).
  • Responsiveness: Functional on desktop and mobile.

6. Out of Scope

  • Authentication or account creation.
  • Multiple distinct lists/polls.
  • Moderation or approval of suggested names.
  • Editing or removing names after submission.
  • Voting closing date and time.
  • Email or push notifications.
  • Admin panel.

7. Main Flow

Visitor accesses the site
  → Sees the list of names + vote count
  → [Option A] Types a name → clicks "Suggest" → name appears on the list
  → [Option B] Clicks "Vote" on a name
      → Vote recorded
      → Scoreboard updated in real time
      → Voting controls disabled for this visitor

8. Open Questions

# Question Impact
Q01 Which database/backend to use? Resolved: Next.js API Routes + Firestore.
Q02 Single vote control via localStorage or server-side? Resolved: localStorage is sufficient.
Q03 Character limit for suggestions? Resolved: maximum of 50 characters per name.
Q04 Is there a visual identity to follow? Resolved: no restrictions — free design.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment