Skip to content

Conversation

@kingston
Copy link
Collaborator

@kingston kingston commented Jul 24, 2025

Merge admin and web types for ease of generation

Summary by CodeRabbit

  • New Features

    • Unified web and admin application configuration, allowing admin features to be managed as part of web apps with enhanced schema validation and UI.
    • Added a comprehensive admin configuration editor for web apps, supporting enabling/disabling admin panels, path prefix customization, role-based access, and CRUD section management.
  • Bug Fixes

    • Improved handling of legacy admin app configurations to ensure smooth migration and backward compatibility during upgrades.
  • Refactor

    • Removed standalone admin app type and merged its functionality into the web app structure across configuration, schema, and compiler layers.
    • Updated route structures and UI to reflect the unified web/admin model, replacing admin-specific routes with web-based equivalents.
  • Chores

    • Updated and added migration scripts and tests to support the new unified configuration model.
    • Cleaned up unused code and removed obsolete admin app compiler and schema files.

@vercel
Copy link

vercel bot commented Jul 24, 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 24, 2025 7:23pm

@changeset-bot
Copy link

changeset-bot bot commented Jul 24, 2025

🦋 Changeset detected

Latest commit: 865c201

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/project-builder-lib Patch
@baseplate-dev/project-builder-cli Patch
@baseplate-dev/project-builder-common Patch
@baseplate-dev/project-builder-server Patch
@baseplate-dev/project-builder-test Patch
@baseplate-dev/project-builder-web Patch
@baseplate-dev/plugin-auth Patch
@baseplate-dev/plugin-storage Patch
@baseplate-dev/code-morph Patch
@baseplate-dev/core-generators Patch
@baseplate-dev/create-project Patch
@baseplate-dev/fastify-generators Patch
@baseplate-dev/react-generators Patch
@baseplate-dev/sync Patch
@baseplate-dev/tools Patch
@baseplate-dev/ui-components 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 24, 2025

Walkthrough

This change eliminates the standalone "admin" app type across the project, consolidating admin functionality into a new adminApp configuration nested within the "web" app type. It introduces a migration to convert existing admin apps into web apps with admin capabilities, refactors schemas and compilers, updates routes and UI, and removes all admin-specific files.

Changes

Files / Patterns Change Summary
.changeset/web-admin-config-migration.md Documents the migration for web admin configuration, describing admin app conversion and backward compatibility.
packages/project-builder-lib/src/migrations/index.ts,
.../migration-016-web-admin-config.ts,
.../migration-016-web-admin-config.unit.test.ts
Adds migration to convert admin apps to web apps with adminApp config, includes migration logic and tests, and registers the migration.
packages/project-builder-lib/src/schema/apps/admin/app.ts Deletes all admin app schema and types.
packages/project-builder-lib/src/schema/apps/index.ts,
.../web/admin/index.ts,
.../web/admin/admin.ts,
.../web/admin/sections/types.ts
Removes admin app exports, re-exports web admin types for compatibility, introduces new web admin section and app schemas, and updates import paths.
packages/project-builder-lib/src/schema/apps/web/index.ts,
.../web/web-app.ts
Removes local web app schema/types, re-exports from new module defining web app schema with nested adminApp config.
packages/project-builder-lib/src/schema/project-definition.ts Removes admin app schema from app union.
packages/project-builder-server/src/compiler/admin/index.ts Deletes admin app compiler logic.
packages/project-builder-server/src/compiler/app-entry-builder.ts Removes admin app entry builder type alias.
packages/project-builder-server/src/compiler/index.ts Removes support for compiling admin app type in main compiler.
packages/project-builder-server/src/compiler/web/admin/crud/displays.ts,
.../crud/index.ts,
.../crud/inputs.ts,
.../sections.ts
Updates all admin compiler functions to use WebAppConfig instead of AdminAppConfig, adjusts imports and function signatures.
packages/project-builder-server/src/compiler/web/admin/index.ts Adds new function to conditionally compile admin sections for web apps with admin enabled.
packages/project-builder-server/src/compiler/web/index.ts Adds logic to generate admin UI routes, navigation, and components within web app compiler, conditionally including admin features based on app config.
packages/project-builder-web/src/route-tree.gen.ts Renames and restructures all "admin" routes under /apps/edit/$key to "web" routes, updates all related imports, route definitions, interfaces, and types.
packages/project-builder-web/src/routes/apps/edit.$key/admin/index.tsx,
.../sections.$sectionKey.tsx,
.../sections.tsx
Deletes all admin app and admin section editor UI/routes.
packages/project-builder-web/src/routes/apps/edit.$key/index.ts Removes redirect logic for admin app type.
packages/project-builder-web/src/routes/apps/edit.$key/web.tsx Deletes old web app editor UI/route.
packages/project-builder-web/src/routes/apps/edit.$key/web/admin/-components/admin-crud-section-form.tsx Updates form types to use new web admin section config types.
packages/project-builder-web/src/routes/apps/edit.$key/web/admin/index.tsx Adds new admin config editor UI for web apps, including admin panel enable/disable, path, role access, and CRUD section management.
packages/project-builder-web/src/routes/apps/edit.$key/web/index.tsx Adds new web app general config editor UI/route.
packages/project-builder-web/src/routes/apps/edit.$key/web/route.tsx Replaces admin layout route with new web app layout, updates navigation tabs and route guards.
plugins/plugin-auth/src/auth/core/node.ts,
.../auth0/core/node.ts,
.../placeholder-auth/core/node.ts
Removes admin app compiler registration, merges admin generators into web app compiler registration.
plugins/plugin-storage/src/storage/core/node.ts Removes admin app compiler registration, updates web app compiler to check for adminApp?.enabled before adding upload components.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant WebAppEditorUI
    participant ProjectDefinition
    participant MigrationScript

    User->>WebAppEditorUI: Open web app editor
    WebAppEditorUI->>ProjectDefinition: Load app config
    alt If adminApp config present
        WebAppEditorUI->>User: Show admin panel settings and sections
        User->>WebAppEditorUI: Edit admin settings/sections
        WebAppEditorUI->>ProjectDefinition: Save updated config
    else
        WebAppEditorUI->>User: Show general web app settings
    end
Loading
sequenceDiagram
    participant MigrationRunner
    participant Migration016
    participant ProjectConfig

    MigrationRunner->>Migration016: Run migration
    Migration016->>ProjectConfig: For each app:
    alt If app.type == "admin"
        Migration016->>ProjectConfig: Convert to type "web", add adminApp config
    else if app.type == "web" and no adminApp
        Migration016->>ProjectConfig: Add adminApp config (disabled)
    end
    Migration016-->>MigrationRunner: Return migrated config
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~70 minutes

Possibly related PRs

  • halfdomelabs/baseplate#578: Refactors schema definitions to use a schema creator pattern with context-aware factory functions, including admin and web app schemas—this PR is closely related as it lays the groundwork for the schema migration and consolidation performed in the current change.

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch kingston/eng-707-merge-web-and-admin-types

🪧 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 generate unit tests to generate unit tests for 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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (1)
packages/project-builder-lib/src/schema/apps/web/admin/sections/types.ts (1)

3-3: Consider using absolute import paths for better maintainability.

While the relative path adjustment is correct for the new directory structure, consider using the absolute path alias for improved maintainability and consistency with the coding guidelines.

-import { appEntityType } from '../../../types.js';
+import { appEntityType } from '#src/schema/apps/types.js';
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e639251 and 865c201.

📒 Files selected for processing (35)
  • .changeset/web-admin-config-migration.md (1 hunks)
  • packages/project-builder-lib/src/migrations/index.ts (2 hunks)
  • packages/project-builder-lib/src/migrations/migration-016-web-admin-config.ts (1 hunks)
  • packages/project-builder-lib/src/migrations/migration-016-web-admin-config.unit.test.ts (1 hunks)
  • packages/project-builder-lib/src/schema/apps/admin/app.ts (0 hunks)
  • packages/project-builder-lib/src/schema/apps/index.ts (1 hunks)
  • packages/project-builder-lib/src/schema/apps/web/admin/admin.ts (1 hunks)
  • packages/project-builder-lib/src/schema/apps/web/admin/index.ts (1 hunks)
  • packages/project-builder-lib/src/schema/apps/web/admin/sections/types.ts (1 hunks)
  • packages/project-builder-lib/src/schema/apps/web/index.ts (1 hunks)
  • packages/project-builder-lib/src/schema/apps/web/web-app.ts (1 hunks)
  • packages/project-builder-lib/src/schema/project-definition.ts (0 hunks)
  • packages/project-builder-server/src/compiler/admin/index.ts (0 hunks)
  • packages/project-builder-server/src/compiler/app-entry-builder.ts (0 hunks)
  • packages/project-builder-server/src/compiler/index.ts (0 hunks)
  • packages/project-builder-server/src/compiler/web/admin/crud/displays.ts (4 hunks)
  • packages/project-builder-server/src/compiler/web/admin/crud/index.ts (3 hunks)
  • packages/project-builder-server/src/compiler/web/admin/crud/inputs.ts (2 hunks)
  • packages/project-builder-server/src/compiler/web/admin/index.ts (1 hunks)
  • packages/project-builder-server/src/compiler/web/admin/sections.ts (3 hunks)
  • packages/project-builder-server/src/compiler/web/index.ts (3 hunks)
  • packages/project-builder-web/src/route-tree.gen.ts (13 hunks)
  • packages/project-builder-web/src/routes/apps/edit.$key/admin/index.tsx (0 hunks)
  • packages/project-builder-web/src/routes/apps/edit.$key/admin/sections.$sectionKey.tsx (0 hunks)
  • packages/project-builder-web/src/routes/apps/edit.$key/admin/sections.tsx (0 hunks)
  • packages/project-builder-web/src/routes/apps/edit.$key/index.ts (0 hunks)
  • packages/project-builder-web/src/routes/apps/edit.$key/web.tsx (0 hunks)
  • packages/project-builder-web/src/routes/apps/edit.$key/web/admin/-components/admin-crud-section-form.tsx (2 hunks)
  • packages/project-builder-web/src/routes/apps/edit.$key/web/admin/index.tsx (1 hunks)
  • packages/project-builder-web/src/routes/apps/edit.$key/web/index.tsx (1 hunks)
  • packages/project-builder-web/src/routes/apps/edit.$key/web/route.tsx (2 hunks)
  • plugins/plugin-auth/src/auth/core/node.ts (1 hunks)
  • plugins/plugin-auth/src/auth0/core/node.ts (1 hunks)
  • plugins/plugin-auth/src/placeholder-auth/core/node.ts (1 hunks)
  • plugins/plugin-storage/src/storage/core/node.ts (1 hunks)
