Collaboration Overview
ThinkEx uses an event-sourced architecture for collaboration, ensuring that all changes are synchronized across collaborators in real-time.Key Features
Real-Time Sync
See changes from collaborators instantly
Permission Levels
Control who can view or edit
Event Sourcing
Complete history of all changes
Conflict Resolution
Automatic handling of concurrent edits
Workspace Sharing
Every workspace has an owner and can have multiple collaborators with different permission levels.Permission Levels
- Editor
- Viewer
Full editing accessEditors can:
- Create, edit, and delete cards
- Reorganize the workspace
- Invite other collaborators
- Use the AI assistant
- Generate share links
Editors have the same capabilities as the workspace owner, except they cannot delete the workspace itself.
Inviting Collaborators
There are two ways to invite people to your workspace:Email Invites
Invite specific people by email address:Email Invite Properties
- Single-use: Each invite can only be claimed once
- Expiration: Invites expire after a set time period
- Email-restricted: Only the invited email can claim the invite
- Token-based: Secure token ensures invite authenticity
Share Links
Create a multi-use link that anyone can use to join:Share Link Properties
- Multi-use: Can be used by multiple people
- Open access: Anyone with the link can join
- Expiration: Links expire at the set time
- One per workspace: Each workspace can have one active share link
Real-Time Synchronization
ThinkEx uses WebSockets (via Supabase Realtime) for instant synchronization across all collaborators.Event Sourcing Architecture
All workspace changes are stored as events:- User makes change: Create, edit, delete, or move a card
- Event created: Change is recorded as an event
- Event broadcast: WebSocket sends event to all collaborators
- State updated: Each client applies the event to their local state
- UI updates: Changes appear instantly for all users
What Gets Synchronized
- Card creation: New notes, flashcards, PDFs, etc.
- Card edits: Changes to card content
- Card deletion: Removed cards
- Card moves: Position and layout changes
- Folder operations: Creating and organizing folders
- Renames: Card and workspace name changes
The event sourcing architecture ensures that every change is captured and synchronized, providing a complete audit trail of workspace history.
Workspace Events
Events are the building blocks of collaboration. Each event represents a single change to the workspace.Event Properties
- Event ID: Unique identifier for the event
- Event Type: Type of change (e.g., “create_item”, “update_item”)
- Payload: Data describing the change
- Timestamp: When the event occurred
- User ID: Who made the change
- User Name: Display name of the user
- Version: Sequential version number
Event Types
Common event types include:create_item: New card createdupdate_item: Card content or properties changeddelete_item: Card removedmove_item: Card repositionedrename_item: Card renamedcreate_folder: New folder createdupdate_workspace_metadata: Workspace name or description changed
Conflict Resolution
ThinkEx handles concurrent edits automatically using optimistic updates and version tracking.How Conflicts Are Resolved
AI Conflict Detection
The AI assistant useslastModified timestamps to detect conflicts:
- Tracks when each card was last changed
- Compares timestamps before making AI edits
- Warns if content changed since AI last read it
- Prevents overwriting recent user changes
Workspace Snapshots
ThinkEx creates periodic snapshots of workspace state for performance optimization.Snapshot System
- Periodic creation: Snapshots created every N events
- Fast loading: New collaborators load from snapshot + recent events
- Version tracking: Each snapshot has a version number
- Complete state: Full workspace state at a point in time
Benefits
- Faster workspace loading for new collaborators
- Reduced event replay overhead
- Backup points for workspace history
Collaborator Management
Workspace owners and editors can manage collaborators.Managing Access
- View Collaborators
- Change Permissions
- Remove Collaborators
See who has access to the workspace:
- List of all collaborators
- Permission level for each
- Last time each person opened the workspace
- When they joined
Frequent Collaborators
ThinkEx tracks who you collaborate with most:- Automatically suggests frequent collaborators when inviting
- Based on shared workspace history
- Makes it faster to add the same team repeatedly
Use Cases
Study Groups
Study Groups
- Share class notes with classmates
- Collaborate on study guides
- Create shared flashcard decks
- Quiz each other on material
- Keep all group resources in one place
Research Teams
Research Teams
- Collect research papers together
- Share literature notes
- Collaborate on summaries
- Organize sources by topic
- Track research progress
Project Teams
Project Teams
- Share project documentation
- Collect reference materials
- Create project notes
- Track action items
- Keep everyone on the same page
Teaching
Teaching
- Share course materials with students
- Create class workspaces
- Provide feedback on student work
- Share resources and readings
- Track student progress
Best Practices
Communication
- Discuss major changes before making them
- Use workspace naming conventions
- Coordinate who’s working on what
- Set expectations for response times
Organization
- Create clear folder structures
- Use descriptive card names
- Establish naming conventions
- Keep related content together
- Archive completed work
Permissions
- Use Viewer access for read-only sharing
- Grant Editor access to active collaborators
- Review collaborator list regularly
- Remove access when no longer needed
- Use email invites for trusted collaborators
- Use share links for temporary access
Performance
- Avoid extremely large workspaces (100+ cards)
- Create separate workspaces for different projects
- Archive old content regularly
- Keep active workspace focused
Technical Details
Database Schema
Collaboration uses these tables:- workspace_collaborators: Tracks who has access
- workspace_invites: Email-based invitations
- workspace_share_links: Multi-use share links
- workspace_events: All workspace changes
- workspace_snapshots: Periodic state snapshots
Real-Time Connection
ThinkEx uses Supabase Realtime:- WebSocket connection for each workspace
- Automatic reconnection on disconnect
- Efficient delta updates
- Low-latency synchronization
Security
- Row-level security policies on all tables
- JWT-based authentication
- Secure token generation for invites
- Permission checks on every operation
Collaboration features require a Supabase backend. Local-only mode does not support multi-user collaboration.