Skip to content

Repository files navigation

⚡ LivePoll

Live Demo HTML5 CSS3 JavaScript Firebase License: MIT

Real-time interactive polling for audiences, classrooms & events.

Live Demo · Report Bug · Request Feature


Screenshot

Home

Create Poll Join Poll Mobile
Create Join Mobile

🌐 Try it live →


About

LivePoll is a Mentimeter-inspired live polling platform that lets hosts create interactive polls and audiences respond in real-time. Watch bar charts animate live as votes come in. Join with a 6-digit room code or QR scan. Zero setup for participants — just open the link.


✨ Features

Feature Description
🎯 Live Voting Real-time results update as participants vote
🔢 Room Codes Join with a 6-digit code or scan QR
📊 Animated Charts Smooth bar chart animations on every vote
📱 Mobile-First Fully responsive — works on any device
🎨 Bold Design Editorial dark theme with electric lime accent
🔗 URL Join Share a direct link ?join=123456
🧭 Multi-Question Create polls with multiple questions
↕️ Drag to Reorder Reorder questions and options by dragging their handles
☑️ Multiple Answers Per-question setting — let voters pick more than one option
👥 Live Presence See participant count in real-time
Answer Highlight Your choice highlighted in results
🔐 Google Sign-In Optional login to save polls to your account
📋 My Polls Dashboard View all your past polls, results & vote data

🕹️ How to Use

As a Host

  1. Click "Create a Poll"
  2. Enter your poll title and add questions with options
  3. Drag the handle on a question card to reorder questions, or the handle on an option row to reorder that question's options
  4. Tick "Multiple answers" on any question to let voters select more than one option
  5. Click "Launch Poll" — get a room code + QR
  6. Share the code with your audience
  7. Click "Start Poll" when ready
  8. Click "Show Results" to reveal votes, "Next →" for the next question

As a Participant

  1. Go to the live URL or enter the room code
  2. Wait for the host to start
  3. Tap your answer — see live results after the host reveals them
  4. On a multiple-answer question, tap every option that applies, then press Submit

On multiple-answer questions each bar shows the share of voters who picked that option, so the percentages can add up to more than 100%.


📁 File Structure

livepoll/
├── index.html                  # Single-page app shell (all screens)
├── css/
│   └── style.css               # DM Sans + DM Serif Text, dark editorial theme
├── js/
│   ├── config.js               # Firebase configuration
│   ├── sync.js                 # Firebase real-time wrapper + auth
│   ├── poll.js                 # Poll CRUD, vote logic & user polls
│   ├── charts.js               # Animated bar chart renderer
│   └── app.js                  # Screen management & event handling
├── tests/
│   └── test_livepoll.py        # Playwright E2E test suite (24 tests)
├── .github/
│   └── workflows/
│       └── deploy.yml          # GitHub Actions → GitHub Pages
├── CLAUDE.md                   # AI agent project commands
└── README.md

🚀 Tech Stack

Layer Technology
Frontend HTML5, CSS3, Vanilla JavaScript (ES6+)
Auth Firebase Authentication (Google Sign-In)
Real-time Firebase Realtime Database
Typography DM Serif Text + DM Sans (Google Fonts)
QR Codes QRCode.js (CDN)
Testing Playwright (Python)
CI/CD GitHub Actions
Hosting GitHub Pages

🛠️ Local Development

git clone https://github.com/alfredang/livepoll.git
cd livepoll

# Serve locally
python3 -m http.server 8080
# or: npx serve -l 8080

# Open http://localhost:8080

Running Tests

pip install playwright
playwright install chromium

python3 .claude/test-app/scripts/with_server.py \
  --server "python3 -m http.server 8080" --port 8080 \
  -- python3 tests/test_livepoll.py

🔥 Firebase Setup

  1. Create a project at Firebase Console
  2. Add a Web App → copy the config into js/config.js
  3. Enable Realtime Database → Start in test mode
  4. Enable Authentication → Sign-in method → Enable Google
  5. Add your domain to Authorized domains (e.g. yourdomain.github.io)
  6. Deploy and you're live!

🤖 Acknowledgements

Built with OpenClaw — AI-powered personal agent platform.

Inspired by Mentimeter.


📄 License

MIT

About

⚡ Real-time interactive polling app — Mentimeter-style live polls with Firebase sync. Pure HTML/CSS/JS.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages