Skip to main content

mentedb_server/
lib.rs

1//! MenteDB Server: REST API, gRPC, WebSocket, and auth layer.
2//!
3//! This crate implements the network facing server for MenteDB:
4//!
5//! - [`auth`]: JWT token creation, validation, and middleware
6//! - [`extraction_queue`]: Background extraction queue with bounded concurrency
7//! - [`handlers`]: Axum request handlers for memory CRUD and search
8//! - [`routes`]: Router construction with middleware stack
9//! - [`state`]: Shared application state (database handle, config)
10//! - [`websocket`]: Real time memory event streaming
11//! - [`grpc`]: Protocol Buffers based memory and cognition services
12//! - [`rate_limit`]: Token bucket rate limiter
13//! - [`error`]: Unified API error type with HTTP status mapping
14
15/// JWT authentication and authorization.
16pub mod auth;
17pub mod cluster;
18/// Bundled management console served at /console.
19pub mod console;
20/// Named per-tenant databases.
21pub mod databases;
22/// Unified API error type.
23pub mod error;
24/// Background extraction queue with bounded concurrency.
25pub mod extraction_queue;
26/// gRPC service implementations for memory and cognition.
27pub mod grpc;
28/// HTTP request handlers for the REST API.
29pub mod handlers;
30/// Memory feature endpoints.
31pub mod handlers_memory;
32/// Operations endpoints.
33pub mod handlers_ops;
34/// Hosting endpoints and middleware: paged lists, in place updates, scoped
35/// drops, batch search, deadlines and the enrichment pool.
36pub mod hosting;
37/// Rule based maintenance sweep (consolidate, decay, archive).
38pub mod maintenance;
39pub mod metrics;
40/// Token bucket rate limiting middleware.
41pub mod rate_limit;
42/// Axum router construction.
43pub mod routes;
44/// Shared application state.
45pub mod state;
46/// WebSocket handler for real time event streaming.
47pub mod websocket;