This is a text repository explorer built with Rust and akar (a GPU UI component library) on top of wgpu and glyphon. The application provides an infinite canvas interface for exploring text documents in a visual, card-based layout, with hybrid commit, code, and document search.
✅ Infinite Canvas
- Zoom in/out with mouse wheel (0.1x to 5x)
- Pan with middle mouse button or Cmd/Ctrl + left click
- Grid background with coordinate indicators
- Zoom indicator in bottom-right corner
✅ Left Drawer
- Folder icons with Unicode symbols
- Hover effects and selection states
- Expand/collapse animation
- Document count display
✅ Document Cards
- Git log cards (real data from the current repo) and search result cards
- File type icons
- Title, content preview, and metadata
- Hover and selection states
- Viewport culling for performance
✅ Global Search Box
- Fixed at bottom center of screen
- Cmd+K / Ctrl+K keyboard shortcut (unified search — all sources)
- Real-time filtering across git log, code, and documents (hybrid FTS5 + vector KNN via the indexer)
- Result count display
- Three result containers on canvas (git log, codebase, documents)
- Clear button
✅ Code Search Across Five Languages
- Git-tracked Rust (
.rs), TypeScript (.ts), TSX (.tsx), JavaScript (.js), and JSX (.jsx) files share one code index - The existing global search box searches all five languages through the same hybrid FTS5 + vector KNN index; no separate language mode is required
- Tracked generated/vendor/minified files are filtered out centrally (
node_modules/,vendor/,dist/,build/,.next/,coverage/, and*.min.js), so production paths stay language-neutral
✅ System Theme Support
- Dark theme (default, via
AKAR_THEME_DARK) - Theme-aware colors for all components
# From the daftprompt directory
cargo run- Zoom: Mouse wheel
- Pan: Middle mouse button OR Cmd/Ctrl + left mouse button
- Select Card: Left click on card
- Select Folder: Left click on folder icon in drawer
- Open Unified Search: Cmd+K (Mac) or Ctrl+K (Windows/Linux) — searches git log, code, and documents
- Close Search: Escape key
- Deselect All: Escape key (when search is closed)
daftprompt/
├── Cargo.toml # workspace root + main binary
├── src/
│ ├── main.rs # entry point, CLI args, event loop, screenshot flow
│ ├── state.rs # application state (CanvasState, AppState)
│ ├── git_log.rs # git commit reader (gitoxide)
│ └── ui/
│ ├── mod.rs # module tree (container, render)
│ ├── adapter.rs # stable card key hashing
│ ├── container.rs # data model (Container, CardData, DocumentData, ContainerType)
│ └── render.rs # immediate-mode render functions (canvas, drawer, search, containers)
├── crates/
│ └── daftprompt-indexer/
│ ├── Cargo.toml
│ └── src/
│ ├── lib.rs # Indexer public API (commits, code, documents, unified search)
│ ├── db.rs # SQLite schema, FTS5, vec0, queries
│ ├── embed.rs # model2vec-rs wrapper
│ ├── code.rs # language registry/router + shared Rust/TypeScript/TSX/JavaScript/JSX query constants
│ ├── documents.rs # document discovery, chunking, incremental indexing
│ └── schema.sql # SQL schema definition
└── epics/ # feature epic specifications
- akar-core / akar-layout / akar-components / akar-winit — path deps at
~/Projects/akar/crates/akar-*. Owns the wgpu pipeline, taffy layout, components, and winit event routing. - wgpu (v29.0.0) — GPU rendering (still a direct dep; akar builds on it)
- winit (v0.30.12) — Windowing and input handling (still a direct dep;
akar-winitaugments it) - glam — Mathematics library for transforms
- pollster — Async runtime
- gix (gitoxide) — Git repository access (path dep)
- daftprompt-indexer — in-workspace indexer crate (FTS5 + sqlite-vec + model2vec-rs)
- tree-sitter / tree-sitter-rust / tree-sitter-typescript / tree-sitter-javascript — tree-sitter parsing pipelines for Rust (
.rs), TypeScript (.ts), TSX (.tsx), and JavaScript/JSX (.js/.jsx); tree-sitter-javascript shares one grammar across JS and JSX (Epics 004, 009, 010) - png — PNG encoding for
--screenshotoutput - clap — CLI argument parsing
- anyhow / serde_json — error handling and serialization
The previous "Next Steps" list (real-data integration, document parsing, file watching) is now done by Epic 002 (git log column), Epic 003 (commit indexer), Epic 004 (Rust code indexer), Epic 007 (document indexer), Epic 009 (TypeScript and TSX), and Epic 010 (JavaScript and JSX). The remaining genuine follow-ups after Epic 010 are:
- Drag-and-drop card repositioning — Cards are positioned in world space; drag-to-move is a follow-up epic.
- Graph visualization — Relationship mapping between documents/commits on the canvas.
- Context menus — Right-click menus on cards, container headers, and the canvas background.
- Plugin system — Third-party extension points for new container types and search backends.
- Window/canvas state persistence — Restore pan, zoom, and selected folder across sessions.
- Card dragging is not yet implemented (cards are positioned in world space; drag-to-move is a future epic).
- Per-repo indexer DBs are persisted in the OS cache directory (
~/Library/Caches/daftprompt/{slug}.dbon macOS), but window state and canvas pan/zoom are not. akar-winitdoes not expose Cmd/Ctrl modifier state; modifier tracking is done manually inAppStatevia aWindowEvent::ModifiersChangedarm.
# Check for compilation errors
cargo check --workspace
# Run with debug logging
RUST_LOG=debug cargo run
# Capture one frame to PNG (visual regression)
cargo run --release -- --screenshot /tmp/daftprompt.png --exit
# Run tests
cargo test --workspaceThis project is a prototype and is not yet licensed for distribution.