Skip to main content

System Architecture Overview

IELTS Mastery Hub is a local-first desktop application. There is no application server: the React UI calls Rust commands through Tauri's IPC bridge, and Rust reads/writes a local SQLite database. The only outbound network request the app makes is to the configured active AI provider when scoring Writing submissions.

graph LR
UI[React 19 UI<br/>src/ui] -->|invoke commands| SVC[Service Layer<br/>src/ui/services, lib/tauri.ts]
SVC -->|Tauri IPC| CMD[Rust Commands<br/>src/core/src/commands]
CMD --> REPO[Repositories<br/>src/core/src/repositories]
REPO --> DB[(SQLite<br/>imh.db)]
CMD -.grade_writing only.-> PROV[External AI Provider<br/>configured in Admin]

Technology choices

LayerTechnologyWhy
UI frameworkReact 19Modern concurrent rendering, component model
LanguageTypeScript (strict mode)Type safety across the IPC boundary
Build toolVite + SWC (@vitejs/plugin-react-swc)Fast dev server and HMR
RoutingReact Router v6 (react-router-dom v7 package)Client-side route-level pages
StylingTailwind CSS v4Utility-first styling
Componentsshadcn/ui (Radix primitives)Accessible design-system primitives
AnimationFramer MotionTransitions/animations
ChartsRechartsProgress/score visualizations
Async/server stateTanStack React QueryCaching Tauri command results
FormsReact Hook Form + Zod (@hookform/resolvers)Form state + schema validation
Desktop runtimeTauri 2Rust-backed native shell, small binaries
Backend languageRustSafety + performance for local data access
Database driversqlx (SQLite)Compile-time checked queries, async
Async runtimetokioAsync Rust runtime used by sqlx/Tauri

Local-first, not client-server

There is no REST/GraphQL API and no remote database. All Reading, Writing, Listening, and session data lives in a single SQLite file (imh.db) in the OS-specific app data directory (see Local Data Storage & Privacy). The one exception is the Writing module's AI grading feature, which sends the prompt and student response to whichever AI provider is configured as active in Admin → AI Configurations (see Writing Module & AI Grading).

Where to go next