Feat: Organization & account keys
What does this PR do?
Implements UI to manage more types of keys
Test Plan
Manual QA
Related PRs and Issues
https://github.com/appwrite/appwrite/pull/10988
Have you read the Contributing Guidelines on issues?
Yes
Summary by CodeRabbit
Release Notes
-
New Features
- Added account integrations section with API key management.
- Added organization integrations section with key management (Applications and Installations coming soon).
- Extended key management system to support organization and account tokens in addition to API keys.
- Added keyboard shortcuts to navigate to integrations pages.
✏️ Tip: You can customize this high-level summary in your review settings.
Console (appwrite/console)
Project ID: 688b7bf400350cbd60e9
[!TIP] Preview deployments create instant URLs for every branch and commit
[!WARNING]
Rate limit exceeded
@Meldiron has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 27 minutes and 12 seconds before requesting another review.
⌛ How to resolve this issue?
After the wait time has elapsed, a review can be triggered using the
@coderabbitai reviewcommand as a PR comment. Alternatively, push new commits to this PR.We recommend that you space out your commits to avoid hitting the rate limit.
🚦 How do rate limits work?
CodeRabbit enforces hourly rate limits for each developer per organization.
Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.
Please see our FAQ for further information.
📥 Commits
Reviewing files that changed from the base of the PR and between 87a473ed06aa71a4a1e7d82fdb012b5670ee0bcd and 0c54a6fcc77aa75ce15e15ba400dcd6c425b8eb2.
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml📒 Files selected for processing (12)
package.jsonsrc/lib/actions/analytics.tssrc/lib/constants.tssrc/routes/(console)/account/integrations/tokens/[tokenId]/+page.sveltesrc/routes/(console)/account/integrations/tokens/[tokenId]/+page.tssrc/routes/(console)/organization-[organization]/header.sveltesrc/routes/(console)/organization-[organization]/integrations/keys/[keyId]/+page.sveltesrc/routes/(console)/organization-[organization]/integrations/keys/[keyId]/+page.tssrc/routes/(console)/project-[region]-[project]/overview/(components)/delete.sveltesrc/routes/(console)/project-[region]-[project]/overview/(components)/keyDetails.sveltesrc/routes/(console)/project-[region]-[project]/overview/(components)/table.sveltesrc/routes/(console)/project-[region]-[project]/overview/(components)/updateExpirationDate.svelte
Walkthrough
This PR extends the application to support organizational and account-level API keys alongside existing API keys. Changes include: updating the scopes data structure with a new type field ('api' | 'organization' | 'account') and adding corresponding scope entries; creating new routes and pages for account and organization integrations; refactoring key management components (create, delete, table) to handle multiple key types; updating navigation headers with integrations tabs; and modifying the scopes component to filter based on key type. The dependency @appwrite.io/console is also updated to a newer artifact version.
Estimated code review effort
🎯 4 (Complex) | ⏱️ ~50 minutes
-
Scopes data structure expansion: Review the new
typefield additions across scopes and cloudOnlyBackupScopes entries to ensure all entries are correctly classified and no values are missing. - create.svelte refactoring: Verify the type-specific key creation flows (createProjectKey, createOrganizationKey, createAccountKey) properly delegate to correct SDK methods, handle invalidation correctly, and navigate to appropriate routes for each type.
- table.svelte helper functions: Check that the new derived helper functions (canWrite, getLabel, getSlug, getColumns, etc.) correctly map behavior for all four key types and that conditional rendering (scopes, create button) uses correct predicates.
- deleteBatch.svelte deletion logic: Ensure deleteKey properly routes to the correct SDK endpoint for each key type and that postDeleteRedirect behaves correctly (API keys navigate; others are no-ops).
- scopes.svelte filtering: Verify the new type-based filtering pipeline correctly filters scope entries and that category computation dynamically derives from filtered scopes.
- Route consistency: Confirm that new routes (account/integrations, organization/integrations) properly load and pass data, and that navigation commands/tabs correctly enable/disable based on conditions.
- SDK integration: Verify all new SDK calls (sdk.forConsole.account.listKeys, sdk.forConsole.organizations.listKeys) are correctly invoked with proper parameters.
Pre-merge checks and finishing touches
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title 'Feat: Organization & account keys' accurately captures the main feature being implemented—support for managing organization and account key types alongside existing API keys. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
