How uahh/toastfish works
Project type and purpose
• ToastFish is a Windows desktop application built in WPF/.NET 4.7.2 following the MVVM pattern.
• Its purpose is to quietly push vocabulary words via Windows 10 notifications (Tray toasts), play pronunciations, track progress in a local SQLite DB, and allow custom word imports.
File structure
• Top-level files: App.xaml(.cs) (startup), App.config, ToastFish.sln/.csproj, README, LICENSE.
• MVC-style separation:
• View/: XAML views (ToastFish.xaml)
• ViewModel/: ViewModelLocator, ToastFishModel.cs
• Model/: domain modules (Log, Mp3, PushControl, SM2plus algorithm, SqliteControl, StartWithWindows)
• .github/workflows: CI pipeline for .NET Desktop
README
• Describes features: choose word library, set count, start memorization, testing, record logs (.xlsx under Log folder), import or customize words via Excel template, Windows 10 requirement.
• Tech stack: WPF, MVVM, local SQLite, Windows notification API, .NET 4.7.2
Main components & their interactions
a. UI Layer (View)
• ToastFish.xaml: user controls for selecting libraries, count, start/test flow
• Binds to ViewModel via ViewModelLocator
b. Presentation Logic (ViewModel)
• ToastFishModel: orchestrates user actions, invokes Model services, exposes Commands & Observable properties
c. Domain/Service Layer (Model)
• PushControl: builds and schedules notification payloads (PushWords, PushCustomizeWords, PushGoinWords, PushJpWords)
• Mp3: DownloadMp3, PlayMp3 for pronunciation (uses local Resources/Goin mp3s or remote if configured)
• SqliteControl: data persistence (Select.cs) reading/writing review history (inami.db)
• Log: CreateLog writes session logs (.xlsx in Log folder)
• SM2plus: spaced-repetition algorithm (Card.cs, Parameters.cs)
• StartWithWindows: HotKey.cs & startup registration
d. External Dependencies
• Windows 10 Toast Notification Center
• Local .db files, .xlsx templates & generated logs
• Excel engine/library (implicit via .NET interop)
Data flow summary:
User → View → ViewModel
→ invokes Model services (SM2 scheduling, DB reads)
→ PushControl schedules Windows◎Notifications
→ Mp3 service plays audio
→ On session end, Log service writes .xlsx; SQLite persists status
Architectural patterns & principles
• MVVM: clear separation of View, ViewModel, Model
• Layered architecture: Presentation → Application → Domain → Infrastructure
• Dependency injection via ViewModelLocator (if used)
• Single responsibility per sub-module (Push, DB, Audio, Logging)
• Extensibility: custom Excel template for user-defined words