Flutter mobile app for the RikiPath Japanese/JLPT learning platform.
- Flutter and Dart
- Riverpod (
flutter_riverpod) for state management and dependency injection go_routerfor navigation- Dio for HTTP networking
- Drift and
drift_flutterfor local persistence flutter_secure_storagefor authentication-token storagebuild_runneranddrift_devfor generated database code
Environment values are currently supplied with Dart compile-time definitions; the project does not use flutter_dotenv.
- Flutter stable compatible with the project's Dart SDK constraint (
>=3.12.0 <4.0.0) - Tested and verified with Flutter 3.47.3
- Android Studio with the Android SDK
- Java 21 (the Android Studio JBR is recommended)
- Android NDK 28.2.13676358
- Git
The Dart SDK ships with Flutter and does not need to be installed separately. If another machine encounters a dependency or Android toolchain compatibility issue, Flutter 3.47.3 is the known-good fallback for this project.
Visual Studio is not required for Android development. It is only relevant when building Flutter Windows desktop applications.
git clone https://github.com/RikiPath/RikiPath.Mobile.git
cd RikiPath.MobileNormal development uses built-in public defaults and does not require a local
.env file:
flutter runTo override those defaults, create an optional local environment file:
New-Item .env -ItemType FileAdd only the public values you need to override, using the variable names in Environment Configuration, then pass the file through Dart compile-time definitions:
flutter run --dart-define-from-file=.envThe built-in defaults target the current public development backend. Staging
and production builds must supply their own deployment values.
Never put secrets, JWT signing keys, database passwords, or backend private
credentials in a Flutter .env file. Dart-defined values can be extracted from
a built mobile application and are not secret storage. The local .env file is
ignored by Git and must not be committed.
See Environment Configuration for environment-specific rules and the current development HTTP limitation.
flutter pub getThe Drift database uses generated Dart code:
dart run build_runner buildRerun this command after changing Drift tables, database annotations, or other generated model definitions, and whenever generated .g.dart files are missing or out of date.
Localization output is generated from lib/l10n/app_vi.arb and
lib/l10n/app_ja.arb. Regenerate it after changing either ARB file:
flutter gen-l10nList available devices:
flutter devicesRun the application:
flutter runThe plain command uses the public development defaults. To override them with an optional file, use:
flutter run --dart-define-from-file=.envTo start an Android emulator, open Android Studio, go to Tools > Device Manager, create a virtual device if needed, and press the play button beside the device. Wait for it to boot before running flutter devices or flutter run.
Create a local debug APK with:
flutter build apk --debugThe APK is written under build/, which is ignored by Git. Release signing is
not configured for production distribution; do not treat a debug APK as a
store-ready artifact.
Before committing, run:
dart format .
flutter analyze
flutter testCurrent validated baseline at the time this guide was written:
flutter analyze: No issues foundflutter test: 583 tests passedflutter build apk --debug: Passed
This is a current baseline, not a permanent guarantee; update it when the test suite or toolchain changes.
lib/
app/ -> application bootstrap, router, and theme
core/ -> configuration, networking, database, storage, and shared widgets
features/ -> feature modules
test/ -> automated tests
docs/codex/ -> architecture, API, and implementation documentation
RikiPath.Backend/ is a local, strictly read-only backend contract reference and is not part of the mobile repository. docs/ui_reference/ contains local Stitch design references and is ignored by Git.
UI
-> Controller/Provider
-> Repository
-> API/Database
- Widgets must not call Dio directly.
- Do not invent backend endpoints or DTO fields; use the documented API contract and read-only backend reference.
- Reuse the centralized RikiPath design system.
- The learner mobile JLPT scope is N5, N4, and N3.
- Store authentication tokens through
flutter_secure_storage.
Some learner flows intentionally remain local or hybrid until the Backend publishes complete, safe contracts. These include live Learning discovery, live Review submission, learner-safe Mock Test question delivery/submission, fixture Lesson-to-Notebook identity, Grammar Notebook semantics, payments and booking, and Mentor mutations/grading. Firebase Phone Auth is experimental Backend test functionality and is not part of the current Mobile scope.
See Backend Replacement Points and Backend Requests for the verified boundaries. Do not replace them with invented frontend behavior.
Use Conventional Commits, with one logical feature per commit. Examples:
feat(auth): implement authentication flow
feat(learning): implement learning roadmap
fix(core): resolve API error mapping
docs(readme): update setup guide
chore(config): update development configuration
- Do not commit
.env. - Do not commit
RikiPath.Backend/. - Do not commit ZIP archives, build output, or temporary files.
- Never force push to
mainunless the team explicitly agrees.
flutter pub get
dart run build_runner build
flutter gen-l10n
dart format .
flutter analyze
flutter test
flutter build apk --debug
flutter runEvery app run/build must explicitly select API_PROFILE; there is no implicit
remote or tunnel fallback.
For the Android Emulator connected to a backend on the developer's host:
flutter run --dart-define=API_PROFILE=local-emulatorFor a verified remote server, supply its approved HTTPS origins explicitly:
flutter run `
--dart-define=APP_ENV=development `
--dart-define=API_PROFILE=remote `
--dart-define=API_BASE_URL=<approved-https-origin> `
--dart-define=SWAGGER_URL=<approved-swagger-url>The remote profile requires API and Swagger URLs and disables API metadata logging by default. Production additionally requires HTTPS and logging off. The team Test Server URL is intentionally not embedded; request the current approved endpoint from the project operator before using the remote profile.
Add the Flutter SDK /bin directory to PATH, restart the terminal, and try again.
dart run build_runner buildflutter doctorResolve the Android SDK, license, or Java issues reported by the command.
flutter pub get