💤 Files with no reviewable changes (10)
  • packages/project-builder-lib/src/schema/project-definition.ts
  • packages/project-builder-server/src/compiler/app-entry-builder.ts
  • packages/project-builder-web/src/routes/apps/edit.$key/index.ts
  • packages/project-builder-lib/src/schema/apps/admin/app.ts
  • packages/project-builder-server/src/compiler/index.ts
  • packages/project-builder-web/src/routes/apps/edit.$key/admin/sections.tsx
  • packages/project-builder-web/src/routes/apps/edit.$key/web.tsx
  • packages/project-builder-web/src/routes/apps/edit.$key/admin/sections.$sectionKey.tsx
  • packages/project-builder-web/src/routes/apps/edit.$key/admin/index.tsx
  • packages/project-builder-server/src/compiler/admin/index.ts
🧰 Additional context used
📓 Path-based instructions (13)
**/*.{ts,tsx}

📄 CodeRabbit Inference Engine (CLAUDE.md)

**/*.{ts,tsx}: Import UI components from the @baseplate-dev/ui-components package as shown in the provided examples.
Use both standalone and React Hook Form controller variants for form components from @baseplate-dev/ui-components as appropriate.
If a particular interface or type is not exported, change the file so it is exported.

**/*.{ts,tsx}: TypeScript with strict type checking
Always include return types on top-level functions including React components (React.ReactElement)
Include absolute paths in import statements via tsconfig paths (@src/ is the alias for src/)
If a particular interface or type is not exported, change the file so it is exported

Files:

  • packages/project-builder-lib/src/schema/apps/web/admin/sections/types.ts
  • packages/project-builder-lib/src/schema/apps/index.ts
  • packages/project-builder-lib/src/schema/apps/web/admin/index.ts
  • plugins/plugin-auth/src/placeholder-auth/core/node.ts
  • plugins/plugin-auth/src/auth/core/node.ts
  • plugins/plugin-storage/src/storage/core/node.ts
  • packages/project-builder-lib/src/schema/apps/web/index.ts
  • packages/project-builder-server/src/compiler/web/index.ts
  • packages/project-builder-server/src/compiler/web/admin/crud/index.ts
  • packages/project-builder-web/src/routes/apps/edit.$key/web/admin/-components/admin-crud-section-form.tsx
  • packages/project-builder-lib/src/schema/apps/web/web-app.ts
  • plugins/plugin-auth/src/auth0/core/node.ts
  • packages/project-builder-lib/src/migrations/migration-016-web-admin-config.unit.test.ts
  • packages/project-builder-lib/src/schema/apps/web/admin/admin.ts
  • packages/project-builder-lib/src/migrations/migration-016-web-admin-config.ts
  • packages/project-builder-server/src/compiler/web/admin/crud/inputs.ts
  • packages/project-builder-web/src/routes/apps/edit.$key/web/route.tsx
  • packages/project-builder-lib/src/migrations/index.ts
  • packages/project-builder-server/src/compiler/web/admin/sections.ts
  • packages/project-builder-web/src/routes/apps/edit.$key/web/index.tsx
  • packages/project-builder-server/src/compiler/web/admin/crud/displays.ts
  • packages/project-builder-server/src/compiler/web/admin/index.ts
  • packages/project-builder-web/src/routes/apps/edit.$key/web/admin/index.tsx
  • packages/project-builder-web/src/route-tree.gen.ts
**/*.{js,ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/code-style.mdc)

Node 16 module resolution - include file extensions in imports (.js)

Files:

  • packages/project-builder-lib/src/schema/apps/web/admin/sections/types.ts
  • packages/project-builder-lib/src/schema/apps/index.ts
  • packages/project-builder-lib/src/schema/apps/web/admin/index.ts
  • plugins/plugin-auth/src/placeholder-auth/core/node.ts
  • plugins/plugin-auth/src/auth/core/node.ts
  • plugins/plugin-storage/src/storage/core/node.ts
  • packages/project-builder-lib/src/schema/apps/web/index.ts
  • packages/project-builder-server/src/compiler/web/index.ts
  • packages/project-builder-server/src/compiler/web/admin/crud/index.ts
  • packages/project-builder-web/src/routes/apps/edit.$key/web/admin/-components/admin-crud-section-form.tsx
  • packages/project-builder-lib/src/schema/apps/web/web-app.ts
  • plugins/plugin-auth/src/auth0/core/node.ts
  • packages/project-builder-lib/src/migrations/migration-016-web-admin-config.unit.test.ts
  • packages/project-builder-lib/src/schema/apps/web/admin/admin.ts
  • packages/project-builder-lib/src/migrations/migration-016-web-admin-config.ts
  • packages/project-builder-server/src/compiler/web/admin/crud/inputs.ts
  • packages/project-builder-web/src/routes/apps/edit.$key/web/route.tsx
  • packages/project-builder-lib/src/migrations/index.ts
  • packages/project-builder-server/src/compiler/web/admin/sections.ts
  • packages/project-builder-web/src/routes/apps/edit.$key/web/index.tsx
  • packages/project-builder-server/src/compiler/web/admin/crud/displays.ts
  • packages/project-builder-server/src/compiler/web/admin/index.ts
  • packages/project-builder-web/src/routes/apps/edit.$key/web/admin/index.tsx
  • packages/project-builder-web/src/route-tree.gen.ts
**/*.{ts,tsx,js}

📄 CodeRabbit Inference Engine (.cursor/rules/code-style.mdc)

**/*.{ts,tsx,js}: Sort imports by group: external libs first, then local imports
Use camelCase for variables/functions, PascalCase for types/classes
Order functions such that functions are placed below the variables/functions they use
We use the prefer using nullish coalescing operator (??) ESLint rule instead of a logical or (||), as it is a safer operator
Use console.info/warn/error instead of console.log

Files:

  • packages/project-builder-lib/src/schema/apps/web/admin/sections/types.ts
  • packages/project-builder-lib/src/schema/apps/index.ts
  • packages/project-builder-lib/src/schema/apps/web/admin/index.ts
  • plugins/plugin-auth/src/placeholder-auth/core/node.ts
  • plugins/plugin-auth/src/auth/core/node.ts
  • plugins/plugin-storage/src/storage/core/node.ts
  • packages/project-builder-lib/src/schema/apps/web/index.ts
  • packages/project-builder-server/src/compiler/web/index.ts
  • packages/project-builder-server/src/compiler/web/admin/crud/index.ts
  • packages/project-builder-web/src/routes/apps/edit.$key/web/admin/-components/admin-crud-section-form.tsx
  • packages/project-builder-lib/src/schema/apps/web/web-app.ts
  • plugins/plugin-auth/src/auth0/core/node.ts
  • packages/project-builder-lib/src/migrations/migration-016-web-admin-config.unit.test.ts
  • packages/project-builder-lib/src/schema/apps/web/admin/admin.ts
  • packages/project-builder-lib/src/migrations/migration-016-web-admin-config.ts
  • packages/project-builder-server/src/compiler/web/admin/crud/inputs.ts
  • packages/project-builder-web/src/routes/apps/edit.$key/web/route.tsx
  • packages/project-builder-lib/src/migrations/index.ts
  • packages/project-builder-server/src/compiler/web/admin/sections.ts
  • packages/project-builder-web/src/routes/apps/edit.$key/web/index.tsx
  • packages/project-builder-server/src/compiler/web/admin/crud/displays.ts
  • packages/project-builder-server/src/compiler/web/admin/index.ts
  • packages/project-builder-web/src/routes/apps/edit.$key/web/admin/index.tsx
  • packages/project-builder-web/src/route-tree.gen.ts
**/*

📄 CodeRabbit Inference Engine (.cursor/rules/code-style.mdc)

Use kebab-case for file names

Files:

  • packages/project-builder-lib/src/schema/apps/web/admin/sections/types.ts
  • packages/project-builder-lib/src/schema/apps/index.ts
  • packages/project-builder-lib/src/schema/apps/web/admin/index.ts
  • plugins/plugin-auth/src/placeholder-auth/core/node.ts
  • plugins/plugin-auth/src/auth/core/node.ts
  • plugins/plugin-storage/src/storage/core/node.ts
  • packages/project-builder-lib/src/schema/apps/web/index.ts
  • packages/project-builder-server/src/compiler/web/index.ts
  • packages/project-builder-server/src/compiler/web/admin/crud/index.ts
  • packages/project-builder-web/src/routes/apps/edit.$key/web/admin/-components/admin-crud-section-form.tsx
  • packages/project-builder-lib/src/schema/apps/web/web-app.ts
  • plugins/plugin-auth/src/auth0/core/node.ts
  • packages/project-builder-lib/src/migrations/migration-016-web-admin-config.unit.test.ts
  • packages/project-builder-lib/src/schema/apps/web/admin/admin.ts
  • packages/project-builder-lib/src/migrations/migration-016-web-admin-config.ts
  • packages/project-builder-server/src/compiler/web/admin/crud/inputs.ts
  • packages/project-builder-web/src/routes/apps/edit.$key/web/route.tsx
  • packages/project-builder-lib/src/migrations/index.ts
  • packages/project-builder-server/src/compiler/web/admin/sections.ts
  • packages/project-builder-web/src/routes/apps/edit.$key/web/index.tsx
  • packages/project-builder-server/src/compiler/web/admin/crud/displays.ts
  • packages/project-builder-server/src/compiler/web/admin/index.ts
  • packages/project-builder-web/src/routes/apps/edit.$key/web/admin/index.tsx
  • packages/project-builder-web/src/route-tree.gen.ts
.changeset/*.md

📄 CodeRabbit Inference Engine (CLAUDE.md)

When adding a new feature or changing an existing feature, add a new Changeset in the .changeset/ directory in the specified markdown format.

Files:

  • .changeset/web-admin-config-migration.md
**/index.{ts,tsx,js}

