From 89270ddbff5ec99400d863c037eef6b25c558dc8 Mon Sep 17 00:00:00 2001 From: Mistium <92952823+Mistium@users.noreply.github.com> Date: Fri, 27 Nov 2026 22:14:58 +0000 Subject: [PATCH 01/12] Document Rotur organisations in place of groups --- docs/backend/community.md | 19 ++++++++++++++++++- docs/backend/configuration.md | 2 +- docs/backend/overview.md | 2 +- docs/backend/storage.md | 4 ++-- 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/docs/backend/community.md b/docs/backend/community.md index 03fe43fd..81746871 100644 --- a/docs/backend/community.md +++ b/docs/backend/community.md @@ -4,7 +4,7 @@ title: Community features # Community features -Badges, milestone notifications and the development feed. +Badges, milestone notifications, organisations and the development feed. ## Badges @@ -36,6 +36,23 @@ MistWarp sends one-time notifications at 5, 25, 50, 100, 500, and 1,000 likes or Project and community reactions check milestones when saved. Profile-post, theme, and follower checks read existing public APIs and keep their state in MistWarp. The client requests a check after a like or follow; opening the inbox also checks the current account's followers. These sampled counts can detect a threshold crossed between visits, but cannot detect a count that rose and fell entirely between checks. Existing counts establish a baseline without sending every earlier milestone. No Rotur or WarpTheme server changes are required. +## Organisations + +A Rotur organisation is a Rotur account with `account_type: "org"`. It can own MistWarp projects and spaces directly: the record's `owner` is the organisation's username, `ownerId` its Rotur id, and `ownerType` is `"org"`. Projects and spaces made by a person have an empty `ownerType`. + +Members of the organisation whose Rotur permissions include `apps` or `admin` are its publishers. A publisher can create projects and spaces for the organisation (send `org: ""` when creating), move their own content into it (an ownership transfer to the organisation's name), and manage, transfer or delete anything it owns, as if they were the owner. Billing-only and plain members cannot. Site admins always can. A publisher only manages content whose `ownerId` matches the organisation's current Rotur id, so a new organisation that later takes a freed name gets none of the old one's content. + +MistWarp asks Rotur who is in an organisation with `COMMERCE_SERVICE_KEY`, through `GET /v2/integrations/mistwarp/orgs/:name` (the organisation and every member with their permissions, including members who are not listed publicly) and `GET /v2/integrations/mistwarp/users/:id/orgs` (a person's organisations). Answers are cached for a minute. When Rotur cannot be reached, anything that needs an organisation's members answers 503 `rotur_unavailable` instead of refusing. + +| Route | What it returns | +| --- | --- | +| `GET /v1/orgs/:name` | `{org, members, projects, spaces, isMember, canManage}`. `members` lists only publicly listed members unless the viewer is a member. Drafts and private spaces are included only for publishers | +| `GET /v1/me/orgs` | `{orgs: [{username, displayName, perms, canPublish}]}` for the signed-in person | + +Notifications about content an organisation owns (loves, comments, remixes, reviews, contributions, challenge entries and moderation) go to each of its publishers. On a challenge an organisation owns, its publishers are judges as well as anyone invited. `judges` lists the publicly listed ones, and `judgeCount` counts all of them. + +The Rotur groups integration (`/v1/groups/:tag` and the `groupTag` field) was removed. Organisations replace it. + ## Development feed `/v1/development/pulls` lists MistWarp's own open and recently merged pull requests, and `/v1/roadmap` resolves the ones linked to each entry. diff --git a/docs/backend/configuration.md b/docs/backend/configuration.md index 4c622d40..f6b89d23 100644 --- a/docs/backend/configuration.md +++ b/docs/backend/configuration.md @@ -15,7 +15,7 @@ The server loads `.env` from the directory it runs in. A value is looked up in t | APP_URL | https://api.mistwarp.org | Public URL of this API | | ROTUR_BASE | https://api.rotur.dev | The public Rotur API, for sign-in, profiles, plans, notifications and the apps API | | ROTUR_APP_KEY | mistwarp | The old validator key, for editors that predate validators keyed to the Rotur App | -| COMMERCE_SERVICE_KEY | | Key registered for `mistwarp` in Rotur's `COMMERCE_SERVICE_KEYS`. Only bounty awards and the groups integration still use it | +| COMMERCE_SERVICE_KEY | | Key registered for `mistwarp` in Rotur's `COMMERCE_SERVICE_KEYS`. Bounty awards and the organisation lookups (`/v2/integrations/mistwarp/...`) use it | | ROTUR_CLIENT_ID | | The MistWarp Rotur App's client ID (`app_1938b6a87799f862`). With the secret, mistwarp-api calls the apps API as MistWarp | | ROTUR_CLIENT_SECRET | | One of the MistWarp Rotur App's secrets, made with **New secret** on rotur.dev/me/developer | | MISTWARP_ROTUR_USER | | Rotur account that gets MistWarp's share of game product sales. Without it, the MistWarp Rotur App's owner gets it | diff --git a/docs/backend/overview.md b/docs/backend/overview.md index 79918b49..566b2587 100644 --- a/docs/backend/overview.md +++ b/docs/backend/overview.md @@ -45,7 +45,7 @@ The API needs OSL 3.0. `opal.json` lists the usual commands: | `git` | Git inspection, pull requests and Rotur Git | | `games` | Game saves, inventories and marketplace products | | `realtime` | The multiplayer and site WebSockets | -| `community` | Spaces, roadmap, comments, bounties, profiles, news, notifications, milestones, standing, reports, groups | +| `community` | Spaces, roadmap, comments, bounties, profiles, news, notifications, milestones, standing, reports, organisations | | `admin` | Admin tools, bans and shadow bans, moderation, error reports, funnel events | | `classroom` | MistWarp Classroom | | `rotur` | The Rotur App, plans and perks, payments, signals, badges and webhooks | diff --git a/docs/backend/storage.md b/docs/backend/storage.md index f8fdc6ce..a2926074 100644 --- a/docs/backend/storage.md +++ b/docs/backend/storage.md @@ -55,9 +55,9 @@ Upload callers hold the project's save lock (`project-history-`). History pr A pull request records the remix's head when it is opened, but an open pull request follows the remix: `GET /v1/projects/:id/pulls/:index`, its `diff` and its `merge` use the current head of the remix branch the pull request was opened from (`headBranch`). A pull request opened before branches were recorded follows the remix's only branch, or keeps its recorded head when the remix has several. If the branch no longer exists, they fall back to the recorded head. Merged and closed pull requests keep the head they had. `GET` shows the live head only to callers who can inspect the pull request. Its `baseCommit` stays the recorded fork point, so loading the pull request does no history work, and the diff response carries the live base. The diff compares the remix head with the closest commit it shares with the head of the target branch (`baseBranch`), or with the recorded base once that branch has been deleted, so changes the remix brought in from the target are not shown as part of the pull request. The `pull` object in a diff response carries that `baseCommit` and `headCommit`. The diff's merge base is cached by the two heads, because the commits behind a head never change, and a cached base is used only while both histories still contain it. Preparing a merge always walks the histories. Reading a project's commits or files with `?pull=&pullTarget=` is limited to commits that belong to that pull request (its recorded base, recorded target head, recorded head, prepared head, live head and live base), and downloading `workspace.mwp?pull=` also requires a signed-in editor of the target project or the owner of the remix. -`POST /v1/projects/:id/pulls/:index/merge` merges against the same shared commit, or against the recorded `baseCommit` when the two histories no longer share one. It refuses with 409 `target_branch_changed` (with `branch`) while the target is on another branch than the pull request's `baseBranch`, and with 409 `target_branch_missing` once that branch has been deleted or renamed or 409 `uncommitted_changes` while the target has saved changes that are not committed (unless, for `target_branch_missing` or `uncommitted_changes`, the pull request is already merged, since closing it touches no project files). Projects without branch metadata skip the branch check. The upload repeats the source-visibility check, both branch checks and the `uncommitted_changes` refusal. `GET` reports `baseBranchMissing: true` once the target branch is gone, so the UI hides the merge action and tells the viewer to close and reopen the pull request before anyone tries to merge. When the target's head is an ancestor of the remix head, the remix has no uncommitted changes and the remix is on the branch the pull request follows, the server writes a merge commit whose tree is the remix head and answers `{merged: true, fastForward: true}`. When the target already has the remix head, the pull request is marked merged under the project's save lock and the answer is `{merged: true, alreadyMerged: true}`. Otherwise it stores the remix head it merged on the pull request as `preparedSourceHead` and answers `{merged: false, merge, expectedHead, sourceHead}`, where `merge` is the three-way merge with `changes`, `conflicts` and `baseHead`. A merge that cannot be prepared answers 409 `pull_merge_unavailable`. The client applies `merge.changes` to the target tree at `expectedHead` and uploads the result with `pullId`, `expectedHead`, `mergeTree` and `mergeSourceHead` (the `sourceHead` it merged). If the remix has moved since, the upload answers 409 `pull_head_changed`. An upload without `mergeSourceHead` is checked against `preparedSourceHead` (or the recorded head before any merge was prepared), so an older client can merge what the server last prepared and fails with 409 `pull_head_changed` if the remix moved after that. A pull request upload must carry `mergeTree` and no `workspace`, `restoreCommit`, `mergeSourceBranch` or `mergeTargetBranch`, or it answers 400. It answers 409 `head_changed` without `expectedHead` or when the target moved, 409 `pull_not_open` once the pull request was closed or merged, and 409 `pull_not_closed` (or 500 on the merge endpoint) if the project saves but the pull request record cannot be marked merged. Merging needs the same edit access as saving the project, so admins and group managers who can edit it can merge too. Once merged, the pull request records the remix head it merged as `headCommit`. +`POST /v1/projects/:id/pulls/:index/merge` merges against the same shared commit, or against the recorded `baseCommit` when the two histories no longer share one. It refuses with 409 `target_branch_changed` (with `branch`) while the target is on another branch than the pull request's `baseBranch`, and with 409 `target_branch_missing` once that branch has been deleted or renamed or 409 `uncommitted_changes` while the target has saved changes that are not committed (unless, for `target_branch_missing` or `uncommitted_changes`, the pull request is already merged, since closing it touches no project files). Projects without branch metadata skip the branch check. The upload repeats the source-visibility check, both branch checks and the `uncommitted_changes` refusal. `GET` reports `baseBranchMissing: true` once the target branch is gone, so the UI hides the merge action and tells the viewer to close and reopen the pull request before anyone tries to merge. When the target's head is an ancestor of the remix head, the remix has no uncommitted changes and the remix is on the branch the pull request follows, the server writes a merge commit whose tree is the remix head and answers `{merged: true, fastForward: true}`. When the target already has the remix head, the pull request is marked merged under the project's save lock and the answer is `{merged: true, alreadyMerged: true}`. Otherwise it stores the remix head it merged on the pull request as `preparedSourceHead` and answers `{merged: false, merge, expectedHead, sourceHead}`, where `merge` is the three-way merge with `changes`, `conflicts` and `baseHead`. A merge that cannot be prepared answers 409 `pull_merge_unavailable`. The client applies `merge.changes` to the target tree at `expectedHead` and uploads the result with `pullId`, `expectedHead`, `mergeTree` and `mergeSourceHead` (the `sourceHead` it merged). If the remix has moved since, the upload answers 409 `pull_head_changed`. An upload without `mergeSourceHead` is checked against `preparedSourceHead` (or the recorded head before any merge was prepared), so an older client can merge what the server last prepared and fails with 409 `pull_head_changed` if the remix moved after that. A pull request upload must carry `mergeTree` and no `workspace`, `restoreCommit`, `mergeSourceBranch` or `mergeTargetBranch`, or it answers 400. It answers 409 `head_changed` without `expectedHead` or when the target moved, 409 `pull_not_open` once the pull request was closed or merged, and 409 `pull_not_closed` (or 500 on the merge endpoint) if the project saves but the pull request record cannot be marked merged. Merging needs the same edit access as saving the project, so admins and organisation publishers who can edit it can merge too. Once merged, the pull request records the remix head it merged as `headCommit`. -`POST /v1/projects/:id/remix/sync` prepares a merge of the original project's current head into a remix. Only someone who can edit the remix (its maintainers, or admins and group managers who can edit it) and see inside both projects may call it. It answers `{merge, targetProjectId, sourceProjectId, sourceTitle, sourceHead, targetHead, expectedHead}`. `merge.alreadyMerged` is true when the remix already contains the original's head, and `merge.fastForward` when the remix has no commits of its own since. Text conflicts are marked `this remix` and `original`. A history that still stores the whole project as one `project.sb3` file has a single binary conflict for that file, so the choice is the whole remix or the whole original. The client applies the changes to the remix tree at `targetHead` and uploads them with `syncHead` (the `sourceHead`), `expectedHead` and `mergeTree`. The server then writes a merge commit, `Merge changes from `, whose parents are the remix head and the original's head. A sync writes that merge commit even when it could fast-forward. A sync refuses with: +`POST /v1/projects/:id/remix/sync` prepares a merge of the original project's current head into a remix. Only someone who can edit the remix (its maintainers, or admins and organisation publishers who can edit it) and see inside both projects may call it. It answers `{merge, targetProjectId, sourceProjectId, sourceTitle, sourceHead, targetHead, expectedHead}`. `merge.alreadyMerged` is true when the remix already contains the original's head, and `merge.fastForward` when the remix has no commits of its own since. Text conflicts are marked `this remix` and `original`. A history that still stores the whole project as one `project.sb3` file has a single binary conflict for that file, so the choice is the whole remix or the whole original. The client applies the changes to the remix tree at `targetHead` and uploads them with `syncHead` (the `sourceHead`), `expectedHead` and `mergeTree`. The server then writes a merge commit, `Merge changes from `, whose parents are the remix head and the original's head. A sync writes that merge commit even when it could fast-forward. A sync refuses with: - 404 when the project is not a remix, or its original no longer exists. - 403 for anyone else, or once the original's source is no longer visible to the caller. From 385f62863a4b56e51f18d5699b4ab192c2912aed Mon Sep 17 00:00:00 2001 From: Mistium <92952823+Mistium@users.noreply.github.com> Date: Fri, 27 Nov 2026 23:50:04 +0000 Subject: [PATCH 02/12] Document org refusal codes, notification limits and members Rotur leaves out --- docs/backend/community.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/backend/community.md b/docs/backend/community.md index 81746871..5f760dce 100644 --- a/docs/backend/community.md +++ b/docs/backend/community.md @@ -42,14 +42,16 @@ A Rotur organisation is a Rotur account with `account_type: "org"`. It can own M Members of the organisation whose Rotur permissions include `apps` or `admin` are its publishers. A publisher can create projects and spaces for the organisation (send `org: ""` when creating), move their own content into it (an ownership transfer to the organisation's name), and manage, transfer or delete anything it owns, as if they were the owner. Billing-only and plain members cannot. Site admins always can. A publisher only manages content whose `ownerId` matches the organisation's current Rotur id, so a new organisation that later takes a freed name gets none of the old one's content. -MistWarp asks Rotur who is in an organisation with `COMMERCE_SERVICE_KEY`, through `GET /v2/integrations/mistwarp/orgs/:name` (the organisation and every member with their permissions, including members who are not listed publicly) and `GET /v2/integrations/mistwarp/users/:id/orgs` (a person's organisations). Answers are cached for a minute. When Rotur cannot be reached, anything that needs an organisation's members answers 503 `rotur_unavailable` instead of refusing. +MistWarp asks Rotur who is in an organisation with `COMMERCE_SERVICE_KEY`, through `GET /v2/integrations/mistwarp/orgs/:name` (the organisation and every member with their permissions, including members who are not listed publicly) and `GET /v2/integrations/mistwarp/users/:id/orgs` (a person's organisations). On Rotur's side that key is the `mistwarp` entry of its `COMMERCE_SERVICE_KEYS`. Rotur leaves out members who cannot sign in (banned, suspended or age-restricted), so they stop publishing for the organisation. Answers are cached for a minute. When Rotur cannot be reached, anything that needs an organisation's members answers 503 `rotur_unavailable` instead of refusing. That includes a move to an account whose Rotur profile says it is an organisation but whose members cannot be read. + +Creating for an organisation can be refused with `code`: `org_not_found` (400, the name is not an organisation), `org_forbidden` (403, the person does not publish for it) or `rotur_unavailable` (503). | Route | What it returns | | --- | --- | -| `GET /v1/orgs/:name` | `{org, members, projects, spaces, isMember, canManage}`. `members` lists only publicly listed members unless the viewer is a member. Drafts and private spaces are included only for publishers | +| `GET /v1/orgs/:name` | `{org, members, projects, spaces, isMember, canManage}`. `members` lists only publicly listed members unless the viewer is a member or a site admin. Drafts and private spaces are included only for publishers | | `GET /v1/me/orgs` | `{orgs: [{username, displayName, perms, canPublish}]}` for the signed-in person | -Notifications about content an organisation owns (loves, comments, remixes, reviews, contributions, challenge entries and moderation) go to each of its publishers. On a challenge an organisation owns, its publishers are judges as well as anyone invited. `judges` lists the publicly listed ones, and `judgeCount` counts all of them. +Notifications about content an organisation owns (loves, comments, remixes, reviews, contributions, sales, challenge entries and moderation) go to each of its publishers, up to 25 of them. The same event about the same content is sent once every ten minutes, so toggling a love does not repeat it. When a publisher enters an organisation's project in a challenge, the publisher, not the organisation, is recorded as the participant. On a challenge an organisation owns, its publishers are judges as well as anyone invited. `judges` lists the publicly listed ones, and `judgeCount` counts all of them. The Rotur groups integration (`/v1/groups/:tag` and the `groupTag` field) was removed. Organisations replace it. From 6ff7f123cd32141ae3e42f215f40333378770ff6 Mon Sep 17 00:00:00 2001 From: Mistium <92952823+Mistium@users.noreply.github.com> Date: Sat, 28 Nov 2026 00:54:10 +0000 Subject: [PATCH 03/12] Document that only org admins move content out of an org --- docs/backend/community.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/backend/community.md b/docs/backend/community.md index 5f760dce..7a264211 100644 --- a/docs/backend/community.md +++ b/docs/backend/community.md @@ -40,7 +40,7 @@ Project and community reactions check milestones when saved. Profile-post, theme A Rotur organisation is a Rotur account with `account_type: "org"`. It can own MistWarp projects and spaces directly: the record's `owner` is the organisation's username, `ownerId` its Rotur id, and `ownerType` is `"org"`. Projects and spaces made by a person have an empty `ownerType`. -Members of the organisation whose Rotur permissions include `apps` or `admin` are its publishers. A publisher can create projects and spaces for the organisation (send `org: ""` when creating), move their own content into it (an ownership transfer to the organisation's name), and manage, transfer or delete anything it owns, as if they were the owner. Billing-only and plain members cannot. Site admins always can. A publisher only manages content whose `ownerId` matches the organisation's current Rotur id, so a new organisation that later takes a freed name gets none of the old one's content. +Members of the organisation whose Rotur permissions include `apps` or `admin` are its publishers. A publisher can create projects and spaces for the organisation (send `org: ""` when creating), move their own content into it (an ownership transfer to the organisation's name), and manage or delete anything it owns, as if they were the owner. Moving the organisation's content out of it, to a person or another organisation, needs an organisation admin; project and space responses say whether the viewer may with `canMoveOut`. Billing-only and plain members cannot do any of this. Site admins always can. A publisher only manages content whose `ownerId` matches the organisation's current Rotur id, so a new organisation that later takes a freed name gets none of the old one's content. MistWarp asks Rotur who is in an organisation with `COMMERCE_SERVICE_KEY`, through `GET /v2/integrations/mistwarp/orgs/:name` (the organisation and every member with their permissions, including members who are not listed publicly) and `GET /v2/integrations/mistwarp/users/:id/orgs` (a person's organisations). On Rotur's side that key is the `mistwarp` entry of its `COMMERCE_SERVICE_KEYS`. Rotur leaves out members who cannot sign in (banned, suspended or age-restricted), so they stop publishing for the organisation. Answers are cached for a minute. When Rotur cannot be reached, anything that needs an organisation's members answers 503 `rotur_unavailable` instead of refusing. That includes a move to an account whose Rotur profile says it is an organisation but whose members cannot be read. From 691844f14092977e9561ccfa0b799a239fca1f1f Mon Sep 17 00:00:00 2001 From: Mistium <92952823+Mistium@users.noreply.github.com> Date: Sat, 28 Nov 2026 01:32:02 +0000 Subject: [PATCH 04/12] Say which org actions answer 503 while Rotur is unreachable --- docs/backend/community.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/backend/community.md b/docs/backend/community.md index 7a264211..8bc71ce9 100644 --- a/docs/backend/community.md +++ b/docs/backend/community.md @@ -42,7 +42,7 @@ A Rotur organisation is a Rotur account with `account_type: "org"`. It can own M Members of the organisation whose Rotur permissions include `apps` or `admin` are its publishers. A publisher can create projects and spaces for the organisation (send `org: ""` when creating), move their own content into it (an ownership transfer to the organisation's name), and manage or delete anything it owns, as if they were the owner. Moving the organisation's content out of it, to a person or another organisation, needs an organisation admin; project and space responses say whether the viewer may with `canMoveOut`. Billing-only and plain members cannot do any of this. Site admins always can. A publisher only manages content whose `ownerId` matches the organisation's current Rotur id, so a new organisation that later takes a freed name gets none of the old one's content. -MistWarp asks Rotur who is in an organisation with `COMMERCE_SERVICE_KEY`, through `GET /v2/integrations/mistwarp/orgs/:name` (the organisation and every member with their permissions, including members who are not listed publicly) and `GET /v2/integrations/mistwarp/users/:id/orgs` (a person's organisations). On Rotur's side that key is the `mistwarp` entry of its `COMMERCE_SERVICE_KEYS`. Rotur leaves out members who cannot sign in (banned, suspended or age-restricted), so they stop publishing for the organisation. Answers are cached for a minute. When Rotur cannot be reached, anything that needs an organisation's members answers 503 `rotur_unavailable` instead of refusing. That includes a move to an account whose Rotur profile says it is an organisation but whose members cannot be read. +MistWarp asks Rotur who is in an organisation with `COMMERCE_SERVICE_KEY`, through `GET /v2/integrations/mistwarp/orgs/:name` (the organisation and every member with their permissions, including members who are not listed publicly) and `GET /v2/integrations/mistwarp/users/:id/orgs` (a person's organisations). On Rotur's side that key is the `mistwarp` entry of its `COMMERCE_SERVICE_KEYS`. Rotur leaves out members who cannot sign in (banned, suspended or age-restricted), so they stop publishing for the organisation. Answers are cached for a minute. When Rotur cannot be reached, creating for an organisation, editing its projects and moving content into or out of it answer 503 `rotur_unavailable` instead of refusing. That includes a move to an account whose Rotur profile says it is an organisation but whose members cannot be read. Other actions on an organisation's content are refused until Rotur answers again. Creating for an organisation can be refused with `code`: `org_not_found` (400, the name is not an organisation), `org_forbidden` (403, the person does not publish for it) or `rotur_unavailable` (503). From 1eb77601d3c9e8dc3245818ffad98d4095fc39ec Mon Sep 17 00:00:00 2001 From: Mistium <92952823+Mistium@users.noreply.github.com> Date: Sat, 28 Nov 2026 02:03:37 +0000 Subject: [PATCH 05/12] Document org lookups by id and the org page list cap --- docs/backend/community.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/backend/community.md b/docs/backend/community.md index 8bc71ce9..7ce28c49 100644 --- a/docs/backend/community.md +++ b/docs/backend/community.md @@ -42,13 +42,15 @@ A Rotur organisation is a Rotur account with `account_type: "org"`. It can own M Members of the organisation whose Rotur permissions include `apps` or `admin` are its publishers. A publisher can create projects and spaces for the organisation (send `org: ""` when creating), move their own content into it (an ownership transfer to the organisation's name), and manage or delete anything it owns, as if they were the owner. Moving the organisation's content out of it, to a person or another organisation, needs an organisation admin; project and space responses say whether the viewer may with `canMoveOut`. Billing-only and plain members cannot do any of this. Site admins always can. A publisher only manages content whose `ownerId` matches the organisation's current Rotur id, so a new organisation that later takes a freed name gets none of the old one's content. +Organisation content is looked up by the organisation's Rotur id, so renaming an organisation keeps its content and publishers. Before asking Rotur about an organisation, MistWarp checks the viewer's own organisation list, so pages with many organisations' spaces cost one Rotur request per viewer, not one per organisation. + MistWarp asks Rotur who is in an organisation with `COMMERCE_SERVICE_KEY`, through `GET /v2/integrations/mistwarp/orgs/:name` (the organisation and every member with their permissions, including members who are not listed publicly) and `GET /v2/integrations/mistwarp/users/:id/orgs` (a person's organisations). On Rotur's side that key is the `mistwarp` entry of its `COMMERCE_SERVICE_KEYS`. Rotur leaves out members who cannot sign in (banned, suspended or age-restricted), so they stop publishing for the organisation. Answers are cached for a minute. When Rotur cannot be reached, creating for an organisation, editing its projects and moving content into or out of it answer 503 `rotur_unavailable` instead of refusing. That includes a move to an account whose Rotur profile says it is an organisation but whose members cannot be read. Other actions on an organisation's content are refused until Rotur answers again. Creating for an organisation can be refused with `code`: `org_not_found` (400, the name is not an organisation), `org_forbidden` (403, the person does not publish for it) or `rotur_unavailable` (503). | Route | What it returns | | --- | --- | -| `GET /v1/orgs/:name` | `{org, members, projects, spaces, isMember, canManage}`. `members` lists only publicly listed members unless the viewer is a member or a site admin. Drafts and private spaces are included only for publishers | +| `GET /v1/orgs/:name` | `{org, members, projects, spaces, isMember, canManage}`. `projects` and `spaces` hold the 100 most recently edited. `members` lists only publicly listed members unless the viewer is a member or a site admin. Drafts and private spaces are included only for publishers | | `GET /v1/me/orgs` | `{orgs: [{username, displayName, perms, canPublish}]}` for the signed-in person | Notifications about content an organisation owns (loves, comments, remixes, reviews, contributions, sales, challenge entries and moderation) go to each of its publishers, up to 25 of them. The same event about the same content is sent once every ten minutes, so toggling a love does not repeat it. When a publisher enters an organisation's project in a challenge, the publisher, not the organisation, is recorded as the participant. On a challenge an organisation owns, its publishers are judges as well as anyone invited. `judges` lists the publicly listed ones, and `judgeCount` counts all of them. From 91e2230063af7aed28d6476934b4452c25faaf8b Mon Sep 17 00:00:00 2001 From: Mistium <92952823+Mistium@users.noreply.github.com> Date: Sat, 28 Nov 2026 02:36:54 +0000 Subject: [PATCH 06/12] Note that org content uses the org's own plan --- docs/backend/community.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/backend/community.md b/docs/backend/community.md index 7ce28c49..04a90fa9 100644 --- a/docs/backend/community.md +++ b/docs/backend/community.md @@ -42,6 +42,8 @@ A Rotur organisation is a Rotur account with `account_type: "org"`. It can own M Members of the organisation whose Rotur permissions include `apps` or `admin` are its publishers. A publisher can create projects and spaces for the organisation (send `org: ""` when creating), move their own content into it (an ownership transfer to the organisation's name), and manage or delete anything it owns, as if they were the owner. Moving the organisation's content out of it, to a person or another organisation, needs an organisation admin; project and space responses say whether the viewer may with `canMoveOut`. Billing-only and plain members cannot do any of this. Site admins always can. A publisher only manages content whose `ownerId` matches the organisation's current Rotur id, so a new organisation that later takes a freed name gets none of the old one's content. +Content an organisation owns uses the organisation's own Rotur plan for its limits and paid features (branding, vanity URLs, analytics history), not the plan of the publisher editing it. + Organisation content is looked up by the organisation's Rotur id, so renaming an organisation keeps its content and publishers. Before asking Rotur about an organisation, MistWarp checks the viewer's own organisation list, so pages with many organisations' spaces cost one Rotur request per viewer, not one per organisation. MistWarp asks Rotur who is in an organisation with `COMMERCE_SERVICE_KEY`, through `GET /v2/integrations/mistwarp/orgs/:name` (the organisation and every member with their permissions, including members who are not listed publicly) and `GET /v2/integrations/mistwarp/users/:id/orgs` (a person's organisations). On Rotur's side that key is the `mistwarp` entry of its `COMMERCE_SERVICE_KEYS`. Rotur leaves out members who cannot sign in (banned, suspended or age-restricted), so they stop publishing for the organisation. Answers are cached for a minute. When Rotur cannot be reached, creating for an organisation, editing its projects and moving content into or out of it answer 503 `rotur_unavailable` instead of refusing. That includes a move to an account whose Rotur profile says it is an organisation but whose members cannot be read. Other actions on an organisation's content are refused until Rotur answers again. From d0f6f31384c2f5a121012ad7534fb2e61e4c48f0 Mon Sep 17 00:00:00 2001 From: Mistium <92952823+Mistium@users.noreply.github.com> Date: Sat, 28 Nov 2026 02:46:37 +0000 Subject: [PATCH 07/12] Document the org_unavailable refusal --- docs/backend/community.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/backend/community.md b/docs/backend/community.md index 04a90fa9..aebe493f 100644 --- a/docs/backend/community.md +++ b/docs/backend/community.md @@ -46,7 +46,7 @@ Content an organisation owns uses the organisation's own Rotur plan for its limi Organisation content is looked up by the organisation's Rotur id, so renaming an organisation keeps its content and publishers. Before asking Rotur about an organisation, MistWarp checks the viewer's own organisation list, so pages with many organisations' spaces cost one Rotur request per viewer, not one per organisation. -MistWarp asks Rotur who is in an organisation with `COMMERCE_SERVICE_KEY`, through `GET /v2/integrations/mistwarp/orgs/:name` (the organisation and every member with their permissions, including members who are not listed publicly) and `GET /v2/integrations/mistwarp/users/:id/orgs` (a person's organisations). On Rotur's side that key is the `mistwarp` entry of its `COMMERCE_SERVICE_KEYS`. Rotur leaves out members who cannot sign in (banned, suspended or age-restricted), so they stop publishing for the organisation. Answers are cached for a minute. When Rotur cannot be reached, creating for an organisation, editing its projects and moving content into or out of it answer 503 `rotur_unavailable` instead of refusing. That includes a move to an account whose Rotur profile says it is an organisation but whose members cannot be read. Other actions on an organisation's content are refused until Rotur answers again. +MistWarp asks Rotur who is in an organisation with `COMMERCE_SERVICE_KEY`, through `GET /v2/integrations/mistwarp/orgs/:name` (the organisation and every member with their permissions, including members who are not listed publicly) and `GET /v2/integrations/mistwarp/users/:id/orgs` (a person's organisations). On Rotur's side that key is the `mistwarp` entry of its `COMMERCE_SERVICE_KEYS`. Rotur leaves out members who cannot sign in (banned, suspended or age-restricted), so they stop publishing for the organisation. Answers are cached for a minute. When Rotur cannot be reached, creating for an organisation, editing its projects and moving content into or out of it answer 503 `rotur_unavailable` instead of refusing. That includes a move to an account whose Rotur profile says it is an organisation when its members cannot be read. If Rotur says that organisation cannot act (it is banned, suspended or age-restricted), the move is refused with 403 `org_unavailable`. Other actions on an organisation's content are refused until Rotur answers again. Creating for an organisation can be refused with `code`: `org_not_found` (400, the name is not an organisation), `org_forbidden` (403, the person does not publish for it) or `rotur_unavailable` (503). From 8d8c16cf3a99e3b609b106859fe08ede9cfee182 Mon Sep 17 00:00:00 2001 From: Mistium <92952823+Mistium@users.noreply.github.com> Date: Sat, 28 Nov 2026 03:20:10 +0000 Subject: [PATCH 08/12] Document rating guards during a Rotur outage and purchase notifications --- docs/backend/community.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/backend/community.md b/docs/backend/community.md index aebe493f..7717c530 100644 --- a/docs/backend/community.md +++ b/docs/backend/community.md @@ -46,7 +46,7 @@ Content an organisation owns uses the organisation's own Rotur plan for its limi Organisation content is looked up by the organisation's Rotur id, so renaming an organisation keeps its content and publishers. Before asking Rotur about an organisation, MistWarp checks the viewer's own organisation list, so pages with many organisations' spaces cost one Rotur request per viewer, not one per organisation. -MistWarp asks Rotur who is in an organisation with `COMMERCE_SERVICE_KEY`, through `GET /v2/integrations/mistwarp/orgs/:name` (the organisation and every member with their permissions, including members who are not listed publicly) and `GET /v2/integrations/mistwarp/users/:id/orgs` (a person's organisations). On Rotur's side that key is the `mistwarp` entry of its `COMMERCE_SERVICE_KEYS`. Rotur leaves out members who cannot sign in (banned, suspended or age-restricted), so they stop publishing for the organisation. Answers are cached for a minute. When Rotur cannot be reached, creating for an organisation, editing its projects and moving content into or out of it answer 503 `rotur_unavailable` instead of refusing. That includes a move to an account whose Rotur profile says it is an organisation when its members cannot be read. If Rotur says that organisation cannot act (it is banned, suspended or age-restricted), the move is refused with 403 `org_unavailable`. Other actions on an organisation's content are refused until Rotur answers again. +MistWarp asks Rotur who is in an organisation with `COMMERCE_SERVICE_KEY`, through `GET /v2/integrations/mistwarp/orgs/:name` (the organisation and every member with their permissions, including members who are not listed publicly) and `GET /v2/integrations/mistwarp/users/:id/orgs` (a person's organisations). On Rotur's side that key is the `mistwarp` entry of its `COMMERCE_SERVICE_KEYS`. Rotur leaves out members who cannot sign in (banned, suspended or age-restricted), so they stop publishing for the organisation. Answers are cached for a minute. When Rotur cannot be reached, creating for an organisation, editing its projects and moving content into or out of it answer 503 `rotur_unavailable` instead of refusing. That includes a move to an account whose Rotur profile says it is an organisation when its members cannot be read. If Rotur says that organisation cannot act (it is banned, suspended or age-restricted), the move is refused with 403 `org_unavailable`. Scoring, voting for or reviewing an organisation's content also answers 503 while MistWarp cannot tell whether the person publishes for it, so publishers cannot rate their own work during an outage. Other actions on an organisation's content are refused until Rotur answers again. Creating for an organisation can be refused with `code`: `org_not_found` (400, the name is not an organisation), `org_forbidden` (403, the person does not publish for it) or `rotur_unavailable` (503). @@ -55,7 +55,7 @@ Creating for an organisation can be refused with `code`: `org_not_found` (400, t | `GET /v1/orgs/:name` | `{org, members, projects, spaces, isMember, canManage}`. `projects` and `spaces` hold the 100 most recently edited. `members` lists only publicly listed members unless the viewer is a member or a site admin. Drafts and private spaces are included only for publishers | | `GET /v1/me/orgs` | `{orgs: [{username, displayName, perms, canPublish}]}` for the signed-in person | -Notifications about content an organisation owns (loves, comments, remixes, reviews, contributions, sales, challenge entries and moderation) go to each of its publishers, up to 25 of them. The same event about the same content is sent once every ten minutes, so toggling a love does not repeat it. When a publisher enters an organisation's project in a challenge, the publisher, not the organisation, is recorded as the participant. On a challenge an organisation owns, its publishers are judges as well as anyone invited. `judges` lists the publicly listed ones, and `judgeCount` counts all of them. +Notifications about content an organisation owns (loves, comments, remixes, reviews, contributions, sales, challenge entries and moderation) go to each of its publishers, up to 25 of them. The same event about the same content is sent once every ten minutes, so toggling a love does not repeat it. Sales are the exception: every purchase is sent. When a publisher enters an organisation's project in a challenge, the publisher, not the organisation, is recorded as the participant. On a challenge an organisation owns, its publishers are judges as well as anyone invited. `judges` lists the publicly listed ones, and `judgeCount` counts all of them. The Rotur groups integration (`/v1/groups/:tag` and the `groupTag` field) was removed. Organisations replace it. From bf75b54508e97f245cbee53e7029d0066cf95d70 Mon Sep 17 00:00:00 2001 From: Mistium <92952823+Mistium@users.noreply.github.com> Date: Sat, 28 Nov 2026 03:32:15 +0000 Subject: [PATCH 09/12] Say unlisted org spaces show only to publishers --- docs/backend/community.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/backend/community.md b/docs/backend/community.md index 7717c530..b53c8c96 100644 --- a/docs/backend/community.md +++ b/docs/backend/community.md @@ -52,7 +52,7 @@ Creating for an organisation can be refused with `code`: `org_not_found` (400, t | Route | What it returns | | --- | --- | -| `GET /v1/orgs/:name` | `{org, members, projects, spaces, isMember, canManage}`. `projects` and `spaces` hold the 100 most recently edited. `members` lists only publicly listed members unless the viewer is a member or a site admin. Drafts and private spaces are included only for publishers | +| `GET /v1/orgs/:name` | `{org, members, projects, spaces, isMember, canManage}`. `projects` and `spaces` hold the 100 most recently edited. `members` lists only publicly listed members unless the viewer is a member or a site admin. Unshared projects and unlisted or private spaces are included only for publishers | | `GET /v1/me/orgs` | `{orgs: [{username, displayName, perms, canPublish}]}` for the signed-in person | Notifications about content an organisation owns (loves, comments, remixes, reviews, contributions, sales, challenge entries and moderation) go to each of its publishers, up to 25 of them. The same event about the same content is sent once every ten minutes, so toggling a love does not repeat it. Sales are the exception: every purchase is sent. When a publisher enters an organisation's project in a challenge, the publisher, not the organisation, is recorded as the participant. On a challenge an organisation owns, its publishers are judges as well as anyone invited. `judges` lists the publicly listed ones, and `judgeCount` counts all of them. From 58eaae1821d17ca8aa47901c41b2bb212e4657ae Mon Sep 17 00:00:00 2001 From: Mistium <92952823+Mistium@users.noreply.github.com> Date: Sat, 28 Nov 2026 04:46:31 +0000 Subject: [PATCH 10/12] Note that leaving a challenge answers 503 during an outage --- docs/backend/community.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/backend/community.md b/docs/backend/community.md index b53c8c96..80b52151 100644 --- a/docs/backend/community.md +++ b/docs/backend/community.md @@ -46,7 +46,7 @@ Content an organisation owns uses the organisation's own Rotur plan for its limi Organisation content is looked up by the organisation's Rotur id, so renaming an organisation keeps its content and publishers. Before asking Rotur about an organisation, MistWarp checks the viewer's own organisation list, so pages with many organisations' spaces cost one Rotur request per viewer, not one per organisation. -MistWarp asks Rotur who is in an organisation with `COMMERCE_SERVICE_KEY`, through `GET /v2/integrations/mistwarp/orgs/:name` (the organisation and every member with their permissions, including members who are not listed publicly) and `GET /v2/integrations/mistwarp/users/:id/orgs` (a person's organisations). On Rotur's side that key is the `mistwarp` entry of its `COMMERCE_SERVICE_KEYS`. Rotur leaves out members who cannot sign in (banned, suspended or age-restricted), so they stop publishing for the organisation. Answers are cached for a minute. When Rotur cannot be reached, creating for an organisation, editing its projects and moving content into or out of it answer 503 `rotur_unavailable` instead of refusing. That includes a move to an account whose Rotur profile says it is an organisation when its members cannot be read. If Rotur says that organisation cannot act (it is banned, suspended or age-restricted), the move is refused with 403 `org_unavailable`. Scoring, voting for or reviewing an organisation's content also answers 503 while MistWarp cannot tell whether the person publishes for it, so publishers cannot rate their own work during an outage. Other actions on an organisation's content are refused until Rotur answers again. +MistWarp asks Rotur who is in an organisation with `COMMERCE_SERVICE_KEY`, through `GET /v2/integrations/mistwarp/orgs/:name` (the organisation and every member with their permissions, including members who are not listed publicly) and `GET /v2/integrations/mistwarp/users/:id/orgs` (a person's organisations). On Rotur's side that key is the `mistwarp` entry of its `COMMERCE_SERVICE_KEYS`. Rotur leaves out members who cannot sign in (banned, suspended or age-restricted), so they stop publishing for the organisation. Answers are cached for a minute. When Rotur cannot be reached, creating for an organisation, editing its projects and moving content into or out of it answer 503 `rotur_unavailable` instead of refusing. That includes a move to an account whose Rotur profile says it is an organisation when its members cannot be read. If Rotur says that organisation cannot act (it is banned, suspended or age-restricted), the move is refused with 403 `org_unavailable`. Scoring, voting for or reviewing an organisation's content also answers 503 while MistWarp cannot tell whether the person publishes for it, so publishers cannot rate their own work during an outage. Leaving a challenge after entering an organisation's project answers 503 the same way. Other actions on an organisation's content are refused until Rotur answers again. Creating for an organisation can be refused with `code`: `org_not_found` (400, the name is not an organisation), `org_forbidden` (403, the person does not publish for it) or `rotur_unavailable` (503). From f69c2f8cd492d0d80baffc06b2e211f16d8557d0 Mon Sep 17 00:00:00 2001 From: Mistium <92952823+Mistium@users.noreply.github.com> Date: Sat, 28 Nov 2026 04:53:12 +0000 Subject: [PATCH 11/12] Note that removing your own org entry answers 503 during an outage --- docs/backend/community.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/backend/community.md b/docs/backend/community.md index 80b52151..83c959f1 100644 --- a/docs/backend/community.md +++ b/docs/backend/community.md @@ -46,7 +46,7 @@ Content an organisation owns uses the organisation's own Rotur plan for its limi Organisation content is looked up by the organisation's Rotur id, so renaming an organisation keeps its content and publishers. Before asking Rotur about an organisation, MistWarp checks the viewer's own organisation list, so pages with many organisations' spaces cost one Rotur request per viewer, not one per organisation. -MistWarp asks Rotur who is in an organisation with `COMMERCE_SERVICE_KEY`, through `GET /v2/integrations/mistwarp/orgs/:name` (the organisation and every member with their permissions, including members who are not listed publicly) and `GET /v2/integrations/mistwarp/users/:id/orgs` (a person's organisations). On Rotur's side that key is the `mistwarp` entry of its `COMMERCE_SERVICE_KEYS`. Rotur leaves out members who cannot sign in (banned, suspended or age-restricted), so they stop publishing for the organisation. Answers are cached for a minute. When Rotur cannot be reached, creating for an organisation, editing its projects and moving content into or out of it answer 503 `rotur_unavailable` instead of refusing. That includes a move to an account whose Rotur profile says it is an organisation when its members cannot be read. If Rotur says that organisation cannot act (it is banned, suspended or age-restricted), the move is refused with 403 `org_unavailable`. Scoring, voting for or reviewing an organisation's content also answers 503 while MistWarp cannot tell whether the person publishes for it, so publishers cannot rate their own work during an outage. Leaving a challenge after entering an organisation's project answers 503 the same way. Other actions on an organisation's content are refused until Rotur answers again. +MistWarp asks Rotur who is in an organisation with `COMMERCE_SERVICE_KEY`, through `GET /v2/integrations/mistwarp/orgs/:name` (the organisation and every member with their permissions, including members who are not listed publicly) and `GET /v2/integrations/mistwarp/users/:id/orgs` (a person's organisations). On Rotur's side that key is the `mistwarp` entry of its `COMMERCE_SERVICE_KEYS`. Rotur leaves out members who cannot sign in (banned, suspended or age-restricted), so they stop publishing for the organisation. Answers are cached for a minute. When Rotur cannot be reached, creating for an organisation, editing its projects and moving content into or out of it answer 503 `rotur_unavailable` instead of refusing. That includes a move to an account whose Rotur profile says it is an organisation when its members cannot be read. If Rotur says that organisation cannot act (it is banned, suspended or age-restricted), the move is refused with 403 `org_unavailable`. Scoring, voting for or reviewing an organisation's content also answers 503 while MistWarp cannot tell whether the person publishes for it, so publishers cannot rate their own work during an outage. Leaving a challenge after entering an organisation's project, or removing that entry yourself, answers 503 the same way. Other actions on an organisation's content are refused until Rotur answers again. Creating for an organisation can be refused with `code`: `org_not_found` (400, the name is not an organisation), `org_forbidden` (403, the person does not publish for it) or `rotur_unavailable` (503). From bad3de22c52a5f07d0fdd8e655eade0041576719 Mon Sep 17 00:00:00 2001 From: Mistium <92952823+Mistium@users.noreply.github.com> Date: Sat, 28 Nov 2026 06:09:14 +0000 Subject: [PATCH 12/12] Document the space_changed and challenge_changed refusals --- docs/backend/community.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/backend/community.md b/docs/backend/community.md index 83c959f1..5e0b8ba3 100644 --- a/docs/backend/community.md +++ b/docs/backend/community.md @@ -46,7 +46,7 @@ Content an organisation owns uses the organisation's own Rotur plan for its limi Organisation content is looked up by the organisation's Rotur id, so renaming an organisation keeps its content and publishers. Before asking Rotur about an organisation, MistWarp checks the viewer's own organisation list, so pages with many organisations' spaces cost one Rotur request per viewer, not one per organisation. -MistWarp asks Rotur who is in an organisation with `COMMERCE_SERVICE_KEY`, through `GET /v2/integrations/mistwarp/orgs/:name` (the organisation and every member with their permissions, including members who are not listed publicly) and `GET /v2/integrations/mistwarp/users/:id/orgs` (a person's organisations). On Rotur's side that key is the `mistwarp` entry of its `COMMERCE_SERVICE_KEYS`. Rotur leaves out members who cannot sign in (banned, suspended or age-restricted), so they stop publishing for the organisation. Answers are cached for a minute. When Rotur cannot be reached, creating for an organisation, editing its projects and moving content into or out of it answer 503 `rotur_unavailable` instead of refusing. That includes a move to an account whose Rotur profile says it is an organisation when its members cannot be read. If Rotur says that organisation cannot act (it is banned, suspended or age-restricted), the move is refused with 403 `org_unavailable`. Scoring, voting for or reviewing an organisation's content also answers 503 while MistWarp cannot tell whether the person publishes for it, so publishers cannot rate their own work during an outage. Leaving a challenge after entering an organisation's project, or removing that entry yourself, answers 503 the same way. Other actions on an organisation's content are refused until Rotur answers again. +MistWarp asks Rotur who is in an organisation with `COMMERCE_SERVICE_KEY`, through `GET /v2/integrations/mistwarp/orgs/:name` (the organisation and every member with their permissions, including members who are not listed publicly) and `GET /v2/integrations/mistwarp/users/:id/orgs` (a person's organisations). On Rotur's side that key is the `mistwarp` entry of its `COMMERCE_SERVICE_KEYS`. Rotur leaves out members who cannot sign in (banned, suspended or age-restricted), so they stop publishing for the organisation. Answers are cached for a minute. When Rotur cannot be reached, creating for an organisation, editing its projects and moving content into or out of it answer 503 `rotur_unavailable` instead of refusing. That includes a move to an account whose Rotur profile says it is an organisation when its members cannot be read. If Rotur says that organisation cannot act (it is banned, suspended or age-restricted), the move is refused with 403 `org_unavailable`. Scoring, voting for or reviewing an organisation's content also answers 503 while MistWarp cannot tell whether the person publishes for it, so publishers cannot rate their own work during an outage. Leaving a challenge after entering an organisation's project, or removing that entry yourself, answers 503 the same way. Because these checks can wait on Rotur, space changes are saved against a fresh copy of the space: an edit answers 409 `space_changed` when the owner changed in the meantime, and scores, votes, joins, leaves and result publishing answer 409 `challenge_changed` when the challenge moved on (a new phase, a removed judge or changed criteria). Reload and try again. Other actions on an organisation's content are refused until Rotur answers again. Creating for an organisation can be refused with `code`: `org_not_found` (400, the name is not an organisation), `org_forbidden` (403, the person does not publish for it) or `rotur_unavailable` (503).