Service designed to manage user-centric data within the Elephant ecosystem. It handles communication channels like inbox messages and system notifications, as well as persistent user configurations through structured settings and simple properties.
- Inbox Messages: Store and retrieve user-specific documents intended for an inbox.
- System Messages: A secondary channel for system-level notifications and events.
- Settings Management:
- Documents: Structured configurations validated against schemas using the
revisorlib. - Properties: Lightweight key-value pairs for simple user preferences.
- Event Log: A unified log of changes to documents and properties, supporting long-polling for efficient client synchronization.
- Documents: Structured configurations validated against schemas using the
The service implements a multi-tier access model based on JWT claims for documents:
- Private: Documents and properties owned by the user (
subclaim). - Shared: Documents can be owned by an Organization (
orgclaim) or a Unit (unitsclaim), allowing shared access within those groups. - Permissions:
- Standard users can read and write their own data and read shared data.
- Users with the
doc_adminscope can manage shared data across their organization and units.
Setting documents are validated against revisor constraint sets embedded in the binary from internal/schema_*.json:
internal/schema_messages.json— constraints for inbox message payloads.internal/schema_settings.json— constraints for setting documents.
Adding a new setting type today requires editing schema_settings.json and rebuilding the service. The plan is to support dynamic settings schema registration through the user API so that schemas can be added at runtime without redeploying.