Development Documentation (main branch) - For stable release docs, see docs.rs/eidetica

Module user

Module user 

Source
Expand description

User system for Eidetica.

Provides multi-user account management with per-user key storage, database tracking, and sync preferences.

§Architecture

  • Instance: Manages infrastructure (user accounts, system databases, backends)
  • User: Handles contextual operations (database access, key management) via sessions

Each user has a private database (user:<username>) storing:

  • keys: Encrypted Ed25519 keypairs with per-database SigKey mappings
  • databases: Tracked databases with sync preferences
  • settings: User configuration

§Key Management

Keys are Ed25519 keypairs, encrypted at rest using the user’s password (Argon2id). Each key can authenticate with multiple databases via SigKey mappings, which are auto-discovered when tracking a database.

§Sync Settings

Per-database sync preferences (types::SyncSettings):

  • sync_enabled: Master switch
  • sync_on_commit: Trigger sync on each commit
  • interval_seconds: Periodic sync interval

When multiple users track the same database, settings are merged to use the most aggressive settings.

Re-exports§

pub use errors::UserError;
pub use key_manager::UserKeyManager;
pub use session::User;
pub use types::*;

Modules§

crypto
Cryptographic functions for user system
errors
Error types for the user system
key_manager
User key manager for session-based key management
session
User session management
system_databases
System database initialization for the user system
types
Core data types for the user system