A fast, beautiful social voting platform where you create quick polls and share them with anyone. No registration required.
| Feature | Description |
|---|---|
| β‘ Instant Polls | Create a poll in seconds β no sign-up needed |
| π Shareable Links | Every poll gets a unique URL you can share anywhere |
| π Live Results | Watch votes come in real-time via WebSocket |
| π‘οΈ Duplicate Protection | SHA-256 fingerprint prevents double-voting |
| πΌοΈ Image Options | Add images to poll choices (auto-resized & converted to WebP) |
| π¨ Dark Mode | Beautiful dark/light theme with system preference detection |
| π± Responsive | Looks great on phones, tablets, and desktops |
| π€ Social Sharing | Share to Telegram, WhatsApp, X, or copy link / QR code |
| π Creator Controls | Edit, close, or delete your polls with a secure token |
| π Statistics | Poll creators can view detailed voting analytics |
- React 19 + TypeScript β Type-safe UI components
- Vite β Lightning-fast build tool
- Tailwind CSS v4 β Utility-first styling
- TanStack Query v5 β Server state management
- React Router v7 β Client-side routing
- Framer Motion β Smooth animations
- Lucide React β Beautiful icons
- Recharts β Data visualization
- qrcode.react β QR code generation
- Python 3.12+ with FastAPI β High-performance async API
- SQLAlchemy 2.0 β Async ORM with proper type support
- Pydantic v2 β Data validation
- Alembic β Database migrations
- Pillow β Image processing
- WebSockets β Real-time updates
- PostgreSQL 16 β Production database
- SQLite β Local development (zero setup)
- Docker & Docker Compose β Containerized deployment
- Nginx β Reverse proxy with gzip & security headers
1. Clone the repository:
git clone https://github.com/rezvvent/pickone.git
cd pickone2. Start the backend:
cd backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reload --port 80003. Start the frontend (new terminal):
cd frontend
npm install
npm run dev4. Open http://localhost:5173
π‘ The backend uses SQLite by default for local development β no database setup needed!
# Copy environment variables
cp .env.example .env
# Start all services
docker compose up --buildOpen http://localhost β done!
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/v1/polls |
Create a new poll |
GET |
/api/v1/polls/{slug} |
Get poll details |
PATCH |
/api/v1/polls/{slug} |
Update poll (creator only) |
DELETE |
/api/v1/polls/{slug} |
Delete poll (creator only) |
POST |
/api/v1/polls/{slug}/vote |
Cast a vote |
POST |
/api/v1/polls/{slug}/close |
Close voting (creator only) |
GET |
/api/v1/polls/{slug}/statistics |
View analytics (creator only) |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/v1/polls/popular |
Trending polls |
GET |
/api/v1/polls/recent |
Latest polls |
GET |
/api/v1/polls/category/{name} |
Browse by category |
| Protocol | Endpoint | Description |
|---|---|---|
WS |
/api/v1/ws/polls/{slug} |
Live vote updates |
Interactive API docs available at /api/docs when the server is running.
pickone/
βββ frontend/ # React + TypeScript + Vite
β βββ src/
β β βββ api/ # Axios client & API functions
β β βββ components/ # Reusable UI components
β β βββ hooks/ # Custom React hooks
β β βββ layouts/ # Page layouts
β β βββ pages/ # Route pages (6 pages)
β β βββ types/ # TypeScript interfaces
β β βββ utils/ # Helper functions
β βββ package.json
β
βββ backend/ # FastAPI + SQLAlchemy
β βββ app/
β β βββ api/ # Route handlers & WebSocket
β β βββ core/ # Config, security, exceptions
β β βββ models/ # Database models
β β βββ repositories/ # Data access layer
β β βββ schemas/ # Pydantic schemas
β β βββ services/ # Business logic
β βββ alembic/ # Database migrations
β βββ tests/ # Pytest test suite
β βββ requirements.txt
β
βββ nginx/ # Reverse proxy config
βββ docker-compose.yml
βββ README.md
- No raw IPs stored β IPs are SHA-256 hashed before storage
- Creator tokens β Generated with
secrets.token_urlsafe(32), stored as SHA-256 hashes - Vote fingerprinting β
SHA-256(poll_id + browser_id + hashed_ip + user_agent + salt) - Input validation β Pydantic v2 with strict type checking
- SQL injection protection β SQLAlchemy ORM parameterized queries
- CORS β Configurable per environment
- Rate limiting β SlowAPI on all endpoints
- Image validation β MIME type, file size, and extension checks
- Security headers β HSTS, X-Frame-Options, X-Content-Type-Options via Nginx
Found a vulnerability? Please read our Security Policy for responsible disclosure.
# Backend tests
cd backend && source venv/bin/activate
pytest -v
# Frontend type check & build
cd frontend
npx tsc -b --noEmit
npm run build| Variable | Default | Description |
|---|---|---|
DATABASE_URL |
sqlite+aiosqlite:///./pickone.db |
Database connection string |
APP_SECRET |
supersecretkey... |
Secret for hashing (change in prod!) |
CORS_ORIGINS |
["http://localhost:5173"] |
Allowed CORS origins |
UPLOAD_DIR |
uploads |
Image upload directory |
MAX_UPLOAD_SIZE |
5242880 |
Max upload size in bytes (5MB) |
See .env.example for a complete reference.
Contributions are welcome! Please read our Contributing Guide for details on:
- Setting up your development environment
- Our commit message conventions
- The pull request process
This project is licensed under the MIT License.
Built with β€οΈ using React, FastAPI, and too much coffee.


