Crate vibe_graph_api

Crate vibe_graph_api 

Source
Expand description

REST + WebSocket API service for Vibe-Graph.

This crate provides a clean API layer that can be consumed by any frontend. It separates data serving from visualization concerns.

§Endpoints

  • GET /api/health - Health check with node/edge counts
  • GET /api/graph - Full SourceCodeGraph JSON
  • GET /api/graph/nodes - Nodes only
  • GET /api/graph/edges - Edges only
  • GET /api/graph/metadata - Graph metadata
  • GET /api/git/changes - Current git change snapshot
  • GET /api/ws - WebSocket for real-time updates

Structs§

ApiState
Shared application state for the API.

Enums§

WsClientMessage
WebSocket message sent from client to server.
WsServerMessage
WebSocket message sent from server to client.

Functions§

create_api_router
Create the API router with all endpoints.
create_api_state
Create a new API state with the given graph.
create_api_state_with_changes
Create a new API state with the given graph and git changes.