Skip to main content

Delegation & Collaboration - Domain Specification

First Introduced: V1.1 Status: Specification Complete Last Updated: 2025-10-25


Overview

Delegation & Collaboration defines how organizations share and co-manage assets across tenant boundaries while maintaining strict ownership isolation and accountability. This domain enables cross-org collaboration without breaking multi-tenancy principles, allowing property management companies, marketplace operators, and service providers to work on behalf of owners while preserving clear data ownership and audit trails.

The domain provides the framework for white-label marketplaces, property management delegation, partner operations, and team-based workflows within organizations.


Responsibilities

This domain IS responsible for:

  • Managing cross-org delegation relationships (grantor → grantee)
  • Defining resource-level access grants and permissions
  • Creating derived membership views for delegated access
  • Tracking collaboration audit trails across org boundaries
  • Managing teams (groups of users within an org)
  • Task assignment and approval workflows
  • Notification generation for collaboration events
  • Enforcing temporal access controls (start/end dates)

This domain is NOT responsible for:

  • Base permission evaluation (→ Authorization domain)
  • User identity and org membership (→ Identity domain)
  • Resource ownership (→ Individual resource domains)
  • Session management (→ Authorization domain)
  • Email/SMS delivery (→ future Communications domain)

Relationships

Depends On:

Depended On By:

Related Domains:


Core Concepts

Entity: Delegation

Purpose: Represents a formal relationship granting one Org or Account controlled access to another Org's resources.

Key Attributes:

  • id (UUID, primary key)
  • grantor_org_id (UUID, foreign key → organizations.id) - Org granting access
  • grantor_account_id (UUID, nullable, foreign key → accounts.id) - Specific account granting access
  • grantee_org_id (UUID, foreign key → organizations.id) - Org receiving access
  • grantee_account_id (UUID, nullable, foreign key → accounts.id) - Specific account receiving access
  • resource_type (ENUM) - space | unit | booking | pricing | calendar | account
  • scope (ENUM) - read | write | manage
  • status (ENUM) - pending | active | revoked | expired
  • start_at (TIMESTAMP) - When delegation becomes effective
  • end_at (TIMESTAMP, nullable) - When delegation expires (NULL = indefinite)
  • created_by (UUID, foreign key → users.id) - User who created delegation
  • approved_by (UUID, nullable, foreign key → users.id) - User who approved delegation
  • approved_at (TIMESTAMP, nullable)
  • revoked_by (UUID, nullable, foreign key → users.id)
  • revoked_at (TIMESTAMP, nullable)
  • contract_ref (VARCHAR, nullable) - External contract/agreement reference
  • notes (TEXT, nullable) - Human-readable context
  • settings (JSONB) - Additional configuration
  • created_at, updated_at (timestamps)

Relationships:

  • Delegation → Org (grantor) (*, many-to-one)
  • Delegation → Org (grantee) (*, many-to-one)
  • Delegation → Account (optional, both sides)
  • Delegation → ResourceReference (1:*, one-to-many)
  • Delegation → CollaborationLog (1:*)
  • Delegation → DelegatedMembership (1:*)

Lifecycle:

  • Created: Manually via admin UI or API with status='pending'
  • Approved: Status changes to active when approved (if approval required)
  • Active: Effective delegation granting access between start/end dates
  • Revoked: Manually revoked before expiration, revoked_at set
  • Expired: Automatically expires when end_at reached
  • Archived: Soft delete via status change (never hard deleted for audit)

Business Rules:

  • Grantor and grantee must be different orgs
  • Delegation becomes active only when status='active' AND current time between start_at and end_at
  • Scope hierarchy: read < write < manage
  • Cannot delegate resources you don't own or manage
  • Revocation cascades to all DelegatedMemberships and ResourceReferences
  • All delegation state changes must be audited

Entity: ResourceReference

Purpose: Links a Delegation to specific resources (e.g., particular Space IDs, Booking IDs) enabling granular access control.

Key Attributes:

  • id (UUID, primary key)
  • delegation_id (UUID, foreign key → delegations.id)
  • resource_type (ENUM) - space | unit | booking | pricing_rule | calendar
  • resource_id (UUID) - ID of the actual resource (polymorphic)
  • permissions (JSONB) - Override or refine delegation scope per resource
  • metadata (JSONB) - Resource-specific context
  • created_at, updated_at (timestamps)

Relationships:

  • ResourceReference → Delegation (*, many-to-one)
  • ResourceReference → [Various Resources] (polymorphic reference)

Lifecycle:

  • Created: When delegation created with specific resource list
  • Updated: When resources added/removed from delegation
  • Deleted: When delegation revoked or resource no longer exists

Business Rules:

  • resource_type must match delegation.resource_type or be a subtype
  • resource_id must exist in the target domain
  • resource_id must belong to grantor_org_id
  • Duplicate resource references not allowed within same delegation
  • Deletion cascades when delegation revoked

Entity: DelegatedMembership

Purpose: Temporary, derived membership view that grants cross-org users local actor permissions within the context of an active Delegation.

Key Attributes:

  • id (UUID, primary key)
  • delegation_id (UUID, foreign key → delegations.id)
  • user_id (UUID, foreign key → users.id) - User from grantee org
  • origin_org_id (UUID, foreign key → organizations.id) - User's home org
  • effective_org_id (UUID, foreign key → organizations.id) - Target org (grantor)
  • effective_account_id (UUID, nullable, foreign key → accounts.id) - Target account
  • derived_role_key (VARCHAR) - Role granted via delegation (manager, viewer, etc.)
  • expires_at (TIMESTAMP) - Matches delegation.end_at
  • created_at (timestamp)

Relationships:

  • DelegatedMembership → Delegation (*, many-to-one)
  • DelegatedMembership → User (*, many-to-one)
  • DelegatedMembership → Org (effective) (*, many-to-one)

Lifecycle:

  • Created: Dynamically generated when delegation becomes active and user from grantee org accesses resource
  • Resolved: At authorization check time from active delegations
  • Expired: Auto-expires when delegation expires or is revoked
  • Deleted: Cascades when delegation revoked

Business Rules:

  • Only created for users with active Membership in grantee_org_id
  • derived_role_key determined by delegation.scope (read→viewer, write→editor, manage→manager)
  • Cannot grant higher permissions than delegation.scope
  • Treated as temporary membership overlay in authorization checks
  • Must be revalidated on each request (cached with TTL)

Entity: Team

Purpose: Groups of users within an organization for collaborative work assignment and permission management.

Key Attributes:

  • id (UUID, primary key)
  • org_id (UUID, foreign key → organizations.id)
  • account_id (UUID, nullable, foreign key → accounts.id) - If account-scoped
  • name (VARCHAR, required) - Display name
  • description (TEXT, nullable)
  • type (ENUM) - operations | sales | support | management | custom
  • status (ENUM) - active | suspended | archived
  • created_by (UUID, foreign key → users.id)
  • settings (JSONB) - Team configuration
  • created_at, updated_at (timestamps)

Relationships:

  • Team → Org (*, many-to-one)
  • Team → Account (*, many-to-one, optional)
  • Team → TeamMembership (1:*)
  • Team → Task (1:*)

Lifecycle:

  • Created: By admin or manager with team creation permission
  • Updated: Name, description, settings modified
  • Archived: Soft delete via status='archived'

Business Rules:

  • Team name must be unique within org
  • Org-wide teams have account_id=NULL
  • Account-scoped teams limited to that account's resources
  • Cannot delete team with active tasks
  • At least one team member must have admin role

Entity: TeamMembership

Purpose: Links users to teams with specific roles within the team context.

Key Attributes:

  • id (UUID, primary key)
  • team_id (UUID, foreign key → teams.id)
  • user_id (UUID, foreign key → users.id)
  • role (ENUM) - admin | member | viewer
  • status (ENUM) - active | suspended
  • added_by (UUID, foreign key → users.id)
  • added_at (TIMESTAMP)
  • removed_at (TIMESTAMP, nullable)
  • created_at, updated_at (timestamps)

Relationships:

  • TeamMembership → Team (*, many-to-one)
  • TeamMembership → User (*, many-to-one)

Lifecycle:

  • Created: When user added to team
  • Updated: Role changes
  • Removed: Set removed_at timestamp

Business Rules:

  • User must have active Membership in team's org
  • Cannot have duplicate active TeamMemberships (same user, team)
  • Removing last admin requires reassigning admin role first
  • Team membership grants task assignment eligibility

Entity: Task

Purpose: Represents work assignments within teams requiring completion and optional approval.

