Database Schema
Ideon supports both PostgreSQL (production) and SQLite (development). The schema is managed via Kysely migrations and is compatible with both dialects.
Core Tables
users
Stores user accounts.
id: UUID (Primary Key)email: Unique email addressusername: Unique usernamepasswordHash: Argon2 hash (nullable for SSO users)role: 'superadmin' | 'admin' | 'member'displayName,avatarUrl,color: Profile info
projects
Stores project metadata.
id: UUIDname: Project namedescription: Optional descriptionownerId: Referencesusers.idcurrentStateId: References the currenttemporalState
blocks
Stores the visual elements on the canvas.
id: UUIDprojectId: Referencesprojects.idblockType: 'text', 'link', 'core', 'snippet', 'github', 'file', 'palette', 'contact', 'video', 'checklist'content: Primary text contentdata: JSON blob for block-specific data (e.g.,isLocked,ownerId, specific properties)positionX,positionY,width,height: Spatial coordinates
links
Stores connections between blocks.
id: UUIDsource: ID of source blocktarget: ID of target blocksourceHandle,targetHandle: Specific connection points
temporalStates
Stores the history/snapshots of projects (Versioning).
id: UUIDprojectId: Referencesprojects.idintent: Description of the change (commit message)diff: JSON patch or full snapshot of changesisSnapshot: Boolean (major version vs incremental)authorId: Referencesusers.id
projectCollaborators
Manages project access.
projectId: Referencesprojects.iduserId: Referencesusers.idrole: 'editor' (default)
systemSettings
Global instance configuration.
installed: Installation status flagpublicRegistrationEnabled: Boolean (0 or 1)authProvidersJson: Configuration for enabled SSO providers
auditLogs
Security and activity logging.
id: UUIDuserId: Actoraction: Event type (e.g., 'login', 'project_create')ipAddress: Request originstatus: 'success' | 'failure'
githubRepoStats
Cache for GitHub repository data to reduce API calls.
url: Repo URLdata: Cached JSON stats (stars, forks, etc.)fetchedAt: Timestamp