Skip to content

Conversation

@kingston
Copy link
Collaborator

@kingston kingston commented Jul 9, 2025

Summary by CodeRabbit

New Features

  • Introduced a new modular authentication system with support for both email/password and placeholder authentication plugins.
  • Added React hooks and components for authentication, session management, and role editing.
  • Implemented generators for authentication modules, routes, and session management for both backend and frontend.
  • Added new GraphQL queries and mutations for user login, registration, and session handling.
  • Enhanced plugin configuration UI and model merging in the project builder.

Bug Fixes

  • Fixed an issue where duplicate app IDs could be incorrectly reused during app creation.
  • Improved error formatting and validation handling in forms and API responses.

Refactor

  • Consolidated and modularized code generators and plugin initialization for authentication.
  • Migrated role editor forms to use lenses for improved form state management.
  • Updated model schemas and plugin exports for better consistency and extensibility.
  • Removed obsolete placeholder and Auth0-specific authentication hooks and components.

Chores

  • Upgraded react-hook-form and related dependencies to version 7.60.0 across multiple packages.
  • Updated configuration and metadata files for new plugins and generators.
  • Improved glob pattern support for file change detection in command filters.

Style

  • Adjusted UI alignment and button text for improved user experience in forms and dialogs.

@changeset-bot
Copy link

changeset-bot bot commented Jul 9, 2025

🦋 Changeset detected

Latest commit: cf73b74

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 17 packages
Name Type
@baseplate-dev/sync Patch
@baseplate-dev/plugin-auth Patch
@baseplate-dev/project-builder-web Patch
@baseplate-dev/react-generators Patch
@baseplate-dev/ui-components Patch
@baseplate-dev/core-generators Patch
@baseplate-dev/fastify-generators Patch
@baseplate-dev/project-builder-common Patch
@baseplate-dev/project-builder-lib Patch
@baseplate-dev/project-builder-server Patch
@baseplate-dev/project-builder-test Patch
@baseplate-dev/plugin-storage Patch
@baseplate-dev/project-builder-cli Patch
@baseplate-dev/code-morph Patch
@baseplate-dev/create-project Patch
@baseplate-dev/tools Patch
@baseplate-dev/utils Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link

coderabbitai bot commented Jul 9, 2025

Warning

Rate limit exceeded

@kingston has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 14 minutes and 8 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command 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 3107a1b and cf73b74.

