Personal vs. organization documents
Every document in Convex stores either anownerId (for personal documents) or an organizationId (for organization documents). When you create a document while a Clerk organization is active, that organization’s ID is written to the organizationId field automatically. If no organization is selected, the document is personal and scoped to your user ID.
The home screen document list always reflects your current context: personal documents when you are in personal mode, or your organization’s documents when an org is selected.
Switching between contexts
The document navbar includes Clerk’s<OrganizationSwitcher> component. Use it to move between your personal account and any organizations you belong to. After switching, the document list updates immediately to show the documents for that context.
Access control
Organization membership is the only requirement to access, edit, rename, or delete an organization’s documents. DocuSphere checks bothisOwner (your user ID matches the document’s ownerId) and isOrganizationMember (your active org ID matches the document’s organizationId) before allowing any write operation. If neither condition is true, the operation is rejected.
This means every member of your organization can:
- Open and edit any document belonging to that org
- Rename a document
- Delete a document
Searching organization documents
The full-text search in the document list is automatically scoped to your current context. When you are inside an organization, search queries run against thesearch_title index filtered by organizationId. In personal mode, the same index filters by ownerId instead. You never see results from outside your current workspace.
Collaboration and presence in organizations
When you open a document, DocuSphere callsgetUsers() to fetch all members of your current organization from Clerk. This list populates the presence avatars and mention suggestions inside the document editor, so you can see and mention your teammates without any additional setup.
Organization features require Clerk organizations to be enabled in your Clerk dashboard. If you have not set up an organization, all documents will be created and listed as personal documents.