Skip to content
lectricalPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Lectrical Learn

A multiple-choice learning app. Question banks are written and published on Windows, and studied on Android (iOS later), in practice mode with hints or timed mock tests.

  • Learners: practice (instant feedback, hints, explanations), mock tests (timer, question grid, flags, no hints), pause and resume, progress by section, bookmarks, "report a problem", progress backup.
  • Authors (Windows): a three-pane editor for banks, sections, questions and mock test papers, with a phone preview, CSV and image import, live reload when files change, and one-button publishing to GitHub.
  • Question banks are YAML files in a separate repo, lectrical/question-banks. Its AGENTS.md explains the format to people, Claude and Gemini.

Design: docs/superpowers/specs/2026-11-29-lectrical-learn-design.md

Set up a development PC (Windows)

  1. Install the Flutter SDK (stable), for example git clone https://github.com/flutter/flutter.git -b stable C:\dev\flutter, and add C:\dev\flutter\bin to your user PATH.
  2. Install Visual Studio 2026 (or 2022) with the Desktop development with C++ workload.
  3. Install Android Studio, open it once and finish the setup wizard (it installs the Android SDK). Then run flutter doctor --android-licenses.
  4. Point Flutter at Android Studio's Java: flutter config --jdk-dir "C:\Program Files\Android\Android Studio\jbr".
  5. Turn on Developer Mode (Settings → System → For developers). Flutter needs it to build Windows apps with plugins.
  6. On the phone, turn on Developer options and USB debugging, and plug it in.
  7. Run flutter doctor. Everything you need should show ✓.

Run, test, build

flutter pub get
dart run build_runner build --delete-conflicting-outputs   # after changing the database tables
flutter run -d windows                                      # Windows, with the Author area
flutter run                                                  # the connected phone
flutter test                                                 # app tests
cd packages/bank_format; dart test; cd ../..                 # bank format tests
flutter build apk --release                                  # Android release build
flutter build windows --release                              # Windows release build

Check a banks repo from the command line:

cd packages/bank_format
dart run bank_format:validate C:\Users\<you>\Documents\Lectrical\question-banks --fix-ids

tool/pack_starter.dart <banks-repo> refreshes the starter bank built into the app (assets/starter_banks.zip).

Signing key

Every Android build, debug and release, is signed with one upload key, so updates install over the existing app without wiping its data. Create it once and choose your own password:

New-Item -ItemType Directory -Force "$env:USERPROFILE\.lectrical"
& "C:\Program Files\Android\Android Studio\jbr\bin\keytool.exe" -genkey -v -keystore "$env:USERPROFILE\.lectrical\upload-keystore.jks" -keyalg RSA -keysize 2048 -validity 10000 -alias upload

Then create android/key.properties. It is git-ignored:

storeFile=C:/Users/<you>/.lectrical/upload-keystore.jks
storePassword=<password>
keyAlias=upload
keyPassword=<password>

Back up the .jks file and its password. Without them, an update means uninstalling the app first, which deletes the phone's progress. Android builds refuse to run until key.properties exists, so nothing can be signed with a different key by accident.

Publishing banks

  1. On Windows, open Multiple choice → Author → Publishing settings.
  2. Set the banks repo URL, the branch and the local folder (default Documents\Lectrical\question-banks).
  3. Paste a GitHub fine-grained token with Contents: read and write on the banks repo only. It is stored in Windows' secure storage, never in a file or in Git's settings. Press Test connection.
  4. Edit questions in the Author area, or let Claude or Gemini edit the files. The app reloads when files change.
  5. Press Publish. It is disabled while any bank has problems. If someone else pushed a clashing change, the app stops and says so; it never force-pushes.
  6. On the phone: Settings → Update banks. The phone also checks once a day.

Backing up progress

Scores and history live only on each device. Use Settings → Export progress to save them to a file, and Import progress to restore them.

Adding a learning module

See AGENTS.md: create lib/modules/<name>/, implement LearningModule, and add one line to lib/modules/registry.dart.

Later

  • iOS: builds need macOS, so use a cloud build service such as Codemagic or GitHub Actions, plus an Apple Developer account.
  • Play Store publishing, other people's bank repos, and progress sync.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages