Skip to main content

Crate nexus_memory_web

Crate nexus_memory_web 

Source
Expand description

Nexus Web Dashboard - Axum-based web interface for Nexus Memory System

This crate provides:

  • REST API endpoints for memory CRUD operations
  • WebSocket real-time updates
  • Static file serving for the dashboard UI
  • CORS and security middleware

§Example

use nexus_memory_web::WebDashboard;
use std::sync::Arc;
use tokio::sync::RwLock;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let dashboard = WebDashboard::new(manager).await?;
    let addr = SocketAddr::from(([0, 0, 0, 0], 8768));
    dashboard.serve(addr).await?;
    Ok(())
}

Re-exports§

pub use error::Result;
pub use error::WebError;
pub use state::AppState;
pub use models::*;

Modules§

api
REST API endpoints for the web dashboard
error
Error types for the web dashboard
models
Request and response models for the web dashboard API
state
Application state for the web dashboard
websocket
WebSocket handler for real-time updates

Structs§

WebDashboard
Web Dashboard for Nexus Memory System

Functions§

create_dashboard
Create a new web dashboard with the given storage and orchestrator
run_default
Run the web dashboard on the default port (8768)