# Tahqîq — Syntax-tree flashcards
Tahqîq (internal codename: Syntactic) is a desktop app for building and reviewing sentences annotated with syntax trees using spaced repetition (SM-2).

---
## Key features
| Feature | Description |
|---|---|
| Visual tree editor | Build and edit constituency trees with drag & drop and keyboard support |
| Spaced repetition | SM-2 scheduler for review intervals |
| Decks & cards | Organize sentences into decks; each card stores a gold-standard tree |
| Import / Export | Share decks as `.syntactic` archives (JSON + assets) |
| Statistics | Review history, streaks and accuracy charts |
| Offline-first | Native desktop app built with Tauri (Rust backend + web UI) |
---
## Releases / Installation
Download pre-built installers from the Releases page on GitHub. Typical assets:
- Windows: `Tahqiq-<version>-setup.exe` (Inno Setup)
- macOS: `Tahqiq-<version>.dmg` (drag to Applications)
- Linux: `Tahqiq-<version>-x86_64.AppImage` or `.deb`
Run the platform-specific installer or make the AppImage executable and launch it.
---
## Develop locally
Prerequisites:
- Node.js (18+ recommended)
- Rust (1.78+)
- Optional: `@tauri-apps/cli` for packaging
Install dependencies and run the app in development mode:
```powershell
npm install
npx tauri devNotes:
- The frontend runs with Vite; use
npm run devto start the web dev server only. - To build the frontend for production:
npm run build(runstsc && vite build). - To build a native bundle, use the Tauri build flow (
npx tauri build) after setting up platform toolchains.
# Frontend dev server
npm run dev
# Run full Tauri app (dev)
npx tauri dev
# Frontend production build
npm run build
# Rust check / build
cargo check --workspace
cargo build --release
# Run tests (Rust)
cargo test --workspaceTop-level crates and folders (high-level):
crates/ # Rust crates: domain, storage, srs, stats, import-export, tree-canvas, app-shell
src/ # Frontend (React + TypeScript) source
src-tauri/ # Tauri bootstrap and command handlers
packaging/ # Platform packaging scripts
assets/ # Fonts, icons, images used by the UI
- Create a deck in Library → New Deck.
- Add a sentence and construct its syntax tree in the editor.
- Study: reconstruct trees from memory and grade your answers (Again / Hard / Good / Easy).
- Export decks via the Library / Settings to share with others.
Contributions are welcome. Please open issues for bugs and feature requests, and send PRs against the main branch. Follow the repository's code style and run tests & linters before opening a PR.
MIT — see LICENSE