Key Attributes:

  • id (UUID, primary key)
  • org_id (UUID, foreign key → organizations.id)
  • account_id (UUID, nullable, foreign key → accounts.id)
  • team_id (UUID, nullable, foreign key → teams.id)
  • title (VARCHAR, required)
  • description (TEXT, nullable)
  • type (ENUM) - approval | review | maintenance | operations | custom
  • priority (ENUM) - low | normal | high | urgent
  • status (ENUM) - pending | in_progress | completed | cancelled | rejected
  • assigned_to (UUID, nullable, foreign key → users.id)
  • assigned_by (UUID, foreign key → users.id)
  • resource_type (VARCHAR, nullable) - Entity type this task relates to
  • resource_id (UUID, nullable) - Specific resource ID
  • requires_approval (BOOLEAN, default false)
  • approved_by (UUID, nullable, foreign key → users.id)
  • approved_at (TIMESTAMP, nullable)
  • rejection_reason (TEXT, nullable)
  • due_at (TIMESTAMP, nullable)
  • completed_at (TIMESTAMP, nullable)
  • metadata (JSONB) - Task-specific data
  • created_at, updated_at (timestamps)

Relationships:

  • Task → Org (*, many-to-one)
  • Task → Account (*, many-to-one, optional)
  • Task → Team (*, many-to-one, optional)
  • Task → User (assigned_to) (*, many-to-one)
  • Task → User (assigned_by) (*, many-to-one)
  • Task → Notification (1:*)

Lifecycle:

  • Created: When task assigned manually or auto-generated by workflow
  • Assigned: Assigned to specific user or team
  • In Progress: User begins work
  • Completed: Work finished, awaiting approval if required
  • Approved/Rejected: If requires_approval=true, final state determined
  • Cancelled: Task no longer needed

Business Rules:

  • assigned_to must be member of team_id if team specified
  • Cannot complete task if requires_approval without approval
  • Tasks must belong to same org as assigned user
  • Due dates generate notifications at configurable thresholds
  • Status transitions: pending → in_progress → completed → approved/rejected
  • Cannot reopen completed tasks (create new task instead)

Entity: Notification

Purpose: Generates alerts and messages for collaboration events, task assignments, and delegation changes.

Key Attributes:

  • id (UUID, primary key)
  • org_id (UUID, foreign key → organizations.id)
  • user_id (UUID, foreign key → users.id) - Recipient
  • type (ENUM) - delegation_created | delegation_revoked | task_assigned | task_due | task_completed | approval_required
  • title (VARCHAR, required)
  • message (TEXT)
  • priority (ENUM) - low | normal | high | urgent
  • status (ENUM) - pending | sent | read | dismissed
  • related_entity_type (VARCHAR, nullable) - delegation | task | team
  • related_entity_id (UUID, nullable)
  • action_url (TEXT, nullable) - Deep link to relevant UI
  • send_email (BOOLEAN, default false)
  • send_push (BOOLEAN, default false)
  • sent_at (TIMESTAMP, nullable)
  • read_at (TIMESTAMP, nullable)
  • dismissed_at (TIMESTAMP, nullable)
  • metadata (JSONB)
  • created_at, updated_at (timestamps)

Relationships:

  • Notification → Org (*, many-to-one)
  • Notification → User (*, many-to-one)
  • Notification → [Related Entities] (polymorphic)

Lifecycle:

  • Created: Auto-generated by system events or manually created
  • Sent: Delivered via in-app, email, or push notification
  • Read: User views notification
  • Dismissed: User dismisses notification

Business Rules:

  • Notifications created for: delegation changes, task assignments, approaching due dates, approval requests
  • Cannot send notifications to suspended users
  • Notifications auto-expire after 30 days if not read
  • High/urgent priority bypass user notification preferences
  • Email sending deferred to future Communications domain

Entity: CollaborationLog

Purpose: Immutable audit trail recording all cross-org actions and delegation-related events for transparency and compliance.

Key Attributes:

  • id (UUID, primary key)
  • delegation_id (UUID, nullable, foreign key → delegations.id)
  • grantor_org_id (UUID, foreign key → organizations.id)
  • grantee_org_id (UUID, foreign key → organizations.id)
  • user_id (UUID, foreign key → users.id) - Actor performing action
  • action (ENUM) - delegation_created | delegation_approved | delegation_revoked | resource_accessed | resource_modified | permission_checked
  • resource_type (VARCHAR, nullable)
  • resource_id (UUID, nullable)
  • result (ENUM) - success | failure | denied
  • ip_address (INET, nullable)
  • user_agent (TEXT, nullable)
  • request_id (UUID, nullable) - For distributed tracing
  • details (JSONB) - Context, state changes, metadata
  • timestamp (TIMESTAMP, required, default NOW())

