commit 27a59671fc3d8f57ba0a037d3cc695f819de2ca4 Author: beantownbabe <156287695+beantownbabe@users.noreply.github.com> Date: Fri Jun 5 15:38:17 2026 +0200 Initial commit: HiActs Conference Poll app Flask poll app for the Hi-Acts 3rd Network Meeting at DESY Hamburg, 10 June 2026. Includes 11-question poll, live D3 bubble chart display, 7-page PDF analysis report, admin dashboard, and CSV export. Co-Authored-By: Claude Sonnet 4.6 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9d528fd --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +# Live poll data — never commit these +answers.json +emails.json +comments.json + +# Python cache +__pycache__/ +*.pyc +*.pyo + +# macOS +.DS_Store + +# R +.Rhistory diff --git a/README.md b/README.md new file mode 100644 index 0000000..f53f3af --- /dev/null +++ b/README.md @@ -0,0 +1,114 @@ +# Conference Poll — Hi-Acts 3rd Network Meeting +**Developed by TXproducts | June 2026** + +--- + +## What this is + +A self-paced live polling web app for the Hi-Acts 3rd Network Meeting at DESY Hamburg (10 June 2026). + +Attendees scan a QR code, answer 10 questions on their phone, and can view live results afterwards. Results update automatically every 2.5 seconds. + +--- + +## File structure + +``` +conference_poll/ +├── app.py Main server file (questions, routes, logic) +├── requirements.txt Python dependencies +├── static/ +│ ├── attend_qr.png QR code image shown on the join slide (replace before go-live) +│ └── logo.svg TXproducts logo +└── templates/ + ├── poll.html Attendee poll page (phone/tablet friendly) + ├── join.html QR code beamer slide (desktop, shown on projector) + ├── display.html Live results page (bubble chart + per-question analysis) + ├── question_view.html Single question bubble chart (linked from display page) + └── admin.html Internal raw results view (not public-facing) +``` + +--- + +## Pages + +| URL | Purpose | Who sees it | +|-----|---------|-------------| +| `/` | Attendee poll | Everyone who scans the QR | +| `/join` | QR code slide | Shown on projector/beamer | +| `/display` | Live results with bubble chart | Anyone with the link | +| `/q/1` — `/q/10` | Per-question bubble chart | Linked from display page | +| `/admin` | Raw response counts | Internal only | + +--- + +## How to run locally (for testing) + +**Requirements:** Python 3.10 or higher + +```bash +cd conference_poll +pip3 install -r requirements.txt +python3 app.py +``` + +Then open `http://localhost:5001` in a browser. + +--- + +## Deployment instructions + +### Recommended setup (Bluehost VPS or equivalent) + +1. Upload the entire `conference_poll/` folder to the server +2. Install dependencies: + ```bash + pip3 install -r requirements.txt + pip3 install gunicorn + ``` +3. Run with Gunicorn (production-grade server): + ```bash + gunicorn -w 2 -b 0.0.0.0:80 app:app + ``` + Or on port 443 with SSL if HTTPS is configured. + +4. The app will be accessible at the server's public IP or domain. + +### Before go-live checklist + +- [ ] Generate a new QR code pointing to the live URL (e.g. `https://poll.txproducts.de`) +- [ ] Replace `static/attend_qr.png` with the new QR code image +- [ ] Update the URL pill in `templates/join.html` (search for `poll.txproducts.de`) +- [ ] Restrict access to `/admin` so it is not publicly accessible (basic auth or IP whitelist) +- [ ] Consider adding a database for persistent storage (see note below) + +--- + +## Important: data persistence + +Currently all responses are stored in memory. If the server restarts during the event, all data is lost. + +For production, the `answers` dictionary in `app.py` should be replaced with a simple SQLite or PostgreSQL database. The relevant section is clearly marked in `app.py` with the comment "IN-MEMORY DATA STORE". + +--- + +## Security notes + +- The `/admin` page has no authentication. Restrict it at the server level before deployment. +- The Flask `secret_key` in `app.py` should be changed to a long random string for production. +- The demo routes (`/demo/stream`, `/demo/status`, `/submit_demo`) are safe to leave in but can be removed if preferred. + +--- + +## Changing questions (content owner: TXproducts) + +Questions are defined in `app.py` in the `QUESTIONS` list. The web dev team does not need to touch these. The TXproducts team manages question content directly. + +After any question change, the `QUESTIONS` array in `templates/display.html` (inside the ` + + diff --git a/templates/display.html b/templates/display.html new file mode 100644 index 0000000..3c64dc0 --- /dev/null +++ b/templates/display.html @@ -0,0 +1,796 @@ + + + + + + HiActs Live Results - TXproducts + + + + + + + + + + + + +
+ + +
+
+
Hi-Acts · 3rd Network Meeting
+
Innovation Challenge Arena
+
Data and Software Standardization
+
+
+

