Public sentiment polling platform for electoral candidates.
- Next.js 16
- TypeScript
- Vercel KV (Redis)
src/
├── data/ # Static data (candidates, debates)
├── lib/ # Core logic (scoring, storage)
├── app/api/ # REST endpoints
└── types/ # TypeScript definitions
| Endpoint | Method | Description |
|---|---|---|
/api/votos |
POST | Submit vote |
/api/ranking |
GET | Get ranked candidates |
/api/candidatos |
GET | List all candidates |
/api/stats |
GET | Platform statistics |
score = (frescos / (frescos + podridos)) * 100Default score when no votes: 50
- 100 votes per hour per device fingerprint
- Session-based duplicate vote prevention (24h TTL)
KV_REST_API_URL=
KV_REST_API_TOKEN=
KV_REST_API_READ_ONLY_TOKEN=Proprietary