Service map (high level)
The canonical service list and responsibilities live in the monorepo docs; this page is the reader-friendly map.| Service | Responsibility (summary) | Primary stack | Code location |
|---|---|---|---|
| API | REST/HTTP gateway for documents, workspaces, AI features; publishes events | Go (Fiber) | domain/api |
| Relay | WebSocket real-time collaboration; OT + presence; event-driven sync | Rust (Axum) | domain/relay |
| Shield | Authentication/authorization, user management, admin | Python (Django) | domain/shield |
| Manuscript | Schema/spec “single truth” (events, envelope) | Proto / schema tooling | domain/manuscript + shared/proto |
| Printery | Event consumer hub (planned) | Go | domain/printery |
Data flow patterns
1) Request/response (HTTP)
Typical workflow:- A client calls the API over HTTP.
- Authorization is enforced using the system’s auth model (see Shield responsibilities).
- The API persists domain state (e.g., document/workspace changes).
- The API publishes a cross-service event to Redis Streams when the change matters outside the service boundary.
2) Real-time collaboration (WebSocket)
Typical workflow:- Clients connect to Relay via WebSocket.
- Concurrent edits are coordinated using an operational transform approach.
- Presence (cursor/selection) updates are streamed to connected clients.
- Collaboration actions that must be reflected system-wide are published as events.
3) Event-driven synchronization
Events are the primary mechanism for keeping services in sync without tight coupling.- Transport: Redis Streams
- Schemas: Protocol Buffers (polyglot-safe)
Canonical specifications
OpenAPI
The API reference for REST is generated from the OpenAPI spec published into this docs site:/openapi/openapi.json
Event schemas (protobuf)
Event schemas (protobuf)
This snippet is generated from the canonical protobuf files inshared/proto. It is intended to be embedded into event reference pages to prevent drift.
Sources
shared/proto/base_event.proto(sha256:c26c3f9ec333)shared/proto/chat_events.proto(sha256:6a277e157626)shared/proto/collaboration_events.proto(sha256:26a3a9127ac2)shared/proto/comment_events.proto(sha256:e98088c38431)shared/proto/document_events.proto(sha256:acd296c95513)shared/proto/unified_document_events.proto(sha256:b7a2d3f938ed)shared/proto/user_events.proto(sha256:7d83b27678ca)shared/proto/version_events.proto(sha256:256064645825)shared/proto/workspace_events.proto(sha256:6016f8208ee0)
Message index
| File | Messages |
|---|---|
shared/proto/base_event.proto | BaseEvent |
shared/proto/chat_events.proto | ConversationCreatedEvent, ConversationUpdatedEvent, ConversationDeletedEvent, ConversationArchivedEvent, MessageSentEvent, MessageStreamStartedEvent, MessageStreamChunkEvent, MessageStreamCompletedEvent, MessageStreamErrorEvent, MessageRegeneratedEvent, MessageEditedEvent, MessageDeletedEvent, MessageFeedbackEvent, TypingIndicatorEvent, AIProcessingEvent, ContextAttachedEvent, ContextDetachedEvent, ContextAttachment, TextRange, TokenUsage, AIConfiguration |
shared/proto/collaboration_events.proto | OperationAppliedEvent, PresenceUpdateEvent, CursorMovedEvent, DocumentLockedEvent, DocumentUnlockedEvent, ConflictDetectedEvent, VectorClock, CursorPosition, SelectionRange, ViewportInfo |
shared/proto/comment_events.proto | CommentCreatedEvent, CommentUpdatedEvent, CommentDeletedEvent, CommentResolvedEvent, CommentReactionAddedEvent, CommentReactionRemovedEvent, CommentReplyAddedEvent, CommentThreadUpdatedEvent, CommentPosition, CommentBatchEvent |
shared/proto/document_events.proto | DocumentCreatedEvent, DocumentUpdatedEvent, DocumentDeletedEvent, DocumentSharedEvent, DocumentAccessRevokedEvent, DocumentExportedEvent, ShareRecipient |
shared/proto/unified_document_events.proto | UnifiedDocumentCreatedEvent, UnifiedDocumentConvertedEvent, ViewUpdatedEvent, ViewContentSyncEvent, ViewLayoutChangedEvent, EnabledViewsChangedEvent, VariableCreatedEvent, VariableUpdatedEvent, VariableDeletedEvent, VariableReferencedEvent, CrossViewSyncEvent, SharedVariable, VariableSource |
shared/proto/user_events.proto | UserCreatedEvent, UserUpdatedEvent, UserDeletedEvent, UserSuspendedEvent, UserReactivatedEvent, PermissionsChangedEvent, PasswordChangedEvent, EmailVerifiedEvent, LoginEvent, LogoutEvent |
shared/proto/version_events.proto | VersionCreatedEvent, VersionRestoredEvent, VersionComparedEvent, VersionHistoryAccessedEvent, VersionSnapshotCreatedEvent, VersionPrunedEvent, DiffStats, VersionBatchEvent |
shared/proto/workspace_events.proto | WorkspaceCreatedEvent, WorkspaceUpdatedEvent, WorkspaceDeletedEvent, MemberAddedEvent, MemberRemovedEvent, MemberRoleChangedEvent, WorkspaceInvitationSentEvent, WorkspaceInvitationAcceptedEvent, WorkspaceSubscriptionChangedEvent, WorkspaceSettings |