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 countsGET /api/graph- Full SourceCodeGraph JSONGET /api/graph/nodes- Nodes onlyGET /api/graph/edges- Edges onlyGET /api/graph/metadata- Graph metadataGET /api/git/changes- Current git change snapshotGET /api/ws- WebSocket for real-time updates
Structs§
- ApiState
- Shared application state for the API.
Enums§
- WsClient
Message - WebSocket message sent from client to server.
- WsServer
Message - 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.