Skip to content

Latest commit

 

History

History
70 lines (62 loc) · 3.22 KB

File metadata and controls

70 lines (62 loc) · 3.22 KB

Ravan Core

What is this?

Ravan is a privacy-first tool that helps non-native English speakers learn from their real writing mistakes. It corrects your text system-wide and tracks your error patterns to build a personalized English learning profile.

Tech Stack

  • Shell: Tauri v2 (Rust backend)
  • Frontend: React + TypeScript + Vite
  • State: Zustand (persisted via tauri-plugin-store)
  • Styling: Tailwind CSS v4 + Shadcn UI (new-york style)
  • Animation: Framer Motion
  • AI: Streaming support for OpenAI, Anthropic, Google, Groq, OpenRouter, Ollama

Project Structure

src/
  components/
    ui/                 # Shadcn UI primitives (button, input, dialog, tabs, etc.)
    primitives/         # Shared composed components (KBD, EmptyState, StatusDot, PageTransition)
    pages/              # Page components
      HomePage.tsx      # Learning dashboard — summary stats, Quick Mode CTA
      YourWritingPage.tsx # Progress page — error patterns, trends, skill map
      Settings.tsx      # Tabbed settings (Provider, Presets, Shortcuts, Sync)
      PresetManager.tsx # Custom preset CRUD (advanced)
      ModelBrowser.tsx  # OpenRouter/Groq model picker
    popup/              # Quick Mode popup components
      QuickModePopup.tsx # Quick Mode floating window with graduated learning tips
      DiffView.tsx      # Word-level diff with graduated micro-tips
  services/
    ai.ts               # Unified AI streaming (6 providers) + structured correctText()
    cloud-sync.ts       # Ravan Cloud sync client (corrections + presets)
  stores/               # Zustand stores (all persisted)
    settings.ts         # AI provider config
    presets.ts          # Built-in + custom presets
    popup.ts            # Quick Mode state (includes correction changes)
    corrections.ts      # Correction history + error pattern aggregation
  lib/
    utils.ts            # cn() utility
    storage.ts          # tauri-plugin-store wrapper
    taxonomy.ts         # English skills taxonomy (~20 skills in 5 groups)
  styles/app.css        # Tailwind theme (dark/light)
src-tauri/
  src/lib.rs            # App entry, tray, plugins
  src/popup.rs          # Quick Mode window, shortcuts, clipboard
  capabilities/         # Tauri permission files

Learning System (Pattern-Based)

Every correction is auto-logged and categorized using a fixed taxonomy of ~20 English skills. Three learning layers:

  1. Graduated tips — shown inline in Quick Mode: full explanation → brief reminder → encouraging → badge only
  2. Your Progress page — skill map with error trends, examples, and improvement tracking
  3. AI-powered deep dives — personalized rule explanations and pattern analysis (Phase 2+)

Tauri Plugins

global-shortcut, clipboard-manager, store, os, http, notification, dialog, fs, single-instance

Commands

  • pnpm tauri dev — Run in development
  • pnpm tauri build — Build for production
  • pnpm build — Frontend only (TS check + Vite)
  • cargo check — Rust only (from src-tauri/)

Key Shortcuts

  • Alt+Space — Toggle Quick Mode popup
  • Ctrl+Alt+1-4 — Open Quick Mode with specific preset
  • Cmd+Enter — Apply correction in popup

Companion Repos

  • ravan-cloud (private) — Next.js + Clerk + Turso