---------------------------------------------------------------------- This is the API documentation for the confquiz library. ---------------------------------------------------------------------- ## Programmatic API Load a validated configuration or export an attendee site from Python. ---------------------------------------------------------------------- This is the CLI documentation for the package. ---------------------------------------------------------------------- ## CLI: confquiz ``` ``` ### confquiz init ``` ``` ### confquiz validate ``` ``` ### confquiz export ``` ``` ### confquiz preview ``` ``` ### confquiz present ``` ``` ### confquiz doctor ``` ``` ### confquiz firebase ``` ``` ### confquiz firebase scaffold ``` ``` ### confquiz sessions ``` ``` ### confquiz sessions list ``` ``` ### confquiz sessions release ``` ``` ### confquiz sessions clean ``` ``` ---------------------------------------------------------------------- This is the User Guide documentation for the package. ---------------------------------------------------------------------- ## Getting started ### Conf Quiz Conf Quiz runs a PDF presentation and anonymous audience questions on the same timeline. A question appears immediately after its configured slide; when it is finished, the presenter continues with the next page. The speaker uses a local presenter view. Attendees use a static site on their phones, usually hosted on GitHub Pages. Firebase carries room state, responses, and published results between the two. ## What it is for Conf Quiz is designed for conference talks, workshops, and community sessions where the speaker wants feedback without turning the room into a competition. It has no accounts, points, or leaderboard. You can: - poll the room with choice, range, rating, number, and ranking questions; - collect free text and word-cloud responses with presenter moderation; - mark a question as having a correct answer, then reveal it without awarding points; - decide whether attendees see results live, after voting closes, after the reveal, or never; - let each attendee switch independently between the light and dark interface; - share the current PDF page to attendee devices; and - restart or replace a room from the presenter computer. ## How a presentation runs 1. Prepare a PDF and a `quiz.yml` file. 2. Rehearse both screens with `confquiz preview`. 3. Export and publish the attendee site. 4. Start `confquiz present` on the speaker computer. 5. Show the QR code when the audience is ready to join. The presenter service is not deployed. It uses Firebase Admin credentials on the speaker's computer and sends only attendee-safe data to Firestore. ## Start here - [Install Conf Quiz](user-guide/installation.html) - [Build your first quiz](user-guide/first-quiz.html) - [Configure Firebase](user-guide/firebase-setup.html) - [Publish the attendee site](user-guide/deploy-attendee-site.html) :::{.callout-note} The local preview does not need Firebase. Use it while writing questions and checking the slide order. ::: ### Installation Conf Quiz supports Python 3.10 and newer. Node.js is not required when using the published Python package; its browser files are already built. ## Install the command With pip: ```bash pip install conf-quiz ``` With uv, install it as an isolated command-line tool: ```bash uv tool install conf-quiz ``` Check the installation: ```bash confquiz --help ``` ## Create a project-local environment If you prefer to keep the package with a presentation repository: ```bash uv init --bare my-talk cd my-talk uv add conf-quiz uv run confquiz init . ``` Use `uv run confquiz ...` for the remaining commands in that repository. ## Files created by `init` ```bash confquiz init my-talk ``` creates: | File | Purpose | |---|---| | `quiz.yml` | Presentation, session, and question configuration | | `sample-slides.pdf` | Twelve blank pages to make the example immediately runnable | | `firebase.web.example.json` | Shape of the public Firebase web configuration | | `.gitignore` | Excludes local Firebase configuration, credentials, and build output | Replace `sample-slides.pdf` with your deck. Create the local Firebase file before validating a live configuration: ```bash cp firebase.web.example.json firebase.web.json ``` `firebase.web.example.json` is safe to commit because it contains placeholders. `firebase.web.json` is ignored by Git and belongs to the speaker's Firebase project. `init` leaves existing files alone. Pass `--force` only when you intentionally want to replace the generated examples. ## Presenter system requirements For a live room, the presenter computer also needs: - network access to Firebase; - a Firebase Admin service-account JSON file or Application Default Credentials; and - a modern browser for the presenter view. The exported attendee site needs only static HTTPS hosting and a browser. Continue with [Your first quiz](02-first-quiz.qmd). ### Your first quiz Create a working directory: ```bash confquiz init my-talk ``` Put your PDF at `my-talk/slides.pdf`, then replace `my-talk/quiz.yml` with a small configuration: ```yaml schema_version: 1 presentation: id: reliable-python title: "Reliable Python services" speaker: "Your name" public_url: "https://your-account.github.io/reliable-python/" slides: source: "slides.pdf" theme: preset: light accent: "#df4b2f" firebase: web_config: "firebase.web.json" namespace: "confquiz" session: show_results_on_presenter: false show_results_on_attendee_devices: true share_slides_with_attendees: false questions: - id: first-poll after_slide: 2 type: single_choice prompt: "Which failure do you plan for first?" options: - { id: network, label: "Network failure" } - { id: dependency, label: "Dependency failure" } - { id: bad-input, label: "Unexpected input" } ``` `after_slide: 2` puts the poll between PDF pages 2 and 3. ## Rehearse ```bash confquiz preview my-talk/quiz.yml ``` The command prints two URLs: - the presenter URL includes a local control token; - the attendee URL ends in `/attend/?code=DEMO26`. Open both. Use the arrow keys in the presenter view to move through the PDF. After page 2, the question opens on both screens. Submit an attendee response, then advance once to close voting and show results. Preview stores everything in memory. It does not read or write Firestore and is safe to restart as often as needed. ## Validate the files Copy the generated example and replace every placeholder with the web configuration from your own Firebase project: ```bash cp my-talk/firebase.web.example.json my-talk/firebase.web.json ``` Then run: ```bash confquiz validate my-talk/quiz.yml ``` Validation checks the YAML schema, Firebase metadata, PDF integrity, page references, and remote-slide checksum when one is configured. Next, [set up Firebase](10-firebase-setup.qmd) and [publish the attendee site](12-deploy-attendee-site.qmd). ## Set up a live room ### Firebase setup Conf Quiz uses Firebase only for live rooms. The public attendee app talks to Firebase with the web SDK; the local presenter uses the Admin SDK. ## 1. Create the Firebase services In one Firebase project: 1. Create the `(default)` Cloud Firestore database in Native mode. 2. Enable **Anonymous** in Authentication → Sign-in method. 3. Register a web app. 4. Copy `firebase.web.example.json` to the Git-ignored `firebase.web.json` beside `quiz.yml`. 5. Replace the placeholders with that web app's configuration object. The file should contain the object itself, not the surrounding `