Knowledge Base updated: 2026-11-19
Memos knowledge base
Memos is a self-hosted, Go-backed note system with a React web client. The server exposes protobuf-defined APIs alongside frontend, file, RSS, and MCP delivery routes.
Persistent state is managed through the store abstraction and database migrations; attachments use pluggable object storage. Memo content, access control, spaces, identities, and configuration are shared concerns across API, server, and web layers.
The web client provides memo workflows, settings and administration, and specialized calendar and map views. Deployment behavior is controlled through server configuration, containers, migrations, and declarative configuration flows.
flowchart LR
Browser[React web client] --> Server[Go server runtime]
Server --> API[Connect / protobuf APIs]
Server --> Web[Static frontend delivery]
Server --> Files[Attachment file delivery]
Server --> Alt[MCP and RSS endpoints]
API --> Auth[Identity and access control]
API --> Memo[Memo lifecycle]
API --> Store[Store abstraction]
Memo --> Content[Markdown and payload processing]
Memo --> Spaces[Spaces and membership]
Store --> DB[(SQLite / MySQL / PostgreSQL)]
Store --> Object[Object storage]
Server --> Config[Runtime and declarative configuration]
Config --> Ops[Deployment and operations]
Browser --> API
Glossary
- Memo: the primary persisted note record, with content, visibility, relations, and associated resources.
- Space: a hierarchical organizational scope with membership and memo behavior.
- Memo view: a saved or configured memo-selection view exposed through user-facing APIs and pages.
- Payload: derived memo content detected and refreshed by the payload-processing flow.
- Declarative configuration: versioned instance-resource configuration that is planned, validated, and applied with persisted state.
Codebase-wide invariants
- API contract changes originate in proto/…/*.proto; generated bindings under
proto/gen/api/**must remain consistent with them. - Server handlers enforce request identity and authorization before operating on persisted resources; see
server/api/**and authorization middleware patterns. - Persistent model changes require compatible store, driver, and migration handling; see
store/**and migration files understore/db/**. - Web product flows consume the server API rather than directly accessing persistence; see
web/src/**andserver/api/**. - Attachment metadata and bytes are distinct concerns: attachment records are persisted through the store while bytes are handled through storage drivers; see
store/**andserver/**/storage/**patterns.
Routing table
- server/…/*.go -> Server runtime and request routing
server/router/**-> Server runtime and request routing- server/…/connect_services.go -> Server runtime and request routing
- proto/…/*.proto -> API contracts and service implementation
proto/gen/api/**-> API contracts and service implementation- server/…/*service*.go -> API contracts and service implementation
server/mcp/**-> MCP, RSS, and file delivery endpointsserver/rss/**-> MCP, RSS, and file delivery endpointsserver/file/**-> MCP, RSS, and file delivery endpoints- server/…/memo*.go -> Memo lifecycle and collaboration
- store/memo*.go -> Memo lifecycle and collaboration
- server/…/memo_filter*.go -> Memo query filtering
- store/memo_filter*.go -> Memo query filtering
server/common/markdown/**-> Markdown content processingweb/src/components/MemoContent/**-> Markdown content processingserver/runner/payload/**-> Memo payload processing- server/…/memo_payload*.go -> Memo payload processing
- server/…/space*.go -> Space management and membership
- store/space*.go -> Space management and membership
- web/…/Space*.tsx -> Space management and membership
- server/…/memo_export*.go -> Memo export and import
- server/…/memo_import*.go -> Memo export and import
web/src/components/MemoEditor/**/Drawing*-> Drawing attachmentsweb/src/components/MemoContent/**/Drawing*-> Drawing attachmentsserver/auth/**-> Identity, authentication, and access control- server/…/auth*.go -> Identity, authentication, and access control
server/auth/idp/**-> Identity provider integration- server/…/idp*.go -> Identity provider integration
- server/…/usage_limit*.go -> Usage limits and quotas
- web/…/UsageLimitsSection.tsx -> Usage limits and quotas
- store/…/*.go -> Persistence and data evolution
store/db/**-> Persistence and data evolutionserver/storage/**-> Attachment and object storage- store/attachment*.go -> Attachment and object storage
- web/…/App.tsx -> Web application experience
- web/…/MemoViews.tsx -> Web application experience
web/src/contexts/**-> Web application experienceweb/src/components/MemoEditor/**-> Memo authoring and browsing UIweb/src/components/Memo/**-> Memo authoring and browsing UIweb/src/components/Settings/**-> Web settings and account management- web/…/Settings*.tsx -> Web settings and account management
- web/…/Calendar*.tsx -> Calendar and temporal memo views
web/src/components/Calendar/**-> Calendar and temporal memo views- web/…/Map*.tsx -> Map-based memo exploration
web/src/components/Map/**-> Map-based memo explorationserver/webhook/**-> Automation and integrationsserver/runner/**-> Automation and integrationsserver/profile/**-> Deployment, configuration, and operationsDockerfile-> Deployment, configuration, and operationsscripts/**-> Deployment, configuration, and operationsstore/db/migration/**-> Database provisioning and migrationsstore/db/{sqlite,mysql,postgres}/**-> Database provisioning and migrations- server/…/config*.go -> Declarative configuration management
- store/config*.go -> Declarative configuration management