README

A minimalist Japanese word training app with Anki-like spaced repetition system (SRS). Designed for Xiaomi Redmi Note 8 Pro (1080×2340, portrait only).

Features

Word Management

  • Import words from JSON with dictionary data and audio
  • Export all data as JSON for backup/restore
  • Edit, delete, and manage words
  • Filter by: noun, verb (ichidan/godan), い/な adjective, adverb, expression, JLPT level
  • Search across kanji, hiragana, and meaning
  • Collapsible word groups by category

Training Modes

  • Kanji → Hiragana / Meaning / Audio
  • Hiragana → Kanji / Meaning / Audio
  • Meaning → Kanji / Hiragana / Audio
  • Audio → Kanji / Hiragana / Meaning
  • Verb Type (Godan vs Ichidan)
  • Adjective Type (い vs な)

Spaced Repetition (SRS)

  • Anki-like SM-2 algorithm
  • Configurable intervals and ease factors
  • Minimum 10-minute gap between reviews
  • Maximum ~5 month interval
  • Words with more mistakes appear more frequently
  • Due indicators on word list (red = due now, yellow = due soon, green = ok)

Time Challenge

  • Configurable time limits (30s, 60s, 120s, 180s, 300s)
  • Random mode selection per question
  • Score tracking and challenge history leaderboard

Statistics

  • Daily points, time, and word counts
  • 30-day bar chart with toggle (points/minutes/words)
  • Day streak counter
  • Top 10 most mistaken words
  • Challenge history
  • Words trained today list

Quiz Interface

  • 4 answer buttons in bottom 40% of screen
  • Green check / red X indicators
  • Swipe or double-tap to advance
  • Audio auto-play for audio questions
  • Session timer
  • Progress bar and score display

Custom Study

  • Difficult words (high error rate)
  • Due today (SRS scheduled)
  • By tag (any tag filter)

Architecture

lib/
├── config/
│   ├── app_config.dart      # All app behavior settings
│   ├── theme_config.dart    # Colors, fonts, spacing
│   └── strings.dart         # All user-facing text
├── models/
│   ├── word.dart            # Word data model
│   ├── training_session.dart # Session & stats models
│   └── quiz_mode.dart       # Quiz mode enum
├── services/
│   ├── database_service.dart # SQLite operations
│   ├── srs_service.dart     # Spaced repetition algorithm
│   ├── audio_service.dart   # Audio download & playback
│   ├── import_export_service.dart # JSON import/export
│   └── app_state.dart       # State management (Provider)
├── screens/
│   ├── home_screen.dart     # Bottom navigation
│   ├── word_list_screen.dart # Word list with filters
│   ├── dictionary_screen.dart # Dictionary browser
│   ├── stats_screen.dart    # Statistics & charts
│   ├── settings_screen.dart # Import/Export/Custom Study
│   ├── quiz_setup_screen.dart # Mode selection
│   ├── quiz_screen.dart     # Main quiz interface
│   ├── challenge_screen.dart # Time challenge
│   ├── word_info_screen.dart # Word detail/SRS info
│   └── edit_word_screen.dart # Edit word data
├── widgets/
│   ├── word_tile.dart       # Word list item
│   └── filter_chips_bar.dart # Horizontal filter chips
└── main.dart                # App entry point

Configuration

All app behavior is controlled from 3 config files — no need to modify other source files:

  • lib/config/app_config.dart — SRS parameters, quiz settings, challenge times, database name, etc.
  • lib/config/theme_config.dart — Colors, fonts, spacing, border radius, shadows
  • lib/config/strings.dart — All user-facing text (for localization)

Setup & Build

Prerequisites

  • Flutter SDK 3.1+
  • Android Studio or VS Code with Flutter plugin
  • Android SDK for building

Steps

  1. Create a new Flutter project:

    flutter create japanese_trainer
    cd japanese_trainer
  2. Replace the generated files with the files from this project:

    • Replace pubspec.yaml
    • Replace lib/ directory entirely
    • Replace android/app/src/main/AndroidManifest.xml
  3. Add your app icon to assets/ directory (optional)

  4. Install dependencies:

    flutter pub get
  5. Run on device:

    flutter run
  6. Build APK:

    flutter build apk --release

First Use

  1. Open the app
  2. Go to Settings (gear icon)
  3. Tap “Import Words” and select your JSON file
  4. Audio files will be downloaded automatically
  5. Go to Words tab and start training!

JSON Import Format

[
  {
    "word": "靴",
    "input_reading": "くつ",
    "input_meaning": "shoes",
    "dictionary": {
      "dictionary_url": "https://www.japandict.com/...",
      "tags": ["popular", "JLPT N5", "noun"],
      "reading": {
        "kanji": "靴",
        "kana": "くつ",
        "audio_url": "https://..."
      },
      "meanings_en": [
        {
          "meaning": "shoe, shoes, boots",
          "sense_tags": ["noun"]
        }
      ]
    }
  }
]

Data Storage

All data is stored in the app’s sandbox (Application Documents Directory):

  • Database: japanese_trainer.db (SQLite)
  • Audio files: audio/ subdirectory
  • Exports: japanese_trainer_export.json

No external storage or cloud services are used.