This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
What I Built
🕯️ Lumina: Realms of Remembrance & Lore is a browser-based educational trivia arcade that treats Halloween as two traditions worth learning from, not one.
The Challenge theme asked for something spooky, Halloween-adjacent, or in the spirit of Día de los Muertos. I chose "all of the above" and made the duality the whole point. Lumina ships with three playable realms:
- El Camino de los Recuerdos — Día de los Muertos through real Nahua cosmology (Mictlán, Mictecacihuatl, the Cihuateteo), the four elemental offerings (salt, water, copal, papel picado), the botanical chemistry of cempasúchil marigolds, Posada and Rivera's La Catrina, and Purepecha candlelit vigils on Lake Pátzcuaro.
- The Alchemist's Crypt — Halloween as science. Samhain harvest markers, Pepper's Ghost optics and 45° specular reflection, bat echolocation and moth counter-clicks, tapetum lucidum night vision, pumpkin beta-carotene, and medical debunkings of vampire and werewolf lore (porphyria, ergotism, rabies).
- The Liminal Crossroads — a hybrid mode that alternates between both, asking players to hold two cosmologies at once.
The core loop is a ticking candle survival engine. An animated SVG candle is your life bar: correct answers replenish the flame, mistakes puff smoke and cost seconds, and streaks (3x/5x/10x) trigger luminous flares and harmonic fanfares. It's a game about keeping a light alive while learning why we light it.
There are 60 pre-seeded, culturally vetted questions (36 four-choice + 24 Myth-vs-Fact), three difficulty tiers, a Certificate of Luminous Attainment gated at 50% with printable/PDF export, a "Knowledge Digest" session recap, and an in-app Codex Explorer for reading every fact outside of gameplay.
I wanted the "spooky" to be the hook and the education to be the payload — the scariest thing in Lumina is how much of the folklore turns out to be chemistry, biology, and history.
Demo
Live demo: https://dmytrovoytko.github.io/lumina-spookyedu/
- Trivia & candle timer
- Candle pressure & time limits
- Knowledge base - Codex of Remembrance & Science
- Certificate of Luminous Attainment
The demo runs fully offline on GitHub Pages — no backend, no login, no API key required.
Code
Repository: github.com/dmytrovoytko/lumina-spookyedu
Highlights worth a look:
-
src/components/AIQuestionGeneratorModal.tsx— optional LLM question generation with a local fallback synthesizer. -
src/components/CandleHUD.tsx— the SVG candle survival/timer engine. -
src/data/triviaBank.ts— the 60 vetted Día de los Muertos / Halloween science questions. -
src/utils/audio.ts— the procedural Web Audio sound design (zero audio files). -
.github/workflows/— static build + GitHub Pages deploy.
How I Built It
Stack: React 19 + TypeScript, Tailwind CSS v4, Vite, Lucide React, and the native Web Audio API. It builds to a 100% static bundle with 16 unit tests via tsx --test.
The open-weight model: Lumina's content is pre-seeded and offline-first, but the Infinite AI Question Generator lets players expand the deck on demand. When a user supplies an API key, it calls an open-weight Gemma model — gemma-4-31b-it in the current build (swappable for gemma-4-26b-a4b-it or gemini-3.5-flash via a single line in AIQuestionGeneratorModal.tsx). The prompt asks the model to return strict JSON trivia cards with an explanation and a source/context field, so generated content stays in the same educational format as the curated bank.
The important design choice: the model is an enhancement, never a dependency. If there's no key, no network, or the request fails, the app falls back to a local procedural synthesizer, so the GitHub Pages demo stays fully functional. That's deliberate — an educational artifact shouldn't break because an API quota did.
Why Does Open Innovation Matter?
Open innovation made the shape of this project possible, not just its cost.
First, open-weight models let me put a frontier-ish model behind a static site with no proprietary backend and no vendor lock-in. A visitor can bring their own key, or none at all, and the experience degrades gracefully. That portability is only possible because the model is open and callable on my terms.
Second, open tooling made the whole thing reproducible: Vite, React, Tailwind, the Web Audio API, and a GitHub Actions workflow mean anyone can fork Lumina, change a question, swap the model, and redeploy to their own Pages URL. A closed-API product would have locked the content pipeline behind someone else's dashboard.
Third, and most importantly for this theme: cultural knowledge should be inspectable and remixable. Día de los Muertos is living heritage, and the best guard against flattening it into decoration is a codebase where the sources, explanations, and question logic are all visible and editable. Open source lets educators, families, and communities correct and extend the material — which a black-box API never could.
Lumina is my small argument that spooky and sacred can share a candle 🕯️ and that the light should belong to everyone.
🎃💀 Have fun! 👻





Top comments (0)