Relationships:

  • CollaborationLog → Delegation (*, many-to-one, optional)
  • CollaborationLog → Org (grantor) (*, many-to-one)
  • CollaborationLog → Org (grantee) (*, many-to-one)
  • CollaborationLog → User (*, many-to-one)

Lifecycle:

  • Created: Append-only on every delegation event or cross-org action
  • Immutable: Never updated or deleted
  • Archived: Moved to cold storage after retention period (7+ years)

Business Rules:

  • All delegation lifecycle events must be logged (create, approve, revoke, expire)
  • All resource access via delegation must be logged
  • Logs partitioned by timestamp for efficient querying
  • Grantor and grantee orgs can both query their respective logs
  • Logs must include enough context to reconstruct permission decisions
  • Failed permission checks logged for security monitoring

Workflows

Workflow: Create Delegation

Use Case: Owner org wants to delegate property management to TVL Ops.

  1. Admin from grantor org initiates delegation

    • Selects grantee org (TVL Ops)
    • Specifies resource_type (space) and scope (manage)
    • Optionally sets start_at, end_at dates
    • Adds contract_ref and notes
  2. Select specific resources

    • Choose which Spaces to delegate
    • System creates ResourceReference records for each
  3. Create delegation record

    • Insert Delegation with status='pending' (if approval required) or status='active'
    • Log event in CollaborationLog
  4. Approval workflow (if required)

    • Notify grantor admin for confirmation
    • Create Task with type='approval', requires_approval=true
    • Admin reviews and approves/rejects
    • On approval: Update delegation to status='active', set approved_by/approved_at
  5. Generate DelegatedMemberships

    • For each user in grantee org with appropriate role
    • Create derived membership with effective_org_id = grantor org
  6. Notify stakeholders

    • Create Notifications for grantor and grantee admins
    • Log delegation_created event

Postconditions:

  • Grantee org users can access specified resources
  • All access logged in CollaborationLog
  • Delegation visible in both orgs' delegation lists

Workflow: Access Delegated Resource

Use Case: TVL Ops user edits delegated villa description.

  1. User from grantee org requests resource

    • User from TVL Ops attempts to edit Space owned by Owner Org
    • Request includes org context, user identity, resource ID
  2. Authorization check

    • Check standard Memberships first (fails - user not in Owner Org)
    • Query active Delegations where grantee_org_id = user's org AND resource in ResourceReferences
    • Find matching Delegation with scope=manage
  3. Resolve DelegatedMembership

    • Generate temporary membership view
    • derived_role_key = 'manager' (from scope=manage)
    • effective_org_id = Owner Org
  4. Permission evaluation

    • Evaluate permission using derived_role_key in grantor org context
    • Check if 'manager' role has 'space:update' permission (yes)
  5. Perform action

    • Allow resource modification
    • Log to CollaborationLog: action=resource_modified, result=success
  6. Return success

    • User sees updated resource
    • Audit trail preserved

Postconditions:

  • Resource modified with proper authorization
  • Action logged with delegation_id reference
  • Both orgs can audit the change

Workflow: Revoke Delegation

Use Case: Owner contract with TVL Ops ends, need to revoke access.

  1. Admin initiates revocation

    • Grantor admin selects active delegation
    • Specifies reason for revocation
  2. Update delegation record

    • Set status='revoked'
    • Set revoked_by=<admin_user_id>, revoked_at=NOW()
    • Add reason to notes
  3. Cascade revocation

    • Mark all DelegatedMemberships as expired immediately
    • Invalidate cached permissions for grantee users
    • Cancel any pending tasks related to delegation
  4. Log revocation

    • Create CollaborationLog entry: action=delegation_revoked, result=success
  5. Notify affected parties

    • Create Notifications for grantee org admins
    • Create Notification for grantor admin (confirmation)
    • Send alerts to users who had delegated access
  6. Return success

    • Delegation shows as revoked in UI
    • Grantee users immediately lose access

Postconditions:

  • All grantee access terminated
  • ResourceReferences preserved for audit (not deleted)
  • Complete audit trail of delegation lifecycle