📄 CodeRabbit Inference Engine (.cursor/rules/code-style.mdc)

Prefer barrel exports e.g. export * from './foo.js' instead of individual named exports

Files:

  • packages/project-builder-lib/src/schema/apps/index.ts
  • packages/project-builder-lib/src/schema/apps/web/admin/index.ts
  • packages/project-builder-lib/src/schema/apps/web/index.ts
  • packages/project-builder-server/src/compiler/web/index.ts
  • packages/project-builder-server/src/compiler/web/admin/crud/index.ts
  • packages/project-builder-lib/src/migrations/index.ts
  • packages/project-builder-web/src/routes/apps/edit.$key/web/index.tsx
  • packages/project-builder-server/src/compiler/web/admin/index.ts
  • packages/project-builder-web/src/routes/apps/edit.$key/web/admin/index.tsx
**/*.tsx

📄 CodeRabbit Inference Engine (CLAUDE.md)

**/*.tsx: When using form components, integrate them with React Hook Form by passing the control prop from useForm().
Use layout components such as SidebarLayout, Card, and Breadcrumb from @baseplate-dev/ui-components to structure pages as shown in the example.
Use interactive dialog components like Dialog, ConfirmDialog, and useConfirmDialog from @baseplate-dev/ui-components for modal interactions.