Every perspective matters.

+
Help us gain insight across the beamline community.
+
+
+ + +
+ + Live +
+
+ +
0
+
responses
+
+
+
+ + +
+
11 questions being asked to today's participants
+
+ +
+
+
Q1
+
What best describes your role at the beamline?
+
+
+
Beamline Scientist
+
Instrument Scientist
+
Industry User
+
Control System / IT
+
Other
+
+
+ +
+
+
Q2
+
In one word, describe your experiment logbook today.
+
+
+ chaotic + fragmented + manual + scattered + analog +
+
+ +
+
+
Q3
+
What is the biggest obstacle when moving data between beamlines or facilities?
+
+
+
Different control systems (TANGO, EPICS, SPOCK)
+
Inconsistent logbook formats
+
Missing or incomplete metadata
+
No common file format standard
+
Manual re-scripting for every beamline
+
Other
+
+
+ +
+
+
Q4
+
How do you feel about standardising beamline workflows?
+
+
+
Necessary and overdue
+
Desirable but very difficult
+
Too rigid for our experimental needs
+
Not our problem to solve
+
Other
+
+
+ +
+
+
Q5
+
When an industry user brings a sample, how well documented is the experiment?
+
+
+
Fully documented, reproducible
+
Mostly documented, some gaps
+
Partial, depends on the scientist
+
Barely documented
+
Other
+
+
+ +
+
+
Q6
+
If every beamline used the same data language, what would become possible?
+
+
+ Automated cross-facility comparison + Direct data delivery without post-processing + Reproducible experiments across facilities +
+
+ +
+
+ +
+
+ + +
+ + +
+ + +
+

Waiting for responses…

+

Results will appear here as people answer

+
+
+ + +
+ + + +
+ + +
Top 5 ranked results per question
+ +
+
+ +
+ +
+ + + + + +
+ +
+ + + + + diff --git a/templates/join.html b/templates/join.html new file mode 100644 index 0000000..663249c --- /dev/null +++ b/templates/join.html @@ -0,0 +1,161 @@ + + + + + + + Join the Poll – HiActs + + + + + + + + +
+ + +
+ Hi-Acts · 3rd Network Meeting + Competing Ideas. Shared Solutions. + DESY Hamburg · 10 June 2026 +
+ + +
+
Share your perspective
+
Scan to take part in the poll
+ + +
+ QR code to join poll +
+ + +
192.168.178.25:5001
+
+ +
+ + + diff --git a/templates/poll.html b/templates/poll.html new file mode 100644 index 0000000..e651b6a --- /dev/null +++ b/templates/poll.html @@ -0,0 +1,437 @@ + + + + + + + + HiActs Innovation Challenge + + + + + +
+ + +
+
+
Hi-Acts · 3rd Network Meeting
+
Innovation Challenge Arena
+
Data and Software Standardization
+
+
+

Every perspective matters.

+
Help us gain insight across the beamline community.
+
+
+ + +
+
+
+ + +
+ + + + +
+ + + + + diff --git a/templates/question_view.html b/templates/question_view.html new file mode 100644 index 0000000..68baf5a --- /dev/null +++ b/templates/question_view.html @@ -0,0 +1,490 @@ + + + + + + + + {{ question.text[:40] }}… – HiActs + + + + + + + + + + + + +
+ + +
+ ← All Results +
+ +
+ +
+
+
+ + Live +
+
+ +
0
+
responses
+
+
+
+ + +
+

+
+ + +
+ +
+

Waiting for responses…

+

No votes yet for this question

+
+
+ + +
+ + +
+ + +
+ +
+ + + +