Initial provider-decoupling: registries, gateway adapters, workspace API, and provider packages#141
Open
Saluana wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
AuthWorkspaceStoreregistry (server/auth/store),ProviderTokenBroker(server/auth/token-broker),SyncGatewayAdapter(server/sync/gateway),StorageGatewayAdapter(server/storage/gateway), plus rate-limit/background-job/notification registries.AuthWorkspaceStoreand replaced direct Convex/Clerk calls with registry lookups and broker calls (server/auth/session.ts)./api/sync/*and/api/storage/*endpoints to dispatch to the configured gateway adapters instead of importing provider SDKs directly.WorkspaceApitypes and registry,useWorkspaceApi()composable, client gateway implementation, and SSR endpoints under/api/workspaces/*to back workspace CRUD and set-active flows./api/storage/*endpoints.packages/:or3-provider-clerk,or3-provider-convex,or3-provider-localfs, andor3-provider-sqliteimplementing provider-specific logic and registering adapters/plugins via Nitro/Nuxt runtime plugins.stringconfig fields and added a startup validation plugin (server/plugins/zz.provider-validation.ts) to enforce that configured providers are registered.app/pages/_tests.scripts/check-provider-imports.tsandpackage.jsonscriptcheck:provider-importsto detect banned imports in hot zones, andor3.providers.generated.ts(wizard hook) for module inclusion.Testing
scripts/check-provider-imports.tsandnpm/bunscriptcheck:provider-importsto detect banned provider imports in Nuxt hot zones; this check was added but not run here.bun install,bun run check:provider-imports,bun run test(Vitest), andbun run type-check(Nuxt typecheck). These were not executed in this change set.Codex Task