Files:

  • packages/project-builder-web/src/routes/apps/edit.$key/web/admin/-components/admin-crud-section-form.tsx
  • packages/project-builder-web/src/routes/apps/edit.$key/web/route.tsx
  • packages/project-builder-web/src/routes/apps/edit.$key/web/index.tsx
  • packages/project-builder-web/src/routes/apps/edit.$key/web/admin/index.tsx
{packages/project-builder-web/**,packages/ui-components/**}/*.tsx

📄 CodeRabbit Inference Engine (.cursor/rules/ui-rules.mdc)

{packages/project-builder-web/**,packages/ui-components/**}/*.tsx: Use ShadCN-based components from @baseplate-dev/ui-components and always prefer these components over creating custom ones
Use Tailwind CSS utilities exclusively for styling; avoid writing custom CSS classes and use Tailwind's utility classes for all styling needs
In plugins, prefix all Tailwind classes with the plugin name (e.g., auth-, storage-)
Use icons from react-icons/md (Material Design icons) and import them like import { MdAdd, MdDelete } from 'react-icons/md'; avoid using other icon libraries

Files:

  • packages/project-builder-web/src/routes/apps/edit.$key/web/admin/-components/admin-crud-section-form.tsx
  • packages/project-builder-web/src/routes/apps/edit.$key/web/route.tsx
  • packages/project-builder-web/src/routes/apps/edit.$key/web/index.tsx
  • packages/project-builder-web/src/routes/apps/edit.$key/web/admin/index.tsx
**/*.{unit,int}.test.ts

📄 CodeRabbit Inference Engine (.cursor/rules/code-style.mdc)

Unit tests use .unit.test.ts suffix, integration tests use .int.test.ts

Files:

  • packages/project-builder-lib/src/migrations/migration-016-web-admin-config.unit.test.ts
**/*.test.ts

📄 CodeRabbit Inference Engine (.cursor/rules/code-style.mdc)

Always import vitest globals explicitly (describe, it, expect)

Files:

  • packages/project-builder-lib/src/migrations/migration-016-web-admin-config.unit.test.ts
**/*.test.{ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/testing.mdc)

**/*.test.{ts,tsx}: Use descriptive test names that explain what is being tested
Structure tests with clear setup, execution, and verification phases (Arrange-Act-Assert)
Always mock external API calls and file system operations in tests
Each test should be independent and not rely on others
Leverage TypeScript for type-safe mocking in tests
Focus on testing public methods and behaviors, not implementation details
Each test should verify one specific behavior to keep tests simple
For file system operations in tests, use memfs and mock 'node:fs' and 'node:fs/promises'
When using globby in tests, pass the mocked fs adapter

Files:

  • packages/project-builder-lib/src/migrations/migration-016-web-admin-config.unit.test.ts
**/*.{test,test-helper}.{ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/testing.mdc)

Extract repeated logic into reusable helper functions

Files:

  • packages/project-builder-lib/src/migrations/migration-016-web-admin-config.unit.test.ts
**/*.unit.test.ts

📄 CodeRabbit Inference Engine (.cursor/rules/testing.mdc)

Unit tests are colocated with source files using .unit.test.ts suffix

Files:

  • packages/project-builder-lib/src/migrations/migration-016-web-admin-config.unit.test.ts
🧠 Learnings (23)
packages/project-builder-lib/src/schema/apps/web/admin/sections/types.ts (10)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{ts,tsx} : Include absolute paths in import statements via tsconfig paths (@src/ is the alias for src/)

Learnt from: kingston
PR: #609
File: packages/ui-components/src/components/badge/badge-with-icon.stories.tsx:3-3
Timestamp: 2025-07-14T12:02:36.595Z
Learning: For TypeScript/TSX files: #src/ is the new path alias standard for src/ directory imports, replacing the previous @src/ convention.

Learnt from: kingston
PR: #505
File: packages/create-project/tsconfig.json:6-6
Timestamp: 2025-04-21T06:32:22.476Z
Learning: Since TypeScript 4.1, baseUrl is not required for paths mapping in tsconfig.json. Removing baseUrl and using explicit relative paths with "./" prefix (e.g., changing "@src/": ["src/"] to "@src/": ["./src/"]) prevents bare path imports from node_modules while maintaining path alias functionality.

Learnt from: kingston
PR: #505
File: packages/create-project/tsconfig.json:6-6
Timestamp: 2025-04-21T06:32:22.476Z
Learning: Since TypeScript 4.1, baseUrl is not required for paths mapping when using explicit relative paths (with "./"). Removing baseUrl from tsconfig.json while updating paths to use relative paths (e.g., changing "@src/": ["src/"] to "@src/": ["./src/"]) prevents bare path imports from node_modules while maintaining path alias functionality.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{js,ts,tsx} : Node 16 module resolution - include file extensions in imports (.js)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported

Learnt from: kingston
PR: #571
File: packages/core-generators/src/renderers/extractor/plugins/typed-templates-file.ts:102-106
Timestamp: 2025-06-11T18:31:22.247Z
Learning: For templateExtractorBarrelExportPlugin.addGeneratedBarrelExport, the generated barrel exports are written into generated/index.ts, therefore the moduleSpecifier must be specified relative to that file (e.g., ./typed-templates.js), not the project root.

Learnt from: kingston
PR: #521
File: packages/react-generators/src/generators/admin/admin-crud-edit/admin-crud-edit.generator.ts:90-94
Timestamp: 2025-05-05T06:36:50.687Z
Learning: In this codebase, import paths can include .ts extensions, and the resolveModuleSpecifier function will handle them appropriately. There's no need to strip file extensions before passing paths to functions like TsCodeUtils.importFragment.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{ts,tsx} : TypeScript with strict type checking

packages/project-builder-lib/src/schema/apps/index.ts (15)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/index.{ts,tsx,js} : Prefer barrel exports e.g. export * from './foo.js' instead of individual named exports

Learnt from: kingston
PR: #428
File: packages/project-builder-server/src/sync/index.ts:5-5
Timestamp: 2025-01-23T09:12:46.178Z
Learning: Avoid importing directly from 'dist' directories. Instead, expose functionality through the package's public API and import from the main package entry point.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use ShadCN-based components from @baseplate-dev/ui-components and always prefer these components over creating custom ones

Learnt from: kingston
PR: #505
File: packages/create-project/tsconfig.json:6-6
Timestamp: 2025-04-21T06:32:22.476Z
Learning: Since TypeScript 4.1, baseUrl is not required for paths mapping when using explicit relative paths (with "./"). Removing baseUrl from tsconfig.json while updating paths to use relative paths (e.g., changing "@src/": ["src/"] to "@src/": ["./src/"]) prevents bare path imports from node_modules while maintaining path alias functionality.

Learnt from: kingston
PR: #505
File: packages/create-project/tsconfig.json:6-6
Timestamp: 2025-04-21T06:32:22.476Z
Learning: Since TypeScript 4.1, baseUrl is not required for paths mapping in tsconfig.json. Removing baseUrl and using explicit relative paths with "./" prefix (e.g., changing "@src/": ["src/"] to "@src/": ["./src/"]) prevents bare path imports from node_modules while maintaining path alias functionality.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use icons from react-icons/md (Material Design icons) and import them like import { MdAdd, MdDelete } from 'react-icons/md'; avoid using other icon libraries

Learnt from: kingston
PR: #571
File: packages/core-generators/src/renderers/extractor/plugins/typed-templates-file.ts:102-106
Timestamp: 2025-06-11T18:31:22.247Z
Learning: For templateExtractorBarrelExportPlugin.addGeneratedBarrelExport, the generated barrel exports are written into generated/index.ts, therefore the moduleSpecifier must be specified relative to that file (e.g., ./typed-templates.js), not the project root.

Learnt from: kingston
PR: #609
File: packages/ui-components/src/components/badge/badge-with-icon.stories.tsx:3-3
Timestamp: 2025-07-14T12:02:36.595Z
Learning: For TypeScript/TSX files: #src/ is the new path alias standard for src/ directory imports, replacing the previous @src/ convention.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : Import UI components from the @baseplate-dev/ui-components package as shown in the provided examples.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/testing.mdc:0-0
Timestamp: 2025-07-22T09:11:16.930Z
Learning: Refactor code to be more easily testable, such as exporting types or functions

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{js,ts,tsx} : Node 16 module resolution - include file extensions in imports (.js)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : Use both standalone and React Hook Form controller variants for form components from @baseplate-dev/ui-components as appropriate.

Learnt from: kingston
PR: #539
File: scripts/check-changesets.ts:10-13
Timestamp: 2025-05-08T12:56:59.222Z
Learning: Node.js 22.0.0 and later versions include both glob and globSync functionality in the core node:fs module, making import { promises as fs, globSync } from 'node:fs'; valid syntax.

packages/project-builder-lib/src/schema/apps/web/admin/index.ts (15)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/index.{ts,tsx,js} : Prefer barrel exports e.g. export * from './foo.js' instead of individual named exports

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use ShadCN-based components from @baseplate-dev/ui-components and always prefer these components over creating custom ones

Learnt from: kingston
PR: #428
File: packages/project-builder-server/src/sync/index.ts:5-5
Timestamp: 2025-01-23T09:12:46.178Z
Learning: Avoid importing directly from 'dist' directories. Instead, expose functionality through the package's public API and import from the main package entry point.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{ts,tsx} : Include absolute paths in import statements via tsconfig paths (@src/ is the alias for src/)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : In plugins, prefix all Tailwind classes with the plugin name (e.g., auth-, storage-)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use icons from react-icons/md (Material Design icons) and import them like import { MdAdd, MdDelete } from 'react-icons/md'; avoid using other icon libraries

Learnt from: kingston
PR: #571
File: packages/core-generators/src/renderers/extractor/plugins/typed-templates-file.ts:102-106
Timestamp: 2025-06-11T18:31:22.247Z
Learning: For templateExtractorBarrelExportPlugin.addGeneratedBarrelExport, the generated barrel exports are written into generated/index.ts, therefore the moduleSpecifier must be specified relative to that file (e.g., ./typed-templates.js), not the project root.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use Tailwind CSS utilities exclusively for styling; avoid writing custom CSS classes and use Tailwind's utility classes for all styling needs

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : Import UI components from the @baseplate-dev/ui-components package as shown in the provided examples.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{js,ts,tsx} : Node 16 module resolution - include file extensions in imports (.js)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{ts,tsx,js} : Sort imports by group: external libs first, then local imports

Learnt from: kingston
PR: #613
File: packages/react-generators/src/generators/core/react-components/templates/components/ui/circular-progress/circular-progress.tsx:0-0
Timestamp: 2025-07-16T17:15:56.714Z
Learning: For imports starting with $ (template aliases), do not require .js extensions as these are resolved differently during the generation process, unlike regular file imports which require explicit .js extensions under Node 16 module resolution.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/testing.mdc:0-0
Timestamp: 2025-07-22T09:11:16.930Z
Learning: Refactor code to be more easily testable, such as exporting types or functions

plugins/plugin-auth/src/placeholder-auth/core/node.ts (9)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : In plugins, prefix all Tailwind classes with the plugin name (e.g., auth-, storage-)

Learnt from: kingston
PR: #505
File: packages/create-project/tsconfig.json:6-6
Timestamp: 2025-04-21T06:32:22.476Z
Learning: Since TypeScript 4.1, baseUrl is not required for paths mapping in tsconfig.json. Removing baseUrl and using explicit relative paths with "./" prefix (e.g., changing "@src/": ["src/"] to "@src/": ["./src/"]) prevents bare path imports from node_modules while maintaining path alias functionality.

Learnt from: kingston
PR: #505
File: packages/create-project/tsconfig.json:6-6
Timestamp: 2025-04-21T06:32:22.476Z
Learning: Since TypeScript 4.1, baseUrl is not required for paths mapping when using explicit relative paths (with "./"). Removing baseUrl from tsconfig.json while updating paths to use relative paths (e.g., changing "@src/": ["src/"] to "@src/": ["./src/"]) prevents bare path imports from node_modules while maintaining path alias functionality.

Learnt from: kingston
PR: #428
File: packages/project-builder-server/src/sync/index.ts:5-5
Timestamp: 2025-01-23T09:12:46.178Z
Learning: Avoid importing directly from 'dist' directories. Instead, expose functionality through the package's public API and import from the main package entry point.

Learnt from: kingston
PR: #613
File: packages/react-generators/src/generators/core/react-components/templates/components/ui/circular-progress/circular-progress.tsx:0-0
Timestamp: 2025-07-16T17:15:56.714Z
Learning: For imports starting with $ (template aliases), do not require .js extensions as these are resolved differently during the generation process, unlike regular file imports which require explicit .js extensions under Node 16 module resolution.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use ShadCN-based components from @baseplate-dev/ui-components and always prefer these components over creating custom ones

Learnt from: kingston
PR: #609
File: packages/ui-components/src/components/badge/badge-with-icon.stories.tsx:3-3
Timestamp: 2025-07-14T12:02:36.595Z
Learning: For TypeScript/TSX files: #src/ is the new path alias standard for src/ directory imports, replacing the previous @src/ convention.

Learnt from: kingston
PR: #521
File: packages/react-generators/src/generators/admin/admin-crud-list/admin-crud-list.generator.ts:163-166
Timestamp: 2025-05-05T06:37:51.001Z
Learning: For certain templates in the codebase, the importMapProviders property is not explicitly required as the template extractor will automatically determine and infer the necessary import map providers.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : Import UI components from the @baseplate-dev/ui-components package as shown in the provided examples.

plugins/plugin-auth/src/auth/core/node.ts (12)

Learnt from: kingston
PR: #428
File: packages/project-builder-server/src/sync/index.ts:5-5
Timestamp: 2025-01-23T09:12:46.178Z
Learning: Avoid importing directly from 'dist' directories. Instead, expose functionality through the package's public API and import from the main package entry point.

Learnt from: kingston
PR: #613
File: packages/react-generators/src/generators/core/react-components/templates/components/ui/circular-progress/circular-progress.tsx:0-0
Timestamp: 2025-07-16T17:15:56.714Z
Learning: For imports starting with $ (template aliases), do not require .js extensions as these are resolved differently during the generation process, unlike regular file imports which require explicit .js extensions under Node 16 module resolution.

Learnt from: kingston
PR: #505
File: packages/create-project/tsconfig.json:6-6
Timestamp: 2025-04-21T06:32:22.476Z
Learning: Since TypeScript 4.1, baseUrl is not required for paths mapping in tsconfig.json. Removing baseUrl and using explicit relative paths with "./" prefix (e.g., changing "@src/": ["src/"] to "@src/": ["./src/"]) prevents bare path imports from node_modules while maintaining path alias functionality.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : In plugins, prefix all Tailwind classes with the plugin name (e.g., auth-, storage-)

Learnt from: kingston
PR: #505
File: packages/create-project/tsconfig.json:6-6
Timestamp: 2025-04-21T06:32:22.476Z
Learning: Since TypeScript 4.1, baseUrl is not required for paths mapping when using explicit relative paths (with "./"). Removing baseUrl from tsconfig.json while updating paths to use relative paths (e.g., changing "@src/": ["src/"] to "@src/": ["./src/"]) prevents bare path imports from node_modules while maintaining path alias functionality.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{js,ts,tsx} : Node 16 module resolution - include file extensions in imports (.js)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported.

Learnt from: kingston
PR: #521
File: packages/react-generators/src/generators/admin/admin-crud-list/admin-crud-list.generator.ts:163-166
Timestamp: 2025-05-05T06:37:51.001Z
Learning: For certain templates in the codebase, the importMapProviders property is not explicitly required as the template extractor will automatically determine and infer the necessary import map providers.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{ts,tsx} : Include absolute paths in import statements via tsconfig paths (@src/ is the alias for src/)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use ShadCN-based components from @baseplate-dev/ui-components and always prefer these components over creating custom ones

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : Import UI components from the @baseplate-dev/ui-components package as shown in the provided examples.

plugins/plugin-storage/src/storage/core/node.ts (13)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{js,ts,tsx} : Node 16 module resolution - include file extensions in imports (.js)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : In plugins, prefix all Tailwind classes with the plugin name (e.g., auth-, storage-)

Learnt from: kingston
PR: #505
File: packages/create-project/tsconfig.json:6-6
Timestamp: 2025-04-21T06:32:22.476Z
Learning: Since TypeScript 4.1, baseUrl is not required for paths mapping in tsconfig.json. Removing baseUrl and using explicit relative paths with "./" prefix (e.g., changing "@src/": ["src/"] to "@src/": ["./src/"]) prevents bare path imports from node_modules while maintaining path alias functionality.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported.

Learnt from: kingston
PR: #505
File: packages/create-project/tsconfig.json:6-6
Timestamp: 2025-04-21T06:32:22.476Z
Learning: Since TypeScript 4.1, baseUrl is not required for paths mapping when using explicit relative paths (with "./"). Removing baseUrl from tsconfig.json while updating paths to use relative paths (e.g., changing "@src/": ["src/"] to "@src/": ["./src/"]) prevents bare path imports from node_modules while maintaining path alias functionality.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported

Learnt from: kingston
PR: #613
File: packages/react-generators/src/generators/core/react-components/templates/components/ui/circular-progress/circular-progress.tsx:0-0
Timestamp: 2025-07-16T17:15:56.714Z
Learning: For imports starting with $ (template aliases), do not require .js extensions as these are resolved differently during the generation process, unlike regular file imports which require explicit .js extensions under Node 16 module resolution.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{ts,tsx} : TypeScript with strict type checking

Learnt from: kingston
PR: #562
File: plugins/plugin-auth/package.json:32-36
Timestamp: 2025-06-03T09:11:29.651Z
Learning: With TypeScript project references, TypeScript compilation is watched from the root level using "watch:tsc:root" script, so individual packages no longer need to include their "tsc:watch" scripts in their local "watch" commands. The local "tsc:watch" scripts are renamed from "watch:tsc" but are not meant to be run as part of the package's watch command since TypeScript watching is handled centrally at the workspace root.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{ts,tsx} : Include absolute paths in import statements via tsconfig paths (@src/ is the alias for src/)

Learnt from: kingston
PR: #428
File: packages/project-builder-server/src/sync/index.ts:5-5
Timestamp: 2025-01-23T09:12:46.178Z
Learning: Avoid importing directly from 'dist' directories. Instead, expose functionality through the package's public API and import from the main package entry point.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : Import UI components from the @baseplate-dev/ui-components package as shown in the provided examples.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use ShadCN-based components from @baseplate-dev/ui-components and always prefer these components over creating custom ones

packages/project-builder-lib/src/schema/apps/web/index.ts (10)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported

Learnt from: kingston
PR: #505
File: packages/create-project/tsconfig.json:6-6
Timestamp: 2025-04-21T06:32:22.476Z
Learning: Since TypeScript 4.1, baseUrl is not required for paths mapping in tsconfig.json. Removing baseUrl and using explicit relative paths with "./" prefix (e.g., changing "@src/": ["src/"] to "@src/": ["./src/"]) prevents bare path imports from node_modules while maintaining path alias functionality.

Learnt from: kingston
PR: #505
File: packages/create-project/tsconfig.json:6-6
Timestamp: 2025-04-21T06:32:22.476Z
Learning: Since TypeScript 4.1, baseUrl is not required for paths mapping when using explicit relative paths (with "./"). Removing baseUrl from tsconfig.json while updating paths to use relative paths (e.g., changing "@src/": ["src/"] to "@src/": ["./src/"]) prevents bare path imports from node_modules while maintaining path alias functionality.

Learnt from: kingston
PR: #428
File: packages/project-builder-server/src/sync/index.ts:5-5
Timestamp: 2025-01-23T09:12:46.178Z
Learning: Avoid importing directly from 'dist' directories. Instead, expose functionality through the package's public API and import from the main package entry point.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use ShadCN-based components from @baseplate-dev/ui-components and always prefer these components over creating custom ones

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/index.{ts,tsx,js} : Prefer barrel exports e.g. export * from './foo.js' instead of individual named exports

Learnt from: kingston
PR: #562
File: plugins/plugin-auth/package.json:32-36
Timestamp: 2025-06-03T09:11:29.651Z
Learning: With TypeScript project references, TypeScript compilation is watched from the root level using "watch:tsc:root" script, so individual packages no longer need to include their "tsc:watch" scripts in their local "watch" commands. The local "tsc:watch" scripts are renamed from "watch:tsc" but are not meant to be run as part of the package's watch command since TypeScript watching is handled centrally at the workspace root.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{js,ts,tsx} : Node 16 module resolution - include file extensions in imports (.js)

Learnt from: kingston
PR: #609
File: packages/ui-components/src/components/badge/badge-with-icon.stories.tsx:3-3
Timestamp: 2025-07-14T12:02:36.595Z
Learning: For TypeScript/TSX files: #src/ is the new path alias standard for src/ directory imports, replacing the previous @src/ convention.

packages/project-builder-server/src/compiler/web/index.ts (10)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use ShadCN-based components from @baseplate-dev/ui-components and always prefer these components over creating custom ones

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : In plugins, prefix all Tailwind classes with the plugin name (e.g., auth-, storage-)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use icons from react-icons/md (Material Design icons) and import them like import { MdAdd, MdDelete } from 'react-icons/md'; avoid using other icon libraries

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use Tailwind CSS utilities exclusively for styling; avoid writing custom CSS classes and use Tailwind's utility classes for all styling needs

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{ts,tsx} : Include absolute paths in import statements via tsconfig paths (@src/ is the alias for src/)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.tsx : Use layout components such as SidebarLayout, Card, and Breadcrumb from @baseplate-dev/ui-components to structure pages as shown in the example.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : Import UI components from the @baseplate-dev/ui-components package as shown in the provided examples.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : Use both standalone and React Hook Form controller variants for form components from @baseplate-dev/ui-components as appropriate.

Learnt from: kingston
PR: #606
File: plugins/plugin-auth/src/auth/core/generators/auth-apollo/auth-apollo.generator.ts:24-32
Timestamp: 2025-07-12T19:56:08.559Z
Learning: For generator functions and configuration object methods like those in createGeneratorTask, inferred return types are acceptable when the structure is clear from the implementation. ESLint rules handle enforcement of explicit return types where truly needed, so manual review for this is not necessary.

packages/project-builder-server/src/compiler/web/admin/crud/index.ts (10)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use ShadCN-based components from @baseplate-dev/ui-components and always prefer these components over creating custom ones

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : In plugins, prefix all Tailwind classes with the plugin name (e.g., auth-, storage-)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{ts,tsx} : TypeScript with strict type checking

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use Tailwind CSS utilities exclusively for styling; avoid writing custom CSS classes and use Tailwind's utility classes for all styling needs

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : Import UI components from the @baseplate-dev/ui-components package as shown in the provided examples.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : Use both standalone and React Hook Form controller variants for form components from @baseplate-dev/ui-components as appropriate.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.tsx : Use layout components such as SidebarLayout, Card, and Breadcrumb from @baseplate-dev/ui-components to structure pages as shown in the example.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use icons from react-icons/md (Material Design icons) and import them like import { MdAdd, MdDelete } from 'react-icons/md'; avoid using other icon libraries

packages/project-builder-web/src/routes/apps/edit.$key/web/admin/-components/admin-crud-section-form.tsx (9)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : Use both standalone and React Hook Form controller variants for form components from @baseplate-dev/ui-components as appropriate.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use ShadCN-based components from @baseplate-dev/ui-components and always prefer these components over creating custom ones

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use icons from react-icons/md (Material Design icons) and import them like import { MdAdd, MdDelete } from 'react-icons/md'; avoid using other icon libraries

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : In plugins, prefix all Tailwind classes with the plugin name (e.g., auth-, storage-)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.tsx : When using form components, integrate them with React Hook Form by passing the control prop from useForm().

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : Import UI components from the @baseplate-dev/ui-components package as shown in the provided examples.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use Tailwind CSS utilities exclusively for styling; avoid writing custom CSS classes and use Tailwind's utility classes for all styling needs

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.tsx : Use layout components such as SidebarLayout, Card, and Breadcrumb from @baseplate-dev/ui-components to structure pages as shown in the example.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.tsx : Use interactive dialog components like Dialog, ConfirmDialog, and useConfirmDialog from @baseplate-dev/ui-components for modal interactions.

packages/project-builder-lib/src/schema/apps/web/web-app.ts (3)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use ShadCN-based components from @baseplate-dev/ui-components and always prefer these components over creating custom ones

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : In plugins, prefix all Tailwind classes with the plugin name (e.g., auth-, storage-)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{ts,tsx} : TypeScript with strict type checking

plugins/plugin-auth/src/auth0/core/node.ts (11)

Learnt from: kingston
PR: #428
File: packages/project-builder-server/src/sync/index.ts:5-5
Timestamp: 2025-01-23T09:12:46.178Z
Learning: Avoid importing directly from 'dist' directories. Instead, expose functionality through the package's public API and import from the main package entry point.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : In plugins, prefix all Tailwind classes with the plugin name (e.g., auth-, storage-)

Learnt from: kingston
PR: #613
File: packages/react-generators/src/generators/core/react-components/templates/components/ui/circular-progress/circular-progress.tsx:0-0
Timestamp: 2025-07-16T17:15:56.714Z
Learning: For imports starting with $ (template aliases), do not require .js extensions as these are resolved differently during the generation process, unlike regular file imports which require explicit .js extensions under Node 16 module resolution.

Learnt from: kingston
PR: #505
File: packages/create-project/tsconfig.json:6-6
Timestamp: 2025-04-21T06:32:22.476Z
Learning: Since TypeScript 4.1, baseUrl is not required for paths mapping in tsconfig.json. Removing baseUrl and using explicit relative paths with "./" prefix (e.g., changing "@src/": ["src/"] to "@src/": ["./src/"]) prevents bare path imports from node_modules while maintaining path alias functionality.

Learnt from: kingston
PR: #505
File: packages/create-project/tsconfig.json:6-6
Timestamp: 2025-04-21T06:32:22.476Z
Learning: Since TypeScript 4.1, baseUrl is not required for paths mapping when using explicit relative paths (with "./"). Removing baseUrl from tsconfig.json while updating paths to use relative paths (e.g., changing "@src/": ["src/"] to "@src/": ["./src/"]) prevents bare path imports from node_modules while maintaining path alias functionality.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported.

Learnt from: kingston
PR: #521
File: packages/react-generators/src/generators/admin/admin-crud-list/admin-crud-list.generator.ts:163-166
Timestamp: 2025-05-05T06:37:51.001Z
Learning: For certain templates in the codebase, the importMapProviders property is not explicitly required as the template extractor will automatically determine and infer the necessary import map providers.

Learnt from: kingston
PR: #562
File: plugins/plugin-auth/package.json:32-36
Timestamp: 2025-06-03T09:11:29.651Z
Learning: With TypeScript project references, TypeScript compilation is watched from the root level using "watch:tsc:root" script, so individual packages no longer need to include their "tsc:watch" scripts in their local "watch" commands. The local "tsc:watch" scripts are renamed from "watch:tsc" but are not meant to be run as part of the package's watch command since TypeScript watching is handled centrally at the workspace root.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{js,ts,tsx} : Node 16 module resolution - include file extensions in imports (.js)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : Import UI components from the @baseplate-dev/ui-components package as shown in the provided examples.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use ShadCN-based components from @baseplate-dev/ui-components and always prefer these components over creating custom ones

packages/project-builder-lib/src/migrations/migration-016-web-admin-config.unit.test.ts (11)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{unit,int}.test.ts : Unit tests use .unit.test.ts suffix, integration tests use .int.test.ts

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-06-30T11:52:28.745Z
Learning: Applies to **/*.int.test.{ts,tsx} : Integration tests use .int.test.ts suffix

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/testing.mdc:0-0
Timestamp: 2025-07-22T09:11:16.930Z
Learning: Applies to **/*.test.{ts,tsx} : Use descriptive test names that explain what is being tested

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/testing.mdc:0-0
Timestamp: 2025-07-22T09:11:16.930Z
Learning: Applies to **/*.test.{ts,tsx} : Each test should verify one specific behavior to keep tests simple

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/testing.mdc:0-0
Timestamp: 2025-07-22T09:11:16.930Z
Learning: Applies to **/*.test.{ts,tsx} : Each test should be independent and not rely on others

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/testing.mdc:0-0
Timestamp: 2025-07-22T09:11:16.930Z
Learning: Applies to **/*.int.test.ts : Integration tests use .int.test.ts suffix

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/testing.mdc:0-0
Timestamp: 2025-07-22T09:11:16.930Z
Learning: Applies to **/*.unit.test.ts : Unit tests are colocated with source files using .unit.test.ts suffix

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/testing.mdc:0-0
Timestamp: 2025-07-22T09:11:16.930Z
Learning: Applies to **/*.test.{ts,tsx} : Focus on testing public methods and behaviors, not implementation details

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/testing.mdc:0-0
Timestamp: 2025-07-22T09:11:16.930Z
Learning: Applies to **/*.test.{ts,tsx} : Structure tests with clear setup, execution, and verification phases (Arrange-Act-Assert)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-06-30T11:52:28.745Z
Learning: Applies to **/*.unit.test.{ts,tsx} : Unit tests are colocated with source files using .unit.test.ts suffix

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.test.ts : Always import vitest globals explicitly (describe, it, expect)

packages/project-builder-lib/src/schema/apps/web/admin/admin.ts (1)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use ShadCN-based components from @baseplate-dev/ui-components and always prefer these components over creating custom ones

packages/project-builder-server/src/compiler/web/admin/crud/inputs.ts (14)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use ShadCN-based components from @baseplate-dev/ui-components and always prefer these components over creating custom ones

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported.

Learnt from: kingston
PR: #505
File: packages/create-project/tsconfig.json:6-6
Timestamp: 2025-04-21T06:32:22.476Z
Learning: Since TypeScript 4.1, baseUrl is not required for paths mapping in tsconfig.json. Removing baseUrl and using explicit relative paths with "./" prefix (e.g., changing "@src/": ["src/"] to "@src/": ["./src/"]) prevents bare path imports from node_modules while maintaining path alias functionality.

Learnt from: kingston
PR: #505
File: packages/create-project/tsconfig.json:6-6
Timestamp: 2025-04-21T06:32:22.476Z
Learning: Since TypeScript 4.1, baseUrl is not required for paths mapping when using explicit relative paths (with "./"). Removing baseUrl from tsconfig.json while updating paths to use relative paths (e.g., changing "@src/": ["src/"] to "@src/": ["./src/"]) prevents bare path imports from node_modules while maintaining path alias functionality.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : In plugins, prefix all Tailwind classes with the plugin name (e.g., auth-, storage-)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use Tailwind CSS utilities exclusively for styling; avoid writing custom CSS classes and use Tailwind's utility classes for all styling needs

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{ts,tsx} : Include absolute paths in import statements via tsconfig paths (@src/ is the alias for src/)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use icons from react-icons/md (Material Design icons) and import them like import { MdAdd, MdDelete } from 'react-icons/md'; avoid using other icon libraries

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{ts,tsx} : TypeScript with strict type checking

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : Import UI components from the @baseplate-dev/ui-components package as shown in the provided examples.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : Use both standalone and React Hook Form controller variants for form components from @baseplate-dev/ui-components as appropriate.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.tsx : Use layout components such as SidebarLayout, Card, and Breadcrumb from @baseplate-dev/ui-components to structure pages as shown in the example.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.tsx : Use interactive dialog components like Dialog, ConfirmDialog, and useConfirmDialog from @baseplate-dev/ui-components for modal interactions.

packages/project-builder-web/src/routes/apps/edit.$key/web/route.tsx (11)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : In plugins, prefix all Tailwind classes with the plugin name (e.g., auth-, storage-)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use ShadCN-based components from @baseplate-dev/ui-components and always prefer these components over creating custom ones

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.tsx : Use layout components such as SidebarLayout, Card, and Breadcrumb from @baseplate-dev/ui-components to structure pages as shown in the example.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use Tailwind CSS utilities exclusively for styling; avoid writing custom CSS classes and use Tailwind's utility classes for all styling needs

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use icons from react-icons/md (Material Design icons) and import them like import { MdAdd, MdDelete } from 'react-icons/md'; avoid using other icon libraries

Learnt from: kingston
PR: #609
File: packages/ui-components/src/components/badge/badge-with-icon.stories.tsx:3-3
Timestamp: 2025-07-14T12:02:36.595Z
Learning: For TypeScript/TSX files: #src/ is the new path alias standard for src/ directory imports, replacing the previous @src/ convention.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : Use both standalone and React Hook Form controller variants for form components from @baseplate-dev/ui-components as appropriate.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.tsx : Use interactive dialog components like Dialog, ConfirmDialog, and useConfirmDialog from @baseplate-dev/ui-components for modal interactions.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : Import UI components from the @baseplate-dev/ui-components package as shown in the provided examples.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.tsx : When using form components, integrate them with React Hook Form by passing the control prop from useForm().

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{ts,tsx} : Always include return types on top-level functions including React components (React.ReactElement)

packages/project-builder-lib/src/migrations/index.ts (1)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{js,ts,tsx} : Node 16 module resolution - include file extensions in imports (.js)

packages/project-builder-server/src/compiler/web/admin/sections.ts (15)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use ShadCN-based components from @baseplate-dev/ui-components and always prefer these components over creating custom ones

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{ts,tsx} : TypeScript with strict type checking

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : In plugins, prefix all Tailwind classes with the plugin name (e.g., auth-, storage-)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{ts,tsx} : Include absolute paths in import statements via tsconfig paths (@src/ is the alias for src/)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported

Learnt from: kingston
PR: #592
File: plugins/plugin-auth/src/auth0/generators/react/auth0-hooks/templates/src/hooks/use-required-user-id.ts:1-2
Timestamp: 2025-07-07T18:24:17.522Z
Learning: Files under templates/** directories can use // @ts-nocheck because they are templates meant for code generation, not direct type checking.

Learnt from: kingston
PR: #505
File: packages/create-project/tsconfig.json:6-6
Timestamp: 2025-04-21T06:32:22.476Z
Learning: Since TypeScript 4.1, baseUrl is not required for paths mapping in tsconfig.json. Removing baseUrl and using explicit relative paths with "./" prefix (e.g., changing "@src/": ["src/"] to "@src/": ["./src/"]) prevents bare path imports from node_modules while maintaining path alias functionality.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use Tailwind CSS utilities exclusively for styling; avoid writing custom CSS classes and use Tailwind's utility classes for all styling needs

Learnt from: kingston
PR: #505
File: packages/create-project/tsconfig.json:6-6
Timestamp: 2025-04-21T06:32:22.476Z
Learning: Since TypeScript 4.1, baseUrl is not required for paths mapping when using explicit relative paths (with "./"). Removing baseUrl from tsconfig.json while updating paths to use relative paths (e.g., changing "@src/": ["src/"] to "@src/": ["./src/"]) prevents bare path imports from node_modules while maintaining path alias functionality.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : Import UI components from the @baseplate-dev/ui-components package as shown in the provided examples.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.tsx : Use layout components such as SidebarLayout, Card, and Breadcrumb from @baseplate-dev/ui-components to structure pages as shown in the example.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : Use both standalone and React Hook Form controller variants for form components from @baseplate-dev/ui-components as appropriate.

Learnt from: kingston
PR: #606
File: plugins/plugin-auth/src/auth/core/generators/auth-apollo/auth-apollo.generator.ts:24-32
Timestamp: 2025-07-12T19:56:08.559Z
Learning: For generator functions and configuration object methods like those in createGeneratorTask, inferred return types are acceptable when the structure is clear from the implementation. ESLint rules handle enforcement of explicit return types where truly needed, so manual review for this is not necessary.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use icons from react-icons/md (Material Design icons) and import them like import { MdAdd, MdDelete } from 'react-icons/md'; avoid using other icon libraries

packages/project-builder-web/src/routes/apps/edit.$key/web/index.tsx (8)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : Use both standalone and React Hook Form controller variants for form components from @baseplate-dev/ui-components as appropriate.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.tsx : When using form components, integrate them with React Hook Form by passing the control prop from useForm().

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use ShadCN-based components from @baseplate-dev/ui-components and always prefer these components over creating custom ones

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : In plugins, prefix all Tailwind classes with the plugin name (e.g., auth-, storage-)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use icons from react-icons/md (Material Design icons) and import them like import { MdAdd, MdDelete } from 'react-icons/md'; avoid using other icon libraries

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.tsx : Use layout components such as SidebarLayout, Card, and Breadcrumb from @baseplate-dev/ui-components to structure pages as shown in the example.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.tsx : Use interactive dialog components like Dialog, ConfirmDialog, and useConfirmDialog from @baseplate-dev/ui-components for modal interactions.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use Tailwind CSS utilities exclusively for styling; avoid writing custom CSS classes and use Tailwind's utility classes for all styling needs

packages/project-builder-server/src/compiler/web/admin/crud/displays.ts (9)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use ShadCN-based components from @baseplate-dev/ui-components and always prefer these components over creating custom ones

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : In plugins, prefix all Tailwind classes with the plugin name (e.g., auth-, storage-)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : Import UI components from the @baseplate-dev/ui-components package as shown in the provided examples.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : Use both standalone and React Hook Form controller variants for form components from @baseplate-dev/ui-components as appropriate.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.tsx : Use layout components such as SidebarLayout, Card, and Breadcrumb from @baseplate-dev/ui-components to structure pages as shown in the example.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.tsx : Use interactive dialog components like Dialog, ConfirmDialog, and useConfirmDialog from @baseplate-dev/ui-components for modal interactions.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use icons from react-icons/md (Material Design icons) and import them like import { MdAdd, MdDelete } from 'react-icons/md'; avoid using other icon libraries

Learnt from: kingston
PR: #606
File: plugins/plugin-auth/src/auth/core/generators/auth-apollo/auth-apollo.generator.ts:24-32
Timestamp: 2025-07-12T19:56:08.559Z
Learning: For generator functions and configuration object methods like those in createGeneratorTask, inferred return types are acceptable when the structure is clear from the implementation. ESLint rules handle enforcement of explicit return types where truly needed, so manual review for this is not necessary.

packages/project-builder-server/src/compiler/web/admin/index.ts (3)

Learnt from: kingston
PR: #571
File: packages/core-generators/src/renderers/extractor/plugins/typed-templates-file.ts:102-106
Timestamp: 2025-06-11T18:31:22.247Z
Learning: For templateExtractorBarrelExportPlugin.addGeneratedBarrelExport, the generated barrel exports are written into generated/index.ts, therefore the moduleSpecifier must be specified relative to that file (e.g., ./typed-templates.js), not the project root.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use ShadCN-based components from @baseplate-dev/ui-components and always prefer these components over creating custom ones

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported.

packages/project-builder-web/src/routes/apps/edit.$key/web/admin/index.tsx (8)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use ShadCN-based components from @baseplate-dev/ui-components and always prefer these components over creating custom ones

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : Use both standalone and React Hook Form controller variants for form components from @baseplate-dev/ui-components as appropriate.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : In plugins, prefix all Tailwind classes with the plugin name (e.g., auth-, storage-)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.tsx : Use layout components such as SidebarLayout, Card, and Breadcrumb from @baseplate-dev/ui-components to structure pages as shown in the example.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use Tailwind CSS utilities exclusively for styling; avoid writing custom CSS classes and use Tailwind's utility classes for all styling needs

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use icons from react-icons/md (Material Design icons) and import them like import { MdAdd, MdDelete } from 'react-icons/md'; avoid using other icon libraries

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.tsx : Use interactive dialog components like Dialog, ConfirmDialog, and useConfirmDialog from @baseplate-dev/ui-components for modal interactions.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : Import UI components from the @baseplate-dev/ui-components package as shown in the provided examples.

packages/project-builder-web/src/route-tree.gen.ts (9)

Learnt from: kingston
PR: #609
File: packages/ui-components/src/components/badge/badge-with-icon.stories.tsx:3-3
Timestamp: 2025-07-14T12:02:36.595Z
Learning: For TypeScript/TSX files: #src/ is the new path alias standard for src/ directory imports, replacing the previous @src/ convention.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{ts,tsx} : Include absolute paths in import statements via tsconfig paths (@src/ is the alias for src/)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use ShadCN-based components from @baseplate-dev/ui-components and always prefer these components over creating custom ones

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported

Learnt from: kingston
PR: #505
File: packages/create-project/tsconfig.json:6-6
Timestamp: 2025-04-21T06:32:22.476Z
Learning: Since TypeScript 4.1, baseUrl is not required for paths mapping in tsconfig.json. Removing baseUrl and using explicit relative paths with "./" prefix (e.g., changing "@src/": ["src/"] to "@src/": ["./src/"]) prevents bare path imports from node_modules while maintaining path alias functionality.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : In plugins, prefix all Tailwind classes with the plugin name (e.g., auth-, storage-)

Learnt from: kingston
PR: #505
File: packages/create-project/tsconfig.json:6-6
Timestamp: 2025-04-21T06:32:22.476Z
Learning: Since TypeScript 4.1, baseUrl is not required for paths mapping when using explicit relative paths (with "./"). Removing baseUrl from tsconfig.json while updating paths to use relative paths (e.g., changing "@src/": ["src/"] to "@src/": ["./src/"]) prevents bare path imports from node_modules while maintaining path alias functionality.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-07-22T09:11:29.223Z
Learning: Applies to {packages/project-builder-web/,packages/ui-components/}/*.tsx : Use icons from react-icons/md (Material Design icons) and import them like import { MdAdd, MdDelete } from 'react-icons/md'; avoid using other icon libraries

🧬 Code Graph Analysis (7)
packages/project-builder-server/src/compiler/web/admin/crud/index.ts (2)
packages/project-builder-server/src/compiler/app-entry-builder.ts (1)
  • AppEntryBuilder (18-66)
packages/project-builder-lib/src/schema/apps/web/web-app.ts (1)
  • WebAppConfig (34-34)
packages/project-builder-web/src/routes/apps/edit.$key/web/admin/-components/admin-crud-section-form.tsx (1)
packages/project-builder-lib/src/schema/apps/web/admin/admin.ts (1)
  • WebAdminSectionConfigInput (25-27)
packages/project-builder-lib/src/schema/apps/web/web-app.ts (4)
packages/project-builder-lib/src/schema/creator/schema-creator.ts (1)
  • definitionSchema (23-27)
packages/project-builder-lib/src/schema/auth/index.ts (1)
  • authRoleEntityType (3-3)
packages/project-builder-lib/src/schema/apps/web/admin/admin.ts (1)
  • createAdminAppSchema (29-47)
packages/project-builder-lib/src/schema/creator/infer-types.ts (1)
  • InferOutput (11-13)
plugins/plugin-auth/src/auth0/core/node.ts (1)
packages/react-generators/src/generators/core/react-routes/react-routes.generator.ts (1)
  • reactRoutesGenerator (13-51)
packages/project-builder-lib/src/schema/apps/web/admin/admin.ts (5)
packages/project-builder-lib/src/schema/creator/schema-creator.ts (1)
  • definitionSchema (23-27)
packages/project-builder-lib/src/schema/apps/web/admin/sections/crud.ts (1)
  • createAdminCrudSectionSchema (134-159)
packages/project-builder-lib/src/schema/apps/web/admin/sections/types.ts (1)
  • adminSectionEntityType (5-7)
packages/project-builder-lib/src/schema/creator/infer-types.ts (2)
  • InferOutput (11-13)
  • InferInput (7-9)
packages/project-builder-lib/src/schema/auth/index.ts (1)
  • authRoleEntityType (3-3)
packages/project-builder-server/src/compiler/web/admin/sections.ts (3)
packages/project-builder-server/src/compiler/app-entry-builder.ts (1)
  • AppEntryBuilder (18-66)
packages/project-builder-lib/src/schema/apps/web/web-app.ts (1)
  • WebAppConfig (34-34)
packages/sync/src/generators/generators.ts (1)
  • GeneratorBundle (215-250)
packages/project-builder-server/src/compiler/web/admin/crud/displays.ts (2)
packages/project-builder-server/src/compiler/app-entry-builder.ts (1)
  • AppEntryBuilder (18-66)
packages/project-builder-lib/src/schema/apps/web/web-app.ts (1)
  • WebAppConfig (34-34)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Test E2E
  • GitHub Check: test
  • GitHub Check: Lint
🔇 Additional comments (51)
packages/project-builder-lib/src/schema/apps/web/admin/index.ts (1)

1-2: LGTM! Proper barrel export structure.

The export change from ./app.js to ./admin.js correctly follows the barrel export pattern and aligns with the schema restructuring.

packages/project-builder-lib/src/schema/apps/index.ts (1)

4-6: LGTM! Excellent backward compatibility approach.

The addition of the backward compatibility export with a clear explanatory comment is a good practice during this architectural migration. This ensures existing code continues to work while transitioning to the new web admin structure.

.changeset/web-admin-config-migration.md (1)

1-6: LGTM! Well-documented changeset for the migration.

The changeset properly documents the new migration feature with appropriate versioning (patch) and a clear description of the backward compatibility changes being introduced.

packages/project-builder-lib/src/migrations/index.ts (2)

15-15: LGTM! Import follows coding guidelines.

The import correctly includes the .js extension as required by Node 16 module resolution guidelines.


29-29: LGTM! Migration properly integrated.

The new migration is correctly added to the SCHEMA_MIGRATIONS array following the established pattern and maintaining the sequential order.

plugins/plugin-auth/src/placeholder-auth/core/node.ts (1)

53-57: LGTM! Clean consolidation of admin and web app compiler registrations.

The changes properly implement the admin-to-web type consolidation by:

  • Removing the separate adminAppEntryType registration
  • Inlining the generators directly into the webAppEntryType registration
  • Eliminating the now-unnecessary sharedWebGenerators constant

This aligns perfectly with the PR objective of simplifying type generation by merging admin functionality into the web app type.

packages/project-builder-web/src/routes/apps/edit.$key/web/admin/-components/admin-crud-section-form.tsx (2)

1-1: LGTM! Proper type update for schema consolidation.

The import change from AdminCrudSectionConfigInput to WebAdminSectionConfigInput correctly reflects the new unified web admin schema structure introduced in this PR.


26-26: LGTM! Form props type correctly updated.

The formProps type properly updated to use UseFormReturn<WebAdminSectionConfigInput>, maintaining type safety while aligning with the new consolidated schema.

plugins/plugin-storage/src/storage/core/node.ts (1)

108-111: LGTM! Proper consolidation of admin logic into web app compiler.

The updated condition correctly checks both !appDefinition.includeUploadComponents and !appDefinition.adminApp?.enabled before proceeding. This properly consolidates the previously separate admin app logic into the web app compiler while maintaining the same conditional behavior. The optional chaining safely handles cases where adminApp might not be defined.

packages/project-builder-lib/src/schema/apps/web/index.ts (1)

1-1: LGTM! Proper use of barrel export pattern.

The refactor to use export * from './web-app.js' follows the coding guidelines for index files, which prefer barrel exports over individual named exports. This consolidation centralizes the web app schema definitions and supports the admin-to-web type consolidation effort.

plugins/plugin-auth/src/auth/core/node.ts (1)

71-78: LGTM! Consistent consolidation pattern with other auth plugins.

The changes follow the same clean consolidation pattern as the placeholder auth plugin by:

  • Removing the separate adminAppEntryType registration
  • Inlining all auth generators directly into the webAppEntryType registration
  • Eliminating the sharedWebGenerators constant

This maintains the same functionality while simplifying the type structure, perfectly aligning with the PR objective of merging admin and web types.

packages/project-builder-server/src/compiler/web/admin/index.ts (1)

9-19: LGTM! Clean conditional compilation logic.

The function correctly implements conditional admin feature compilation based on the adminApp.enabled flag. The type annotations and early return pattern are appropriate for this use case.

packages/project-builder-server/src/compiler/web/admin/crud/inputs.ts (2)

11-11: Type import updated correctly.

The import statement properly replaces AdminAppConfig with WebAppConfig to align with the migration from standalone admin apps to web apps with embedded admin configuration.


227-227: Function signature updated correctly.

The parameter type change from AppEntryBuilder<AdminAppConfig> to AppEntryBuilder<WebAppConfig> correctly reflects the migration to unified web app configuration.

plugins/plugin-auth/src/auth0/core/node.ts (1)

59-71: Admin app consolidation completed correctly.

The removal of the shared sharedWebGenerators variable and direct inlining of the generators in the web app compiler registration aligns with the migration strategy. The admin app compiler registration has been appropriately removed since admin functionality is now handled within the web app type.

packages/project-builder-server/src/compiler/web/admin/crud/index.ts (3)

4-4: Type import updated correctly.

The import statement properly replaces AdminAppConfig with WebAppConfig to support the unified app configuration structure.


27-27: Function parameter type updated correctly.

The compileAdminCrudEmbeddedForm function now correctly accepts AppEntryBuilder<WebAppConfig> instead of the deprecated AdminAppConfig.


99-99: Function parameter type updated correctly.

The compileAdminCrudSection function now correctly accepts AppEntryBuilder<WebAppConfig> instead of the deprecated AdminAppConfig.

packages/project-builder-lib/src/migrations/migration-016-web-admin-config.ts (4)

34-42: Migration metadata looks good.

The migration version, name, and description clearly communicate the purpose of converting admin apps to web apps with embedded admin configuration.


47-61: Admin to web app conversion logic is correct.

The migration properly:

  • Destructures sections and allowedRoles from the admin app
  • Changes the app type to 'web'
  • Creates the adminApp configuration with appropriate defaults
  • Preserves all other app properties via spread operator

64-72: Web app adminApp addition logic is correct.

The migration correctly identifies existing web apps that don't have an adminApp property and adds a disabled configuration with the default /admin path prefix.


3-32: TypeScript interface definitions are well-structured.

The OldConfig and NewConfig interfaces properly define the schema transformation, with the new adminApp property correctly typed as optional with all its nested properties.

packages/project-builder-lib/src/migrations/migration-016-web-admin-config.unit.test.ts (8)

6-38: Well-structured test case for core migration functionality.

The test follows the Arrange-Act-Assert pattern clearly and validates the essential conversion of admin apps to web apps with the adminApp configuration enabled.


40-64: Good edge case coverage for minimal admin app configuration.

This test ensures the migration handles admin apps with minimal configuration correctly, validating that missing properties are transformed appropriately.


66-104: Comprehensive test for web app transformation and non-web app preservation.

This test validates both the addition of adminApp to existing web apps and the preservation of non-web apps, ensuring the migration is selective and doesn't affect unrelated app types.


106-110: Good defensive test for missing apps array.

This test ensures the migration handles configurations without an apps array gracefully, preventing potential runtime errors.


112-116: Appropriate edge case test for empty apps array.

This test validates that empty apps arrays are preserved unchanged, ensuring the migration doesn't introduce unnecessary modifications.


118-139: Important test for configuration property preservation.

This test ensures the migration only modifies the apps array while preserving all other configuration properties, which is crucial for maintaining configuration integrity.


141-166: Critical test for migration idempotency.

This test ensures the migration is idempotent by verifying that web apps with existing adminApp configurations are not modified, preventing issues from repeated migration runs.


168-197: Comprehensive test for non-web app preservation.

This test validates that various non-web app types (API, CLI) remain completely unchanged, ensuring the migration's scope is properly limited.

packages/project-builder-web/src/routes/apps/edit.$key/web/route.tsx (2)

14-25: Route configuration correctly updated for web app structure.

The route path, component name, type check, and data key have been appropriately updated to reflect the migration from admin apps to web apps with embedded admin functionality.


27-54: Navigation structure properly reflects the new web/admin hierarchy.

The component has been correctly renamed and the navigation tabs now reflect the new structure where admin functionality is nested within web apps.

packages/project-builder-server/src/compiler/web/admin/crud/displays.ts (2)

5-5: Import correctly updated for the web app migration.

The import has been appropriately changed from AdminAppConfig to WebAppConfig to align with the new unified app configuration structure.


21-21: Function signatures correctly updated for WebAppConfig.

All function signatures have been appropriately updated to use AppEntryBuilder<WebAppConfig> instead of AdminAppConfig, maintaining consistency with the unified app configuration structure.

Also applies to: 53-53, 72-72

packages/project-builder-lib/src/schema/apps/web/admin/admin.ts (3)

11-19: Well-structured section schema with proper entity relationships.

The createWebAdminSectionSchema correctly uses the definition schema pattern and establishes proper parent-child relationships for admin sections within web apps.


21-27: Type exports follow established project patterns.

The exported types WebAdminSectionConfig and WebAdminSectionConfigInput properly use the schema inference utilities, maintaining consistency with other schema definitions.


29-47: Comprehensive admin app schema with appropriate defaults.

The createAdminAppSchema is well-designed with:

  • Toggle-able admin functionality via enabled flag
  • Sensible default path prefix '/admin'
  • Proper auth role references with cascade delete
  • Default empty arrays for optional collections
packages/project-builder-lib/src/schema/apps/web/web-app.ts (2)

12-32: Comprehensive web app schema with embedded admin functionality.

The createWebAppSchema effectively consolidates web and admin functionality:

  • Proper extension of base app validators
  • Literal 'web' type for type safety
  • Sensible defaults for optional properties
  • Embedded admin configuration via createAdminAppSchema
  • Proper auth role references

34-36: Type exports consistent with project patterns.

The exported WebAppConfig type and webAppEntryType follow established project conventions for schema-derived types and app entry definitions.

packages/project-builder-server/src/compiler/web/admin/sections.ts (4)

1-1: Type migration looks good!

The update from AdminAppConfig to WebAppConfig correctly aligns with the architectural change to embed admin configuration within web apps.


12-32: Admin sections compilation correctly updated!

The function properly handles the new nested structure with appropriate optional chaining for the potentially undefined adminApp configuration.


34-83: Function signature correctly updated!

The type parameter change to WebAppConfig is the appropriate minimal change needed for this function.


85-94: Export function properly migrated!

The type parameter update maintains the existing functionality while supporting the new app structure.

packages/project-builder-server/src/compiler/web/index.ts (4)

39-58: Well-implemented admin navigation builder!

The function properly handles optional admin configuration and constructs navigation links with appropriate defaults and path formatting.


60-106: Admin routes builder correctly implemented!

The function properly constructs the admin route hierarchy with conditional features and appropriate navigation structure.


118-152: React builder correctly updated for admin integration!

The conditional inclusion of admin routes and components is properly implemented, maintaining backward compatibility while adding the new admin features.


6-6: Remove alias warning – #src/ is correct

Imports using #src/ align with our updated path alias convention for TypeScript/TSX (see #609), replacing the older @src/ alias. No change needed here.

Likely an incorrect or invalid review comment.

packages/project-builder-web/src/routes/apps/edit.$key/web/index.tsx (1)

64-129: Excellent form implementation!

The form properly uses React Hook Form controller variants, follows the UI component guidelines with SectionList layout components, and handles conditional role options elegantly.

packages/project-builder-web/src/routes/apps/edit.$key/web/admin/index.tsx (2)

69-160: Well-structured dual form management!

The implementation properly handles both the main admin configuration form and section editing with appropriate state management, validation, and user feedback mechanisms.


168-357: Excellent UI implementation following all guidelines!

The component properly uses ShadCN-based components, integrates forms with React Hook Form, uses Material Design icons, and structures the layout with appropriate components like SectionList and Sheet.

packages/project-builder-web/src/route-tree.gen.ts (1)

1-11: Auto-generated file - no manual review needed

This file is automatically generated by TanStack Router and should not be manually edited. The changes correctly reflect the route structure updates from the admin-to-web migration.

import { notEmpty } from '@baseplate-dev/utils';

import type { AppEntryBuilder } from '../app-entry-builder.js';
import type { AppEntryBuilder } from '../../app-entry-builder.js';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Use absolute import path with @src alias

Per the coding guidelines, TypeScript files should use absolute paths via tsconfig paths.

-import type { AppEntryBuilder } from '../../app-entry-builder.js';
+import type { AppEntryBuilder } from '@src/compiler/app-entry-builder.js';
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import type { AppEntryBuilder } from '../../app-entry-builder.js';
import type { AppEntryBuilder } from '@src/compiler/app-entry-builder.js';
🤖 Prompt for AI Agents
In packages/project-builder-server/src/compiler/web/admin/sections.ts at line 8,
replace the relative import path '../../app-entry-builder.js' with the absolute
import path using the '@src' alias as configured in tsconfig paths. This means
changing the import statement to use '@src/app-entry-builder.js' to comply with
the coding guidelines for absolute imports.

import { useState } from 'react';
import { MdAdd, MdDeleteOutline, MdEdit } from 'react-icons/md';

import { useDefinitionSchema } from '#src/hooks/use-definition-schema.js';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Use absolute import path

Per the coding guidelines, use absolute paths in import statements.

-import { useDefinitionSchema } from '#src/hooks/use-definition-schema.js';
+import { useDefinitionSchema } from '@src/hooks/use-definition-schema.js';

Note: If #src is the correct alias for this project (different from the guidelines), please disregard this comment.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import { useDefinitionSchema } from '#src/hooks/use-definition-schema.js';
-import { useDefinitionSchema } from '#src/hooks/use-definition-schema.js';
+import { useDefinitionSchema } from '@src/hooks/use-definition-schema.js';
🤖 Prompt for AI Agents
In packages/project-builder-web/src/routes/apps/edit.$key/web/admin/index.tsx at
line 48, the import statement uses a potentially non-standard alias '#src'.
Replace this with the absolute import path as per the project's coding
guidelines to ensure consistency and clarity in module resolution. Verify the
correct absolute path for 'use-definition-schema.js' and update the import
statement accordingly.

component: WebAdminPage,
});

function WebAdminPage(): React.JSX.Element {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Add explicit return type for React component

Top-level React components should have explicit return types.

-function WebAdminPage(): React.JSX.Element {
+function WebAdminPage(): React.ReactElement {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
function WebAdminPage(): React.JSX.Element {
function WebAdminPage(): React.ReactElement {
🤖 Prompt for AI Agents
In packages/project-builder-web/src/routes/apps/edit.$key/web/admin/index.tsx at
line 56, the React component WebAdminPage lacks an explicit return type. Add the
explicit return type React.JSX.Element to the function signature to clearly
specify the component's return type.

component: WebAppGeneralForm,
});

function WebAppGeneralForm(): React.JSX.Element {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Add explicit return type for React component

Per the coding guidelines, top-level functions including React components should have explicit return types.

-function WebAppGeneralForm(): React.JSX.Element {
+function WebAppGeneralForm(): React.ReactElement {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
function WebAppGeneralForm(): React.JSX.Element {
function WebAppGeneralForm(): React.ReactElement {
🤖 Prompt for AI Agents
In packages/project-builder-web/src/routes/apps/edit.$key/web/index.tsx at line
32, the React component function WebAppGeneralForm lacks an explicit return
type. Add the explicit return type React.JSX.Element to the function signature
to comply with coding guidelines for top-level functions.

@kingston kingston merged commit cc6cd6c into main Jul 24, 2025
11 checks passed
@kingston kingston deleted the kingston/eng-707-merge-web-and-admin-types branch July 24, 2025 19:38
@github-actions github-actions bot mentioned this pull request Jul 24, 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