Dibya Sarothi
Dibya Sarothi
Developer ToolsProduction ReadyAugust 2026

Quizzler Trivia Desktop App

Tkinter GUI Quiz Engine with Live OpenTDB API & Offline Fallback

Fetches live boolean trivia from OpenTDB with HTML entity decoding, canvas flash feedback, and anti-spam button locking.

Quizzler Trivia Desktop App overview
Project Overview

An interactive True/False trivia desktop application built with Python, Tkinter, and the Open Trivia Database (OpenTDB) API. Unescapes HTML entities cleanly, provides 1-second green/red visual canvas feedback, prevents rapid double-clicks during transitions, and falls back gracefully if OpenTDB hits rate limits.

Problem Statement

Live public trivia APIs frequently enforce strict HTTP 429 rate limits and return raw HTML-escaped entities like " inside question strings.

Engineering Rationale

Small desktop GUI utilities still benefit from API resilience, fallback question sets, and clean UI state locking.

Engineering Objectives

Fetch 10 boolean trivia questions dynamically from OpenTDB with an automatic offline fallback set.
Decode HTML entities via Python's html.unescape module prior to Tkinter canvas rendering.
Lock True/False buttons cleanly during 1-second visual feedback transitions.
Architecture Blueprint

System Architecture

Model-View separation uniting QuizBrain state engine with QuizInterface Tkinter canvas controller.

01

Offline Fallback & Anti-Spam Lock

Automatically serves bundled backup questions on API timeouts/429s and locks button events across transition frames.

Core & Backend Implementation

  • Requests client hitting OpenTDB boolean endpoint with fallback data.
  • QuizBrain class managing question progression, answer validation, and score tallies.

Client & Interface Layer

  • Tkinter canvas with dynamic green/red flash feedback and live top-right score counter.

Data & Schema Design

Engine / Tier: In-Memory QuestionModel List + Static Fallback Bank

Lightweight QuestionModel instances holding unescaped question strings and boolean answers.

Core Models & Entities
QuestionModelQuizBrain

Authentication & Security Controls

Auth Model: Public Read-Only API (No Secrets Required)
  • Input locking prevents UI race states during transitions.

Engineering Challenges & Technical Decisions

Key Challenges Solved

Challenge: Rapid double-clicks advancing two questions before visual feedback cleared.
Engineering Solution: Temporarily disabled True/False button states across the 1000ms window.after transition.

Trade-Off Decisions

Decision: Built-In Fallback Question Set
Architectural Rationale: Keeps the desktop app 100% playable even under offline or OpenTDB rate-limit conditions.

Testing & Verification Methodology

Frameworks & Approach: Offline Mode & Rate-Limit Simulation
  • Verified clean HTML entity unescaping and end-of-deck state lockdown.

Results & Engineering Takeaways

Practiced clean MVC/OOP separation in event-driven Python Tkinter GUIs.