Creating a poll uses the shared POST /api/posts endpoint with a poll payload. Polls can be text-only, media+poll, or poll-only posts, and they reuse the existing post + moderation enqueue path.
- `prisma/schema.prisma`
- `src/app/api/posts/route.ts`
This MVP proves that polls are attached to real posts, rendered via the shared feed surface, and enforced via authenticated vote rules. Multi-select polls, closing controls, and richer analytics remain future work.
The goal is to ship a safe, testable poll primitive without inventing a second content system. Polls reuse the existing post lifecycle and feed pipeline.
Creating a poll uses the shared POST /api/posts endpoint with a poll payload. Polls can be text-only, media+poll, or poll-only posts, and they reuse the existing post + moderation enqueue path.
GET /api/feed/* returns poll payloads alongside media attachments so the UI can render and interact without guessing or scraping.
Voting is authenticated, same-origin protected, rate-limited, and single-choice by design (one vote per user per poll). Changing your vote updates the stored vote (no double-counting).