Workflow: Assign Task to Team

Use Case: Operations manager assigns maintenance task to facilities team.

  1. Manager creates task

    • Selects team (Facilities Team)
    • Sets title, description, type (maintenance)
    • Sets priority and due_at
    • Optionally links to resource (specific Space)
  2. Create task record

    • Insert Task with status='pending'
    • Set assigned_by=<manager_user_id>
    • Leave assigned_to NULL (team-level assignment)
  3. Notify team members

    • Query TeamMemberships for team_id
    • Create Notification for each active member
    • type='task_assigned', priority based on task.priority
  4. Team member claims task

    • User from team accepts assignment
    • Update Task: assigned_to=<user_id>, status='in_progress'
  5. Work completion

    • User completes work
    • Update Task: status='completed', completed_at=NOW()
  6. Approval workflow (if requires_approval=true)

    • Create Notification for approver (manager)
    • Manager reviews and approves
    • Update Task: approved_by=<manager_id>, approved_at=NOW()
  7. Close task

    • Notify task assignee of approval
    • Task moves to final completed state

Postconditions:

  • Task tracked through entire lifecycle
  • All assignments and approvals audited
  • Team productivity metrics available

Business Rules

  1. Delegation Isolation: Delegations never transfer ownership, only extend access
  2. Temporal Enforcement: Delegations only active between start_at and end_at timestamps
  3. Scope Hierarchy: manage > write > read (scope can be narrowed, never widened)
  4. Audit Everything: All delegation events and cross-org actions must be logged
  5. Cascade Revocation: Revoking delegation immediately invalidates all derived memberships
  6. Team Membership: Users must be org members before joining teams
  7. Task Assignment: Can only assign tasks to users with active team membership or org membership
  8. Approval Requirements: Tasks marked requires_approval cannot be completed without approval
  9. Notification Delivery: High/urgent notifications override user preferences
  10. Resource References: Must validate resource exists and belongs to grantor org

Implementation Notes

MVP.0 Scope (OUT OF SCOPE)

Deferred:

  • Entire Delegation & Collaboration domain deferred to V1.1+
  • No cross-org delegation support in MVP.0
  • No team management
  • No task assignment workflows
  • No collaboration notifications

Rationale:

  • MVP.0 focuses on single-org villa management
  • No multi-org use cases in initial launch
  • Reduces complexity for faster time-to-market

V1.1 Scope (INCLUDED)

Included:

  • Full Delegation entity and workflow
  • ResourceReference for granular access control
  • DelegatedMembership resolution
  • CollaborationLog audit trail
  • Team entity and TeamMembership
  • Task assignment and approval workflows
  • Notification generation (in-app only)
  • Basic delegation approval workflow

Implementation Approach:

  • Start with TVL Ops → Owner delegation use case
  • Implement scope-based permission derivation
  • Build authorization middleware to check both Membership and DelegatedMembership
  • Create admin UI for delegation management
  • Implement task queue for async notification generation

Deferred to V1.2+:

  • Email/SMS notification delivery (Communications domain)
  • Multi-level delegation (owner → manager → sub-manager)
  • Programmatic API keys for delegation
  • Conditional delegation policies
  • Revenue sharing based on delegation

Database Indexes

Critical for performance:

-- Delegations
CREATE INDEX idx_delegations_grantor ON delegations(grantor_org_id, status, end_at);
CREATE INDEX idx_delegations_grantee ON delegations(grantee_org_id, status, end_at);
CREATE INDEX idx_delegations_active ON delegations(status, start_at, end_at)
WHERE status = 'active';
CREATE INDEX idx_delegations_resource_type ON delegations(resource_type, status);

-- ResourceReferences
CREATE INDEX idx_resource_refs_delegation ON resource_references(delegation_id);
CREATE INDEX idx_resource_refs_resource ON resource_references(resource_type, resource_id);
CREATE UNIQUE INDEX idx_resource_refs_unique ON resource_references(delegation_id, resource_type, resource_id);

-- DelegatedMemberships
CREATE INDEX idx_delegated_memberships_user ON delegated_memberships(user_id, expires_at);
CREATE INDEX idx_delegated_memberships_delegation ON delegated_memberships(delegation_id);
CREATE INDEX idx_delegated_memberships_effective ON delegated_memberships(effective_org_id, user_id);

