Every diagram in MC Modeler is private by default. The Share modal lets the owner invite specific people by email or generate a shareable invite link — each with a configurable expiry and role. Roles are enforced end-to-end by Supabase Row Level Security, so a viewer genuinely cannot modify diagram data even by calling the API directly.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Aston2710/mc-modeler/llms.txt
Use this file to discover all available pages before exploring further.
Only the owner of a diagram (or project) can manage access. Editors and viewers see the current list of collaborators but cannot add, change, or remove anyone — the share controls are read-only for them (
share.onlyOwnerCanShare).Roles and permissions
| Role | Edit diagram | Manage access | Delete diagram | Add comments |
|---|---|---|---|---|
| owner | ✅ | ✅ | ✅ | ✅ |
| editor | ✅ | ❌ | ❌ | ✅ |
| viewer | ❌ | ❌ | ❌ | ✅ |
ReadOnlyModule is registered with bpmn-js that disables all modeling interactions — elements cannot be moved, created, or deleted. The viewer can still pan, zoom, and read all comments.
Inviting by email
- Open the diagram and click Share in the toolbar.
- Enter the collaborator’s email address in the email@example.com field.
- Choose Can edit (
roleEditor) or View only (roleViewer). - Click Invite.
addCollaboratorByEmail looks up the email in the profiles table (case-insensitive) and upserts a row into diagram_collaborators:
share.notRegistered — use a shareable link instead.
Shareable invite links
For collaborators who don’t have an account yet, generate a link with Copy invite link. The link contains a UUID token and looks like:Expiry options
When creating the link you choose one of four expiry windows (share.expiryLabel):
| UI label | Days | expiresInDays |
|---|---|---|
| Expires in 3 days | 3 | 3 |
| Expires in 7 days | 7 | 7 |
| Expires in 30 days | 30 | 30 |
| Never expires | — | null |
Redeeming an invite link
When a user opens a link containing?invite=<token>, the app calls the redeem_invite Supabase RPC function. The function:
- Validates the token exists and has not expired.
- Inserts the authenticated user into
diagram_collaboratorswith the role stored on the invite. - Sets
accepted_aton the invite row. - Enqueues
invite_redeemed_diagramnotifications for existing collaborators.
share.inviteExpired.
Project-level sharing
Opening Share project from the project menu works identically to diagram sharing but operates onproject_collaborators and project_invites. Granting a role at the project level gives the collaborator the same role on all diagrams currently in the project, as well as any diagrams added later.
?projectInvite=<token>.
Effective role resolution
A user may have both a direct diagram role and an inherited project role. The most permissive role wins:viewer (1) < editor (2) < owner (3). For example, a user who is a viewer on a diagram but an editor on its project has an effective role of editor for that diagram.
This logic lives in useCollabStore (src/store/collabStore.ts) and is evaluated client-side after both role maps are loaded from Supabase.
Revoking access
To remove a collaborator, open the Share modal and click Remove next to their name. This callsremoveCollaborator, which deletes the row from diagram_collaborators:
Share modal UI reference
The following strings fromen.json map to Share modal elements:
| Key | Text |
|---|---|
share.title | Share diagram |
share.subtitle | Invite people to view or edit this diagram |
share.emailPlaceholder | email@example.com |
share.roleEditor | Can edit |
share.roleViewer | View only |
share.invite | Invite |
share.copyLink | Copy invite link |
share.expiryLabel | Link expiration |
share.expiry3d | Expires in 3 days |
share.expiry7d | Expires in 7 days |
share.expiry30d | Expires in 30 days |
share.expiryNever | Never expires |
share.onlyOwnerCanShare | Only the owner can manage access. |