⛔ Files ignored due to path filters (52)
  • packages/fastify-generators/src/generators/auth/password-hasher-service/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/auth/password-hasher-service/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/react-generators/src/generators/auth/placeholder-auth-hooks/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/react-generators/src/generators/auth/placeholder-auth-hooks/generated/template-paths.ts is excluded by !**/generated/**, !**/generated/**
  • packages/react-generators/src/generators/core/react-components/generated/ts-import-providers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/react-generators/src/generators/core/react-components/generated/typed-templates.ts is excluded by !**/generated/**, !**/generated/**
  • packages/react-generators/src/generators/core/react-error/generated/typed-templates.ts is excluded by !**/generated/**, !**/generated/**
  • packages/react-generators/src/generators/core/react-utils/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/react-generators/src/generators/core/react-utils/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth/core/generators/auth-email-password/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth/core/generators/auth-email-password/generated/template-paths.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth/core/generators/auth-email-password/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth/core/generators/auth-email-password/generated/ts-import-providers.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth/core/generators/auth-email-password/generated/typed-templates.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth/core/generators/auth-hooks/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth/core/generators/auth-hooks/generated/template-paths.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth/core/generators/auth-hooks/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth/core/generators/auth-hooks/generated/ts-import-providers.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth/core/generators/auth-hooks/generated/typed-templates.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth/core/generators/auth-module/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth/core/generators/auth-module/generated/template-paths.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth/core/generators/auth-module/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth/core/generators/auth-module/generated/ts-import-providers.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth/core/generators/auth-module/generated/typed-templates.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth/core/generators/auth-routes/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth/core/generators/auth-routes/generated/template-paths.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth/core/generators/auth-routes/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth/core/generators/auth-routes/generated/typed-templates.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth/core/generators/react-session/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth/core/generators/react-session/generated/template-paths.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth/core/generators/react-session/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth/core/generators/react-session/generated/ts-import-providers.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth/core/generators/react-session/generated/typed-templates.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth/generators/fastify/auth-module/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth/generators/fastify/auth-module/generated/ts-import-providers.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth0/generators/react/auth0-components/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth0/generators/react/auth0-components/generated/template-paths.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth0/generators/react/auth0-components/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth0/generators/react/auth0-components/generated/ts-import-providers.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth0/generators/react/auth0-components/generated/typed-templates.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/placeholder-auth/core/generators/placeholder-auth-hooks/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-paths.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/placeholder-auth/core/generators/placeholder-auth-hooks/generated/ts-import-providers.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/placeholder-auth/core/generators/placeholder-auth-module/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/placeholder-auth/core/generators/placeholder-auth-module/generated/template-paths.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/placeholder-auth/core/generators/placeholder-auth-module/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/placeholder-auth/core/generators/placeholder-auth-module/generated/ts-import-providers.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/placeholder-auth/core/generators/placeholder-auth-module/generated/typed-templates.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/placeholder-auth/static/icon.svg is excluded by !**/*.svg
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (153)
  • .changeset/all-goats-hammer.md (1 hunks)
  • .changeset/brave-parts-see.md (1 hunks)
  • .changeset/easy-donuts-smoke.md (1 hunks)
  • .changeset/plenty-actors-help.md (1 hunks)
  • package.json (1 hunks)
  • packages/fastify-generators/src/generators/auth/password-hasher-service/extractor.json (0 hunks)
  • packages/fastify-generators/src/generators/core/error-handler-service/templates/src/utils/zod.ts (1 hunks)
  • packages/fastify-generators/src/generators/pothos/pothos-prisma-find-query/pothos-prisma-find-query.generator.ts (1 hunks)
  • packages/project-builder-lib/package.json (1 hunks)
  • packages/project-builder-lib/src/definition/project-definition-container.ts (2 hunks)
  • packages/project-builder-lib/src/plugins/metadata/types.ts (1 hunks)
  • packages/project-builder-lib/src/references/extract-definition-refs.ts (1 hunks)
  • packages/project-builder-lib/src/references/extract-definition-refs.unit.test.ts (2 hunks)
  • packages/project-builder-lib/src/schema/creator/extend-parser-context-with-defaults.ts (1 hunks)
  • packages/project-builder-lib/src/schema/creator/schema-creator.ts (1 hunks)
  • packages/project-builder-lib/src/schema/creator/types.ts (4 hunks)
  • packages/project-builder-lib/src/schema/models/graphql.ts (1 hunks)
  • packages/project-builder-lib/src/tools/model-merger/model-merger.ts (3 hunks)
  • packages/project-builder-lib/src/tools/model-merger/model-merger.unit.test.ts (2 hunks)
  • packages/project-builder-server/src/compiler/backend/graphql.ts (5 hunks)
  • packages/project-builder-web/package.json (1 hunks)
  • packages/project-builder-web/src/components/blocker-dialog/blocker-dialog.tsx (1 hunks)
  • packages/project-builder-web/src/routes/apps/-components/new-app-dialog.tsx (3 hunks)
  • packages/project-builder-web/src/routes/data/models/edit.$key/-components/fields/model-field-form.tsx (1 hunks)
  • packages/project-builder-web/src/routes/plugins/index.tsx (1 hunks)
  • packages/project-builder-web/src/routes/settings/template-extractor.tsx (1 hunks)
  • packages/react-generators/src/constants/react-packages.ts (1 hunks)
  • packages/react-generators/src/generators/admin/admin-bull-board/admin-bull-board.generator.ts (1 hunks)
  • packages/react-generators/src/generators/admin/admin-crud-queries/admin-crud-queries.generator.ts (0 hunks)
  • packages/react-generators/src/generators/admin/admin-layout/admin-layout.generator.ts (2 hunks)
  • packages/react-generators/src/generators/apollo/react-apollo/react-apollo.generator.ts (1 hunks)
  • packages/react-generators/src/generators/auth/_providers/auth-components.ts (0 hunks)
  • packages/react-generators/src/generators/auth/_providers/index.ts (1 hunks)
  • packages/react-generators/src/generators/auth/_providers/providers.json (0 hunks)
  • packages/react-generators/src/generators/auth/_providers/react-auth-routes.ts (2 hunks)
  • packages/react-generators/src/generators/auth/auth-identify/auth-identify.generator.ts (2 hunks)
  • packages/react-generators/src/generators/auth/index.ts (0 hunks)
  • packages/react-generators/src/generators/auth/placeholder-auth-hooks/extractor.json (0 hunks)
  • packages/react-generators/src/generators/auth/placeholder-auth-hooks/placeholder-auth-hooks.generator.ts (0 hunks)
  • packages/react-generators/src/generators/auth/placeholder-auth-hooks/templates/src/hooks/useCurrentUser.ts (0 hunks)
  • packages/react-generators/src/generators/auth/placeholder-auth-hooks/templates/src/hooks/useLogOut.ts (0 hunks)
  • packages/react-generators/src/generators/auth/placeholder-auth-hooks/templates/src/hooks/useRequiredUserId.ts (0 hunks)
  • packages/react-generators/src/generators/core/react-components/extractor.json (1 hunks)
  • packages/react-generators/src/generators/core/react-error/extractor.json (1 hunks)
  • packages/react-generators/src/generators/core/react-error/react-error.generator.ts (2 hunks)
  • packages/react-generators/src/generators/core/react-error/templates/src/services/error-formatter.ts (1 hunks)
  • packages/sync/package.json (2 hunks)
  • packages/sync/src/output/post-write-commands/filter-commands.ts (2 hunks)
  • packages/sync/src/output/post-write-commands/filter-commands.unit.test.ts (1 hunks)
  • packages/sync/src/output/post-write-commands/types.ts (1 hunks)
  • packages/sync/src/runner/errors.ts (0 hunks)
  • packages/sync/src/runner/generator-runner.ts (2 hunks)
  • packages/sync/src/runner/index.ts (0 hunks)
  • packages/sync/src/utils/parse-generator-name.ts (1 hunks)
  • packages/sync/src/utils/parse-generator-name.unit.test.ts (1 hunks)
  • packages/ui-components/package.json (1 hunks)
  • packages/ui-components/src/components/form-action-bar/form-action-bar.tsx (3 hunks)
  • plugins/plugin-auth/manifest.json (1 hunks)
  • plugins/plugin-auth/package.json (1 hunks)
  • plugins/plugin-auth/src/auth/core/components/auth-definition-editor.tsx (3 hunks)
  • plugins/plugin-auth/src/auth/core/components/role-editor-form.tsx (0 hunks)
  • plugins/plugin-auth/src/auth/core/generators/auth-email-password/auth-email-password.generator.ts (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/auth-email-password/extractor.json (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/auth-email-password/index.ts (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/auth-email-password/templates/module/constants/password.constants.ts (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.ts (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/auth-email-password/templates/module/services/user-password.service.ts (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/auth-hooks/auth-hooks.generator.ts (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/auth-hooks/extractor.json (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/auth-hooks/index.ts (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.gql (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.ts (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.ts (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/auth-hooks/templates/src/hooks/use-session.ts (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/auth-hooks/templates/src/hooks/use-user-id-or-throw.ts (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/auth-module/auth-module.generator.ts (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/auth-module/extractor.json (4 hunks)
  • plugins/plugin-auth/src/auth/core/generators/auth-module/index.ts (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/auth-module/templates/module/schema/user-session-payload.object-type.ts (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/auth-module/templates/module/schema/user-session.mutations.ts (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/auth-module/templates/module/schema/user-session.queries.ts (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/auth-routes/auth-routes.generator.ts (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/auth-routes/extractor.json (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/auth-routes/index.ts (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/auth-routes/templates/routes/auth_/login.tsx (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/auth-routes/templates/routes/auth_/queries.gql (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/auth-routes/templates/routes/auth_/register.tsx (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/auth-routes/templates/routes/auth_/route.tsx (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/index.ts (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/react-auth/extractor.json (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/react-auth/index.ts (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/react-auth/react-auth.generator.ts (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/react-session/extractor.json (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/react-session/index.ts (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/react-session/react-session.generator.ts (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/react-session/templates/src/app/user-session-check.gql (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/react-session/templates/src/app/user-session-check.tsx (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/react-session/templates/src/app/user-session-provider.tsx (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/react-session/templates/src/hooks/use-user-session-client.ts (1 hunks)
  • plugins/plugin-auth/src/auth/core/generators/react-session/templates/src/services/user-session-client.ts (1 hunks)
  • plugins/plugin-auth/src/auth/core/index.ts (1 hunks)
  • plugins/plugin-auth/src/auth/core/node.ts (3 hunks)
  • plugins/plugin-auth/src/auth/core/schema/models.ts (4 hunks)
  • plugins/plugin-auth/src/auth/core/schema/plugin-definition.ts (1 hunks)
  • plugins/plugin-auth/src/auth/generators/fastify/auth-module/auth-module.generator.ts (0 hunks)
  • plugins/plugin-auth/src/auth/generators/fastify/auth-module/ts-extractor.json (0 hunks)
  • plugins/plugin-auth/src/auth/generators/fastify/index.ts (0 hunks)
  • plugins/plugin-auth/src/auth/generators/index.ts (0 hunks)
  • plugins/plugin-auth/src/auth/index.ts (1 hunks)
  • plugins/plugin-auth/src/auth0/core/components/auth-definition-editor.tsx (5 hunks)
  • plugins/plugin-auth/src/auth0/core/node.ts (2 hunks)
  • plugins/plugin-auth/src/auth0/core/schema/plugin-definition.ts (1 hunks)
  • plugins/plugin-auth/src/auth0/generators/react/auth0-components/auth0-components.generator.ts (0 hunks)
  • plugins/plugin-auth/src/auth0/generators/react/auth0-components/extractor.json (0 hunks)
  • plugins/plugin-auth/src/auth0/generators/react/auth0-components/index.ts (0 hunks)
  • plugins/plugin-auth/src/auth0/generators/react/auth0-components/templates/src/components/require-auth/require-auth.tsx (0 hunks)
  • plugins/plugin-auth/src/auth0/generators/react/auth0-components/ts-extractor.json (0 hunks)
  • plugins/plugin-auth/src/auth0/generators/react/auth0-hooks/auth0-hooks.generator.ts (0 hunks)
  • plugins/plugin-auth/src/auth0/generators/react/index.ts (0 hunks)
  • plugins/plugin-auth/src/auth0/generators/react/react-auth0/react-auth0.generator.ts (2 hunks)
  • plugins/plugin-auth/src/common/compiler/generator-creators.ts (1 hunks)
  • plugins/plugin-auth/src/common/compiler/index.ts (1 hunks)
  • plugins/plugin-auth/src/common/index.ts (1 hunks)
  • plugins/plugin-auth/src/common/roles/components/index.ts (1 hunks)
  • plugins/plugin-auth/src/common/roles/components/role-editor-form/role-dialog.tsx (1 hunks)
  • plugins/plugin-auth/src/common/roles/components/role-editor-form/role-editor-form.tsx (2 hunks)
  • plugins/plugin-auth/src/common/roles/index.ts (1 hunks)
  • plugins/plugin-auth/src/index.ts (1 hunks)
  • plugins/plugin-auth/src/placeholder-auth/core/common.ts (1 hunks)
  • plugins/plugin-auth/src/placeholder-auth/core/components/placeholder-auth-definition-editor.tsx (1 hunks)
  • plugins/plugin-auth/src/placeholder-auth/core/generators/index.ts (1 hunks)
  • plugins/plugin-auth/src/placeholder-auth/core/generators/placeholder-auth-hooks/extractor.json (1 hunks)
  • plugins/plugin-auth/src/placeholder-auth/core/generators/placeholder-auth-hooks/placeholder-auth-hooks.generator.ts (1 hunks)
  • plugins/plugin-auth/src/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.gql (1 hunks)
  • plugins/plugin-auth/src/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.ts (1 hunks)
  • plugins/plugin-auth/src/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-log-out.ts (1 hunks)
  • plugins/plugin-auth/src/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-session.ts (1 hunks)
  • plugins/plugin-auth/src/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-user-id-or-throw.ts (1 hunks)
  • plugins/plugin-auth/src/placeholder-auth/core/generators/placeholder-auth-module/auth-module.generator.ts (1 hunks)
  • plugins/plugin-auth/src/placeholder-auth/core/generators/placeholder-auth-module/extractor.json (1 hunks)
  • plugins/plugin-auth/src/placeholder-auth/core/generators/placeholder-auth-module/templates/module/services/user-session.service.ts (1 hunks)
  • plugins/plugin-auth/src/placeholder-auth/core/generators/placeholder-react-auth/index.ts (1 hunks)
  • plugins/plugin-auth/src/placeholder-auth/core/generators/placeholder-react-auth/react-auth.generator.ts (1 hunks)
  • plugins/plugin-auth/src/placeholder-auth/core/index.ts (1 hunks)
  • plugins/plugin-auth/src/placeholder-auth/core/node.ts (1 hunks)
  • plugins/plugin-auth/src/placeholder-auth/core/schema/models.ts (1 hunks)
  • plugins/plugin-auth/src/placeholder-auth/core/schema/plugin-definition.ts (1 hunks)
  • plugins/plugin-auth/src/placeholder-auth/core/web.ts (1 hunks)
  • plugins/plugin-auth/src/placeholder-auth/index.ts (1 hunks)
  • plugins/plugin-auth/src/placeholder-auth/metadata.json (1 hunks)
  • plugins/plugin-auth/src/utils/cn.ts (0 hunks)
  • plugins/plugin-storage/package.json (1 hunks)
  • plugins/plugin-storage/src/generators/react/upload-components/upload-components.generator.ts (0 hunks)

Walkthrough

This change introduces a comprehensive overhaul and expansion of authentication plugin infrastructure, including new generators, schemas, React hooks, and placeholder modules. The update adds first-class support for email/password authentication, centralized role editing with lenses, and a placeholder authentication system for extensibility and testing. Numerous files are refactored, removed, or reorganized to modularize generator logic, unify backend and web generator creation, and update model schemas. Several obsolete or duplicated files are deleted, and dependencies are updated across packages.

Changes

Files/Paths Change Summary
.changeset/*.md Added changeset files documenting patch updates for various packages and bug fixes.
package.json, packages/*/package.json, plugins/*/package.json Updated dependencies, notably upgrading react-hook-form to 7.60.0 and fixing lint-staged globs.
packages/fastify-generators/..., packages/project-builder-lib/..., packages/sync/... Enhanced error handling, schema default handling, improved glob pattern support, and added new test cases.
packages/project-builder-lib/src/plugins/metadata/types.ts Added hidden property to plugin metadata schema.
packages/project-builder-lib/src/tools/model-merger/model-merger.ts Improved null-safety, added doesModelMergerResultsHaveChanges utility.
packages/ui-components/src/components/form-action-bar/form-action-bar.tsx Added allowSaveWithoutDirty prop and improved button disabled logic.
packages/react-generators/... Updated generator logic, removed placeholder auth hooks, refactored provider usage, and updated exports.
plugins/plugin-auth/manifest.json, plugins/plugin-auth/src/index.ts Added placeholder-auth plugin to manifest and exports.
plugins/plugin-auth/src/auth/core/... Introduced new generators (auth-module, auth-hooks, auth-routes, react-auth, react-session), new schemas, and new React hooks for authentication.
plugins/plugin-auth/src/common/... Added generator creators for common backend/web generators and centralized role editor components.
plugins/plugin-auth/src/placeholder-auth/core/... Added placeholder authentication system with generators, web integration, and schema.
plugins/plugin-auth/src/auth0/core/..., plugins/plugin-auth/src/auth0/generators/react/... Refactored to use new common generator creators, removed obsolete Auth0 components, and updated role editor integration.
plugins/plugin-auth/src/utils/cn.ts, various obsolete generator/component files Deleted unused/obsolete utilities, generators, and configuration files.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant WebApp
    participant AuthPlugin (Core/Placeholder)
    participant Backend
    participant DB

    User->>WebApp: Accesses login/register page
    WebApp->>AuthPlugin: Renders AuthDefinitionEditor or PlaceholderAuthDefinitionEditor
    User->>WebApp: Submits credentials (email/password)
    WebApp->>Backend: Sends GraphQL mutation (login/register)
    Backend->>AuthPlugin: Calls auth service (create/authenticate user)
    AuthPlugin->>DB: Looks up or creates user/account/session
    DB-->>AuthPlugin: Returns user/session info
    AuthPlugin-->>Backend: Returns session payload
    Backend-->>WebApp: Returns mutation result (session info)
    WebApp->>AuthPlugin: Updates session via React hooks/context
    WebApp-->>User: Navigates or displays authenticated UI

    Note over AuthPlugin: PlaceholderAuth can be swapped for CoreAuth in this flow.
Loading
sequenceDiagram
    participant Developer
    participant ProjectBuilder
    participant PluginAuth
    participant GeneratorCreators

    Developer->>ProjectBuilder: Adds or configures auth plugin
    ProjectBuilder->>PluginAuth: Loads plugin metadata/schema
    PluginAuth->>GeneratorCreators: Uses common backend/web generator creators
    GeneratorCreators-->>PluginAuth: Returns generator bundles
    PluginAuth->>ProjectBuilder: Registers generators for codegen/build
    ProjectBuilder->>PluginAuth: Invokes generators for backend/web/admin apps
    PluginAuth-->>ProjectBuilder: Provides generated code/templates
Loading
sequenceDiagram
    participant User
    participant WebApp
    participant ReactHooks
    participant ApolloClient
    participant Backend

    User->>WebApp: Triggers useCurrentUser/useLogOut hooks
    WebApp->>ReactHooks: Calls useCurrentUser/useLogOut
    ReactHooks->>ApolloClient: Executes GraphQL query/mutation
    ApolloClient->>Backend: Sends query/mutation
    Backend-->>ApolloClient: Returns user/session data or mutation result
    ApolloClient-->>ReactHooks: Provides data/error/loading state
    ReactHooks-->>WebApp: Returns user info, triggers session update, or error
Loading
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@vercel
Copy link

vercel bot commented Jul 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
baseplate-project-builder-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 9, 2025 1:53pm

@socket-security
Copy link

socket-security bot commented Jul 9, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​types/​micromatch@​4.0.91001007377100
Added@​hookform/​lenses@​0.7.1791009991100
Addedreact-hook-form@​7.60.010010010095100

View full report

@kingston kingston merged commit a506e88 into main Jul 9, 2025
9 checks passed
@kingston kingston deleted the kingston/eng-766-add-ui-to-auth-plugin branch July 9, 2025 14:00
@github-actions github-actions bot mentioned this pull request Jul 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants