~/projects/biblio-trivia $ cat case-study.md
CASE STUDY — 09

Biblio — Offline-First Trivia

A Bible trivia game with multiple translations in local SQLite, three difficulty modes, and online multiplayer with shareable lobbies.

Creator Side project
React NativeSQLiteFirebase
01 — The Problem

A game that works in airplane mode

Trivia needs instant questions — no spinners, no network dependency. But multiplayer needs the opposite: shared real-time state. The app had to do both.

bash
$ adb shell svc wifi disable
network: offline
quiz engine: SQLite local — 0ms fetch
3 translations available, all modes playable
02 — The Approach

Local SQLite core, Firebase only for the social layer

All translations and question banks ship inside the app in SQLite — the single-player game never touches the network. Firebase handles only what must be shared: lobbies, live matches, and the leaderboard.

ts
 1// every question is a local query 2const q = await db.get( 3  `SELECT * FROM questions 4   WHERE difficulty = ? AND translation = ? 5   ORDER BY RANDOM() LIMIT 1`, [mode, lang]); 6  7// multiplayer rides Firebase RTDB 8const lobby = ref(rtdb, `lobbies/${code}`); 9onValue(lobby, syncMatchState);
03 — The Architecture

Offline core with an online shell

The quiz engine, content, and progress are fully local; the Firebase layer wraps around it for multiplayer without becoming a dependency for core play.

RN App SQLite (local) Quiz Engine Firebase RTDB Lobbies & Leaderboard
04 — The Results

Fast everywhere, social when online

Placeholder: add downloads, play counts, or multiplayer session stats.

0%
playable offline
0
difficulty modes
0
tap to share a lobby link