Skip to content

Repository files navigation

RustType icon

RustType

A native macOS typing trainer built with Rust & React.

Practice touch typing with timed sessions, live WPM/accuracy feedback, an on-screen keyboard with finger zones, idle detection with sound alerts, and a full statistics dashboard.

Platform Tauri React Rust License


πŸ“Έ Screenshots

Practice setup Typing session
Practice Typing
Statistics dashboard Dark theme
Statistics Settings, dark theme

✨ Features

⌨️ Practice

  • Timed sessions β€” 10 / 15 / 20 / 25 / 30 minutes with an animated countdown ring
  • Two text sources β€” generated random words (English & Russian word banks) or your own pasted text
  • Live feedback β€” color-coded characters, blinking caret, real-time WPM Β· accuracy Β· error count
  • Virtual keyboard β€” QWERTY ⇄ Π™Π¦Π£ΠšΠ•Π layouts, pressed-key highlight, next-key hint glow, optional touch-typing finger zones
  • Idle detection β€” stop typing for 5s and you get a warning toast + chime; 15s brings up an alert modal
  • Completion screen β€” confetti, animated WPM count-up, and a WPM-over-time chart

πŸ“Š Statistics

  • Best & average WPM / accuracy, total practice time, day streak
  • 30-day speed and accuracy trend charts
  • Recent session history with per-session details
  • Everything stored locally in SQLite (~/.rusttype/stats.db) β€” no accounts, no cloud

βš™οΈ Settings

  • Word-bank language (English / Русский) and keyboard layout
  • Light / dark theme
  • Sound toggle β€” mutes everything including Rust-side key clicks
  • All preferences persisted between launches

πŸ”Š Sound

All sound effects (key click, error buzz, idle chimes, timer done, whoosh) are synthesized at build time by build.rs and embedded into the binary β€” the app ships with zero audio assets and zero runtime dependencies.

πŸ— Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      invoke / events      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   React 19 + TypeScript     β”‚ ◄───────────────────────► β”‚         Rust (Tauri v2)      β”‚
β”‚                             β”‚                           β”‚                              β”‚
β”‚  Practice Β· Stats Β· Settingsβ”‚   register_keystroke,     β”‚  typing_engine  WPM/accuracy β”‚
β”‚  Tailwind v4 Β· Framer Motionβ”‚   timer://tick,           β”‚  timer          daemon+idle  β”‚
β”‚  Recharts Β· Howler          β”‚   timer://idle-*, ...     β”‚  sound          rodio thread β”‚
β”‚                             β”‚                           β”‚  stats_db       rusqlite     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  • typing_engine.rs β€” sessions, per-keystroke validation, WPM (chars/5 Γ· min) and accuracy math, word banks
  • timer.rs β€” countdown daemon thread emitting timer://tick|done|idle-warning|idle-alert events
  • sound.rs β€” dedicated rodio audio thread; all .wavs embedded via include_bytes!
  • stats_db.rs β€” SQLite persistence: session history, best scores, daily aggregates, streak

πŸš€ Getting Started

Prerequisites

Development

git clone https://github.com/<you>/RustType.git
cd RustType
npm install
npm run tauri dev

Production build

npm run tauri build

Outputs a ready-to-use app and DMG installer:

src-tauri/target/release/bundle/macos/RustType.app
src-tauri/target/release/bundle/dmg/RustType_<version>_aarch64.dmg

The bundle is ad-hoc signed. For distribution outside your own machine, configure a Developer ID certificate and notarization in tauri.conf.json.

πŸ—‚ Project Structure

β”œβ”€β”€ src/                        # React frontend
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ practice/           # TimerPanel, TypingArea, VirtualKeyboard,
β”‚   β”‚   β”‚                       # TextSourcePanel, IdleOverlay, CompleteScreen
β”‚   β”‚   β”œβ”€β”€ Sidebar.tsx
β”‚   β”‚   └── TopBar.tsx
β”‚   β”œβ”€β”€ pages/                  # Practice / Stats / Settings
β”‚   β”œβ”€β”€ lib/                    # api.ts (typed invoke), settings.tsx, keyboardLayouts.ts
β”‚   └── types.ts                # Mirrors of the Rust structs
└── src-tauri/                  # Rust backend
    β”œβ”€β”€ src/                    # lib.rs, typing_engine, timer, sound, stats_db
    β”œβ”€β”€ build.rs                # Synthesizes .wav assets before compilation
    └── generate_sounds.rs

πŸ“„ License

MIT

About

Practice touch typing with timed sessions, live WPM/accuracy feedback, an on-screen keyboard with finger zones, idle detection with sound alerts, and a full statistics dashboard.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages