Skip to content

Add brouter to bit Boilerplate (#12687)#12688

Open
yasmoradi wants to merge 8 commits into
bitfoundation:developfrom
yasmoradi:12687
Open

Add brouter to bit Boilerplate (#12687)#12688
yasmoradi wants to merge 8 commits into
bitfoundation:developfrom
yasmoradi:12687

Conversation

@yasmoradi

@yasmoradi yasmoradi commented Jul 18, 2026

Copy link
Copy Markdown
Member

closes #12687

Summary by CodeRabbit

  • New Features

    • Added an optional bit Brouter setting when creating new projects, enabled by default.
    • Generated projects can now use enhanced routing capabilities, including keep-alive support for selected pages.
    • Project creation commands now reflect the selected Brouter configuration.
  • Bug Fixes

    • Updated sample project configurations to consistently enable or disable Brouter as intended.
    • Adjusted sample project options for Redis and SignalR configurations.

@yasmoradi
yasmoradi requested a review from msynk July 18, 2026 18:51
@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 7624135d-b647-4db5-a066-e4b15f047d30

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

The PR adds a configurable bit Brouter option to project creation, boilerplate templates, generated routing and services, and CI/deployment sample scaffolding commands.

Changes

Bit Brouter integration

Layer / File(s) Summary
Expose the Brouter project option
src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates05CreateProjectPage.razor, src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates05CreateProjectPage.razor.cs
Adds a Brouter toggle, project-page state, CLI command formatting, and conditional command generation.
Wire Brouter into generated projects
src/Templates/Boilerplate/Bit.Boilerplate/.template.config/*, src/Templates/Boilerplate/Bit.Boilerplate/src/Directory.Packages.props, src/Templates/Boilerplate/.../Boilerplate.Client.Core.csproj, src/Templates/Boilerplate/.../_Imports.razor, src/Templates/Boilerplate/.../IClientCoreServiceCollectionExtensions.cs
Declares the Brouter template symbol, package version, conditional package/imports, and service registration.
Replace generated routing components
src/Templates/Boilerplate/.../Components/Routes.razor, src/Templates/Boilerplate/.../Components/Routes.razor.cs
Uses AppRouter and explicit Broute definitions with keep-alive behavior for Products routes.
Set Brouter in sample workflows
.github/workflows/admin-sample.cd.yml, .github/workflows/bit.full.ci.yml, .github/workflows/sales-module-demo.cd.yml, .github/workflows/todo-sample.cd.yml
Adds explicit Brouter arguments to sample project generation commands and adjusts related TodoSample options.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant PlatformPage
  participant TemplateCommand
  participant BoilerplateTemplate
  participant GeneratedClient
  PlatformPage->>TemplateCommand: emit --brouter setting
  TemplateCommand->>BoilerplateTemplate: apply brouter symbol
  BoilerplateTemplate->>GeneratedClient: include package and services
  GeneratedClient->>GeneratedClient: render AppRouter and Broute routes
Loading

Suggested reviewers: msynk

Poem

A rabbit toggles routes with cheer,
“Brouter magic now appears here!”
Templates bloom, commands hop,
CI samples never stop.
--brouter leads the way—
Hoppy code review today!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately summarizes the main change: adding brouter support to Bit Boilerplate.
Linked Issues check ✅ Passed The changes implement the linked boilerplate brouter integration by adding template config, routing support, packages, and workflow updates.
Out of Scope Changes check ✅ Passed No clearly unrelated code changes stand out; the edits consistently support the brouter boilerplate integration.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/todo-sample.cd.yml:
- Line 161: Restore the --signalR flag in the dotnet new bit-bp command
alongside the existing feature flags, while preserving the appended --brouter
false option and all other command arguments.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: a8132a56-3c1e-4be7-9c83-8d0b72324291

📥 Commits

Reviewing files that changed from the base of the PR and between 7d614f8 and c73b110.

📒 Files selected for processing (14)
  • .github/workflows/admin-sample.cd.yml
  • .github/workflows/bit.full.ci.yml
  • .github/workflows/sales-module-demo.cd.yml
  • .github/workflows/todo-sample.cd.yml
  • src/Templates/Boilerplate/Bit.Boilerplate/.template.config/ide.host.json
  • src/Templates/Boilerplate/Bit.Boilerplate/.template.config/template.json
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Boilerplate.Client.Core.csproj
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Routes.razor
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Routes.razor.cs
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/_Imports.razor
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Infrastructure/Extensions/IClientCoreServiceCollectionExtensions.cs
  • src/Templates/Boilerplate/Bit.Boilerplate/src/Directory.Packages.props
  • src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates05CreateProjectPage.razor
  • src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates05CreateProjectPage.razor.cs

dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0
dotnet new install Bit.Boilerplate.0.0.0.nupkg
cd ../../../ && dotnet new bit-bp --name TodoSample --database PostgreSQL --sample --apiServerUrl ${{ env.SERVER_API_ADDRESS }} --webAppUrl ${{ env.SERVER_WEB_ADDRESS }} --filesStorage AzureBlobStorage --notification --captcha reCaptcha --ads --multitenant false
cd ../../../ && dotnet new bit-bp --name TodoSample --database PostgreSQL --sample --apiServerUrl ${{ env.SERVER_API_ADDRESS }} --webAppUrl ${{ env.SERVER_WEB_ADDRESS }} --filesStorage AzureBlobStorage --notification --captcha reCaptcha --ads --multitenant false --brouter false

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Restore the accidentally removed --signalR flag.

It appears the --signalR flag was accidentally removed when appending --brouter false to this command. If this omission was unintentional, please restore the flag to ensure the AOT build continues to include SignalR features.

🐛 Proposed fix
-       cd ../../../ && dotnet new bit-bp --name TodoSample --database PostgreSQL --sample --apiServerUrl ${{ env.SERVER_API_ADDRESS }} --webAppUrl ${{ env.SERVER_WEB_ADDRESS }} --filesStorage AzureBlobStorage --notification --captcha reCaptcha --ads --multitenant false --brouter false
+       cd ../../../ && dotnet new bit-bp --name TodoSample --database PostgreSQL --sample --apiServerUrl ${{ env.SERVER_API_ADDRESS }} --webAppUrl ${{ env.SERVER_WEB_ADDRESS }} --filesStorage AzureBlobStorage --notification --captcha reCaptcha --signalR --ads --multitenant false --brouter false
📝 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
cd ../../../ && dotnet new bit-bp --name TodoSample --database PostgreSQL --sample --apiServerUrl ${{ env.SERVER_API_ADDRESS }} --webAppUrl ${{ env.SERVER_WEB_ADDRESS }} --filesStorage AzureBlobStorage --notification --captcha reCaptcha --ads --multitenant false --brouter false
cd ../../../ && dotnet new bit-bp --name TodoSample --database PostgreSQL --sample --apiServerUrl ${{ env.SERVER_API_ADDRESS }} --webAppUrl ${{ env.SERVER_WEB_ADDRESS }} --filesStorage AzureBlobStorage --notification --captcha reCaptcha --signalR --ads --multitenant false --brouter false
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/todo-sample.cd.yml at line 161, Restore the --signalR flag
in the dotnet new bit-bp command alongside the existing feature flags, while
preserving the appended --brouter false option and all other command arguments.

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.

bit Boilerplate Brouter integration is missing

1 participant