-- Teams
CREATE INDEX idx_teams_org ON teams(org_id, status);
CREATE INDEX idx_teams_account ON teams(account_id) WHERE account_id IS NOT NULL;

-- TeamMemberships
CREATE INDEX idx_team_memberships_team ON team_memberships(team_id, status);
CREATE INDEX idx_team_memberships_user ON team_memberships(user_id, status);
CREATE UNIQUE INDEX idx_team_memberships_unique ON team_memberships(team_id, user_id)
WHERE status = 'active';

-- Tasks
CREATE INDEX idx_tasks_assigned_to ON tasks(assigned_to, status);
CREATE INDEX idx_tasks_team ON tasks(team_id, status);
CREATE INDEX idx_tasks_org ON tasks(org_id, status);
CREATE INDEX idx_tasks_due ON tasks(due_at) WHERE status IN ('pending', 'in_progress');
CREATE INDEX idx_tasks_approval ON tasks(requires_approval, status);

-- Notifications
CREATE INDEX idx_notifications_user ON notifications(user_id, status, created_at DESC);
CREATE INDEX idx_notifications_org ON notifications(org_id, created_at DESC);
CREATE INDEX idx_notifications_unread ON notifications(user_id, status)
WHERE status IN ('pending', 'sent');

-- CollaborationLog
CREATE INDEX idx_collab_log_delegation ON collaboration_logs(delegation_id, timestamp DESC);
CREATE INDEX idx_collab_log_grantor ON collaboration_logs(grantor_org_id, timestamp DESC);
CREATE INDEX idx_collab_log_grantee ON collaboration_logs(grantee_org_id, timestamp DESC);
CREATE INDEX idx_collab_log_user ON collaboration_logs(user_id, timestamp DESC);
CREATE INDEX idx_collab_log_resource ON collaboration_logs(resource_type, resource_id, timestamp DESC);

Constraints

Enforce data integrity:

-- Delegations
ALTER TABLE delegations
ADD CONSTRAINT delegations_different_orgs
CHECK (grantor_org_id != grantee_org_id);

ALTER TABLE delegations
ADD CONSTRAINT delegations_end_after_start
CHECK (end_at IS NULL OR end_at > start_at);

ALTER TABLE delegations
ADD CONSTRAINT delegations_approved_when_active
CHECK (status != 'active' OR approved_at IS NOT NULL);

-- ResourceReferences
ALTER TABLE resource_references
ADD CONSTRAINT resource_refs_valid_resource_id
CHECK (resource_id IS NOT NULL);

-- Teams
ALTER TABLE teams
ADD CONSTRAINT teams_org_name_unique
UNIQUE (org_id, name);

-- Tasks
ALTER TABLE tasks
ADD CONSTRAINT tasks_approval_fields
CHECK (
(requires_approval = false) OR
(status != 'completed' OR approved_by IS NOT NULL)
);

-- CollaborationLog
ALTER TABLE collaboration_logs
ADD CONSTRAINT collab_log_immutable
CHECK (updated_at = created_at);

Future Enhancements

V1.2: Enhanced Delegation

  • Multi-level delegation chains (owner → manager → contractor)
  • Conditional delegation policies (region-based, brand-based)
  • API key-based delegations for system integrations
  • Time-based auto-expiration with renewal workflows
  • Delegation templates for common scenarios

V1.3: Advanced Workflows

  • Visual workflow builder for approval chains
  • Parallel approval requirements (multiple approvers)
  • Conditional task routing based on resource attributes
  • Recurring task templates
  • Task dependency management

V2.0: Communications Integration

  • Email/SMS delivery for notifications
  • Webhook notifications for external systems
  • Rich notification templates
  • Notification preference management
  • Digest notifications (daily/weekly summaries)

V2.1: Revenue Sharing

  • Commission calculations based on delegations
  • Automated payout distribution for delegated work
  • Revenue split configuration per delegation
  • Financial reporting for delegated operations

V3.0: Advanced Collaboration

  • Real-time collaborative editing
  • Shared workspaces and dashboards
  • Chat/messaging within task context
  • Video conferencing integration
  • Document sharing and version control

Physical Schema

See 001_initial_schema.sql for complete CREATE TABLE statements.

Summary:

  • 8 tables: delegations, resource_references, delegated_memberships, teams, team_memberships, tasks, notifications, collaboration_logs
  • 20+ indexes for query performance
  • 8+ constraints for data integrity
  • Partition strategy for collaboration_logs by timestamp