A real-time polling platform with live vote updates, built with Next.js and FastAPI.
- Node.js 18+
- Python 3.11+
- PostgreSQL
- Install PostgreSQL and create database
createdb quickpoll- Setup backend
cd quickpoll-backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt- Configure environment
# Create .env file
DATABASE_URL=postgresql://quickpoll:quickpoll_dev@localhost:5432/quickpoll
SECRET_KEY=your-secret-key-here
CORS_ORIGINS=http://localhost:3000- Initialize database
python create_tables.py
python add_category_migration.py
python add_comments_table.py- Run backend
uvicorn app.main:app --reloadBackend runs at http://localhost:8000
- Install dependencies
cd quickpoll-frontend
npm install- Configure environment
# Create .env.local file
NEXT_PUBLIC_API_URL=http://localhost:8000
NEXT_PUBLIC_WS_URL=ws://localhost:8000- Run frontend
npm run devFrontend runs at http://localhost:3000
- Frontend: Next.js 14, TypeScript, Tailwind CSS
- Backend: FastAPI, SQLAlchemy, WebSockets
- Database: PostgreSQL
- Deployment: Netlify (Frontend), Render (Backend)
- Real-time vote updates via WebSockets
- Live viewer count
- User authentication (JWT)
- Comments and likes
- Poll categories and filtering
- Responsive design
Built by Arjun