Codebase Guide
Workspace layout
Memorose is a Cargo workspace with four crates plus a Next.js dashboard:Crate dependency graph
Crate responsibilities
memorose-common
Shared foundations used by the rest of the workspace:- core types such as
Event,EventContent,MemoryUnit,GraphEdge, andL3Task - runtime config loading in
src/config.rs - serialization helpers and shared enums
memorose-core
Business logic and storage orchestration:Storage backends
All undermemorose-core/src/storage/:
memorose-server
The HTTP layer:main.rs: route definitions and server bootstraptypes.rs: request / response payload typesshard_manager.rs: shard routing and cluster coordination helpersdashboard/: auth and handler modules backing dashboard and management endpoints
memorose-gateway
The stateless routing layer used in some deployments:- maps requests to backend nodes by shard
- reads gateway-specific env vars such as
SHARD_COUNT - does not own persistent state
Dashboard frontend
Thedashboard/ app currently contains:
Useful patterns
Dashboard cache
Dashboard API responses are cached withstate.dashboard_cache.
Bitemporal and scoped retrieval
Retrieval supports valid-time, transaction-time,org_id, and agent_id inputs through the server request payloads.
Route truth
When in doubt, treat these as the primary references:crates/memorose-server/src/main.rscrates/memorose-server/src/types.rscrates/memorose-common/src/config.rs

