diff --git a/crates/tui/README.md b/crates/tui/README.md new file mode 100644 index 0000000..39ac88b --- /dev/null +++ b/crates/tui/README.md @@ -0,0 +1,35 @@ +# VortexDB TUI + +A terminal user interface for managing VortexDB databases locally. + +## Important Note + +> **This is currently a local admin/development tool**, not a network client. The TUI operates directly on database files using embedded storage — it does not connect to a running VortexDB server. This will change once the server gets the multiple-database support. +> +> For remote server access, use the [Python client](../../client/python/). + +## Usage + +```bash +cargo run -p tui +``` + +Databases are stored in `./databases/` by default. + +### Environment Variables + +For embedding features, set these in your `.env` file or environment: + +```bash +TEXT_EMBEDDING_URL=http://localhost:8000/embed/text +IMAGE_EMBEDDING_URL=http://localhost:8000/embed/image +``` + +These point to an external embedding service that generates vectors from text/images. + +## Roadmap + +This TUI will evolve into a full client that connects to VortexDB servers over gRPC. Planned changes: + +- Add remote connection mode via gRPC (like the Python client) +- Move to `client/tui/` once server multi-database support lands diff --git a/crates/tui/src/ui/components.rs b/crates/tui/src/ui/components.rs index 4fffc6f..3cd5e7c 100644 --- a/crates/tui/src/ui/components.rs +++ b/crates/tui/src/ui/components.rs @@ -17,7 +17,7 @@ impl PageTitle { .block( Block::default() .borders(Borders::ALL) - .title("Vector DB") + .title("VortexDB") .title_alignment(Alignment::Center) .border_style(Style::default().fg(self.color)), ) diff --git a/crates/tui/src/ui/dashboard.rs b/crates/tui/src/ui/dashboard.rs index 71956bc..fc6a705 100644 --- a/crates/tui/src/ui/dashboard.rs +++ b/crates/tui/src/ui/dashboard.rs @@ -21,74 +21,37 @@ pub fn render_dashboard(f: &mut Frame, app: &App) { Line::from(""), Line::from(""), Line::from(vec![Span::styled( - "██╗ ██╗███████╗ ██████╗████████╗ ██████╗ ██████╗ ", + "██╗ ██╗ ██████╗ ██████╗ ████████╗███████╗██╗ ██╗██████╗ ██████╗ ", Style::default() .fg(Color::Cyan) .add_modifier(ratatui::style::Modifier::BOLD), )]), Line::from(vec![Span::styled( - "██║ ██║██╔════╝██╔════╝╚══██╔══╝██╔═══██╗██╔══██╗", + "██║ ██║██╔═══██╗██╔══██╗╚══██╔══╝██╔════╝╚██╗██╔╝██╔══██╗██╔══██╗", Style::default() .fg(Color::Cyan) .add_modifier(ratatui::style::Modifier::BOLD), )]), Line::from(vec![Span::styled( - "██║ ██║█████╗ ██║ ██║ ██║ ██║██████╔╝", + "██║ ██║██║ ██║██████╔╝ ██║ █████╗ ╚███╔╝ ██║ ██║██████╔╝", Style::default() .fg(Color::Cyan) .add_modifier(ratatui::style::Modifier::BOLD), )]), Line::from(vec![Span::styled( - "╚██╗ ██╔╝██╔══╝ ██║ ██║ ██║ ██║██╔══██╗", + "╚██╗ ██╔╝██║ ██║██╔══██╗ ██║ ██╔══╝ ██╔██╗ ██║ ██║██╔══██╗", Style::default() .fg(Color::Cyan) .add_modifier(ratatui::style::Modifier::BOLD), )]), Line::from(vec![Span::styled( - " ╚████╔╝ ███████╗╚██████╗ ██║ ╚██████╔╝██║ ██║", + " ╚████╔╝ ╚██████╔╝██║ ██║ ██║ ███████╗██╔╝ ██╗██████╔╝██████╔╝", Style::default() .fg(Color::Cyan) .add_modifier(ratatui::style::Modifier::BOLD), )]), Line::from(vec![Span::styled( - " ╚═══╝ ╚══════╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝", - Style::default() - .fg(Color::Cyan) - .add_modifier(ratatui::style::Modifier::BOLD), - )]), - Line::from(""), - Line::from(vec![Span::styled( - "██████╗ ██████╗ ", - Style::default() - .fg(Color::Cyan) - .add_modifier(ratatui::style::Modifier::BOLD), - )]), - Line::from(vec![Span::styled( - "██╔══██╗██╔══██╗", - Style::default() - .fg(Color::Cyan) - .add_modifier(ratatui::style::Modifier::BOLD), - )]), - Line::from(vec![Span::styled( - "██║ ██║██████╔╝", - Style::default() - .fg(Color::Cyan) - .add_modifier(ratatui::style::Modifier::BOLD), - )]), - Line::from(vec![Span::styled( - "██║ ██║██╔══██╗", - Style::default() - .fg(Color::Cyan) - .add_modifier(ratatui::style::Modifier::BOLD), - )]), - Line::from(vec![Span::styled( - "██████╔╝██████╔╝", - Style::default() - .fg(Color::Cyan) - .add_modifier(ratatui::style::Modifier::BOLD), - )]), - Line::from(vec![Span::styled( - "╚═════╝ ╚═════╝ ", + " ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═════╝ ╚═════╝ ", Style::default() .fg(Color::Cyan) .add_modifier(ratatui::style::Modifier::BOLD),