React + Vite + TypeScript + Tailwind + Firebase (Auth/Firestore) + Workbox (PWA).
-
Install dependencies
npm install
-
Add environment variables to
.env
in the project root:VITE_FB_API_KEY=... VITE_FB_AUTH_DOMAIN=... VITE_FB_PROJECT_ID=... VITE_FB_STORAGE_BUCKET=... VITE_FB_SENDER_ID=... VITE_FB_APP_ID=...
-
Run locally
npm run dev
-
Build + generate service worker
npm run build node scripts/workbox-build.mjs npm run preview
-
Firebase rules
firebase deploy --only firestore:rules
-
Deploy to Firebase Hosting (optional)
firebase deploy --only hosting
- Seed content is inline in
src/App.tsx
for V1 evaluation. - KJV is public domain; NKJV is not. For NKJV text, obtain permission or use an API.
- The app registers a service worker at
/service-worker.js
(generated by Workbox after build). - Tailwind is enabled via
index.css
andtailwind.config.js
(typography plugin included).
src/App.tsx
— UI scaffold, auth, quiz, modules (mock data)src/app/firebase.ts
— Firebase init (env-based)public/manifest.webmanifest
— PWA manifestscripts/workbox-build.mjs
— builds the service workerfirestore.rules
— secure per-user progress docs
- Replace mock modules with Firestore
modules
collection. - Add queued offline writes for progress using IndexedDB.
- Create a simple Admin seeding tool or script.