Offline learning app for Fedora 44 / KDE Plasma 6.6. React + Vite single-file app
(src/App.jsx), packaged as an Android APK via Capacitor and as an installable
PWA via GitHub Pages. Public repo: LebaneseZorro/fedora-master.
This is a PUBLIC repo. Before any git commit, run:
grep -rinE 'REDACTED|\bjd\b|\bJD\b|192\.168\.1\.|REDACTED|REDACTED' src/ *.json *.html README.md 2>/dev/null || echo cleanIt must print clean. If it matches anything, STOP and fix before committing.
Never add personal names, hostnames, LAN IPs, or emails to any file.
Example IPs in lesson content use 192.168.0.x, username user, hostname workstation.
- The ENTIRE app is
src/App.jsx— single file by design. Don't split it into modules/components files. - Data lives in big const arrays near the top:
CMDS(command DB),SHORTCUTS,CMD_PLAIN+CONCEPTS→GLOSSARY(tappable terms),MODULES(lesson content),QUIZZES,ERRORS(error-explainer knowledge base), plus the terminal simulator (FS0,runCommand,SANDBOX_KNOWN). - Fully offline: NO fetch(), no API calls, no analytics, no external fonts/CDNs.
Persistence is
localStorageunder keyfedora-master-v1only. - Glossary terms auto-mark in lessons (dotted underline → bottom sheet). New
jargon in lesson prose should get a
CONCEPTSentry:{t, cat, say, m, ex, al?}. - Lesson block types:
p(prose),kv([term, explanation] pairs),list,code({lang, x}),note. New modules need: entry inMODULES, quiz inQUIZZESkeyed by module id, and glossary entries for new terms. - Content voice: internals-first, "why before what", technical but plain-language, case-sensitive-aware (mobile users). Fedora 44 facts: kernel 6.19.14, Plasma 6.6, DNF5-only, Plasma Login Manager, Wayland-only, tuned-ppd power stack.
- Web/dev check:
npm run build(Vite + PWA plugin; must end✓ built). - Android:
npx cap sync android, thencd android && ./gradlew assembleDebug.- Gradle JDK: system JDK is too new for the wrapper. If sync/build fails on JDK
version, ensure
android/gradle.propertiescontains:org.gradle.java.home=/opt/android-studio/jbr— never point it at system Java. - If
android/doesn't exist:npx cap add androidregenerates it (it's gitignored by design — never commit it).
- Gradle JDK: system JDK is too new for the wrapper. If sync/build fails on JDK
version, ensure
- Install to phone:
adb install -r android/app/build/outputs/apk/debug/app-debug.apk(the real APK is underapk/debug/, NOTapk/androidTest/). - Debug-signed APKs only. Never create keystores or signing configs without asking.
- Web deploy (iPhone/PWA users):
npm run deploy(builds + pushes gh-pages). Live at https://LebaneseZorro.github.io/fedora-master/ - Releases:
gh release create vX.Y.Z "android/.../app-debug.apk#Fedora-Master-vX.Y.Z.apk" --title ... --notes ...Bump minor for content additions, patch for fixes.
- Commit style: short imperative summary of the actual change (e.g. "Add tappable glossary (~130 terms)").
- Separate unrelated changes into separate commits.
- Never commit:
android/,dist/,node_modules/,*.apk, keystores (gitignore already covers these — don't weaken it). assets/(icon sources) andpublic/(PWA icons) ARE committed.
- Don't add npm dependencies without asking — the app deliberately has zero runtime deps beyond react/react-dom.
- Don't change
appId(com.fedoramaster.app) — installed phones update in place. - Don't reformat the whole of App.jsx (compact style is intentional; diffs matter).
- Don't touch
vite.config.jsbase ("") — required for both Capacitor and gh-pages.