Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/Templates/Boilerplate/Bit.Boilerplate/.claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"enableAllProjectMcpServers": true,
"env": {
"DOTNET_NOLOGO": "1"
},
"permissions": {
"allow": [
"mcp__DeepWiki",
"mcp__bitBlazorUI",
"mcp__MicrosoftLearn",
"mcp__playwright"
]
}
}
1 change: 1 addition & 0 deletions src/Templates/Boilerplate/Bit.Boilerplate/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ Example 2: `OnClick="WrapHandled(async () => await MyMethod())"` instead of `OnC
- **Use OData Query Options**: Leverage `[EnableQuery]` and `ODataQueryOptions` for efficient data filtering and pagination.
- **Follow Mapperly Conventions**: Use **partial static classes and extension methods** with Mapperly for high-performance object mapping.
- **Handle Concurrency**: Always use `long Version` for optimistic concurrency control in update and delete operations.
- **Respect `[mirror]` Comments**: Some files carry (near) identical logic under different extensions or projects. Each of them starts with a `[mirror]` comment listing its counterparts. Whenever you change such a file you **MUST** open every file that comment names and apply the same change there, or state explicitly why it does not apply. Run `Grep` for `[mirror]` to see the full set.
Comment thread
yasmoradi marked this conversation as resolved.

## 6. Behavioral Directives

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@* Note: keep in mind that any changes to this file should be exactly applied to the loading implementations *@
@* of the `index.html` files of the `Client.Web` and `Client.Maui` projects. *@
@* [mirror] loading indicator markup and css - keep in sync with: *@
@* - src/Client/Boilerplate.Client.Web/wwwroot/index.html *@
@* - src/Client/Boilerplate.Client.Maui/wwwroot/index.html *@

<style>
.bit-lds-wrapper-nfs {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</AuthorizeView>
@*#endif*@

@*#if (module == "Admin")*@
@*#if (module == "Admin" && multitenant == true)*@
<AuthorizeView Policy="@AppFeatures.AdminPanel.Dashboard_View">
<AuthorizeView Policy="@AuthPolicies.TENANT_SELECTED" Context="_">
<BitNavBarOption Text="@Localizer[nameof(AppStrings.Dashboard)]" IconName="@BitIconName.BarChartVerticalFill" Url="@PageUrls.Dashboard" />
Expand All @@ -28,6 +28,14 @@
<BitNavBarOption Text="@Localizer[nameof(AppStrings.Products)]" IconName="@BitIconName.Product" Url="@PageUrls.Products" />
</AuthorizeView>
</AuthorizeView>
@*#elseif (module == "Admin")*@
<AuthorizeView Policy="@AppFeatures.AdminPanel.Dashboard_View">
<BitNavBarOption Text="@Localizer[nameof(AppStrings.Dashboard)]" IconName="@BitIconName.BarChartVerticalFill" Url="@PageUrls.Dashboard" />
</AuthorizeView>
<AuthorizeView Policy="@AppFeatures.AdminPanel.ProductCatalog_Manage">
<BitNavBarOption Text="@Localizer[nameof(AppStrings.Categories)]" IconName="@BitIconName.BuildQueue" Url="@PageUrls.Categories" />
<BitNavBarOption Text="@Localizer[nameof(AppStrings.Products)]" IconName="@BitIconName.Product" Url="@PageUrls.Products" />
</AuthorizeView>
@*#endif*@

<BitNavBarOption Text="@Localizer[nameof(AppStrings.Terms)]" IconName="@BitIconName.EntityExtraction" Url="@PageUrls.Terms" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
@*+:cnd:noEmit*@
@* [mirror] razor using list of the client projects - keep in sync with: *@
@* - src/Client/Boilerplate.Client.Web/_Imports.razor *@
@* - src/Client/Boilerplate.Client.Maui/_Imports.razor *@
@* - src/Client/Boilerplate.Client.Windows/_Imports.razor *@

@using System.Reflection
@using System.Globalization
@using System.Runtime.Loader
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
//-:cnd:noEmit
// [mirror] IBitDeviceCoordinator - applying the theme to native chrome - keep in sync with:
// - src/Client/Boilerplate.Client.Windows/Infrastructure/Services/WindowsDeviceCoordinator.cs

using Boilerplate.Client.Core.Styles;

namespace Boilerplate.Client.Maui.Infrastructure.Services;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// [mirror] blazor hybrid exception handling - keep in sync with:
// - src/Client/Boilerplate.Client.Windows/Infrastructure/Services/WindowsExceptionHandler.cs

namespace Boilerplate.Client.Maui.Infrastructure.Services;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// [mirror] loopback interop server - endpoints, auth and static file serving - keep in sync with:
// - src/Client/Boilerplate.Client.Windows/Infrastructure/Services/WindowsLocalHttpServer.cs

using System.Net;
using System.Text;
using System.Net.Sockets;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// [mirror] IStorageService semantics - persistent vs temp storage - keep in sync with:
// - src/Client/Boilerplate.Client.Windows/Infrastructure/Services/WindowsStorageService.cs

namespace Boilerplate.Client.Maui.Infrastructure.Services;

public partial class MauiStorageService : IStorageService
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// [mirror] telemetry context properties - keep in sync with:
// - src/Client/Boilerplate.Client.Windows/Infrastructure/Services/WindowsTelemetryContext.cs

namespace Boilerplate.Client.Maui.Infrastructure.Services;

public class MauiTelemetryContext : AppTelemetryContext
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// [mirror] webauthn ceremony driven through the loopback server - keep in sync with:
// - src/Client/Boilerplate.Client.Windows/Infrastructure/Services/WindowsWebAuthnService.cs

namespace Boilerplate.Client.Maui.Infrastructure.Services;

public partial class MauiWebAuthnService : WebAuthnServiceBase
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
//+:cnd:noEmit
// [mirror] blazor hybrid DI registrations, logging and OpenTelemetry setup - keep in sync with:
// - src/Client/Boilerplate.Client.Windows/Program.Services.cs

//#if (appInsights == true)
using Azure.Monitor.OpenTelemetry.Exporter;
//#endif
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
//+:cnd:noEmit
// [mirror] per platform DI registrations of the maui project - keep in sync with:
// - src/Client/Boilerplate.Client.Maui/Platforms/iOS/Extensions/IIosServiceCollectionExtensions.cs
// - src/Client/Boilerplate.Client.Maui/Platforms/MacCatalyst/Extensions/IMacServiceCollectionExtensions.cs
// - src/Client/Boilerplate.Client.Maui/Platforms/Windows/Extensions/IWindowsServiceCollectionExtensions.cs

//#if (notification == true)
using Boilerplate.Client.Maui.Platforms.Android.Services;
//#endif
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// [mirror] IPushNotificationService - subscription and permission flow - keep in sync with:
// - src/Client/Boilerplate.Client.Maui/Platforms/iOS/Services/iOSPushNotificationService.cs
// - src/Client/Boilerplate.Client.Maui/Platforms/MacCatalyst/Services/MacCatalystPushNotificationService.cs

using Firebase.Messaging;
using static Android.Provider.Settings;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
//+:cnd:noEmit
// [mirror] apple app delegate - keep in sync with:
// - src/Client/Boilerplate.Client.Maui/Platforms/iOS/AppDelegate.cs

using UIKit;
using Foundation;
//#if (notification == true)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
//+:cnd:noEmit
// [mirror] per platform DI registrations of the maui project - keep in sync with:
// - src/Client/Boilerplate.Client.Maui/Platforms/Android/Extensions/IAndroidServiceCollectionExtensions.cs
// - src/Client/Boilerplate.Client.Maui/Platforms/iOS/Extensions/IIosServiceCollectionExtensions.cs
// - src/Client/Boilerplate.Client.Maui/Platforms/Windows/Extensions/IWindowsServiceCollectionExtensions.cs

//#if (notification == true)
using Boilerplate.Client.Maui.Platforms.MacCatalyst.Services;
//#endif
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// [mirror] NSData extensions - keep in sync with:
// - src/Client/Boilerplate.Client.Maui/Platforms/iOS/Extensions/NSDataExtensions.cs

using System.Text;

namespace Foundation;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// [mirror] apple entry point - keep in sync with:
// - src/Client/Boilerplate.Client.Maui/Platforms/iOS/Program.cs

using UIKit;

namespace Boilerplate.Client.Maui.Platforms.MacCatalyst;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// [mirror] UNUserNotificationCenter delegate - keep in sync with:
// - src/Client/Boilerplate.Client.Maui/Platforms/iOS/Services/AppUNUserNotificationCenterDelegate.cs

using Foundation;
using UserNotifications;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// [mirror] IPushNotificationService - subscription and permission flow - keep in sync with:
// - src/Client/Boilerplate.Client.Maui/Platforms/Android/Services/AndroidPushNotificationService.cs
// - src/Client/Boilerplate.Client.Maui/Platforms/iOS/Services/iOSPushNotificationService.cs

using UIKit;
using UserNotifications;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
//+:cnd:noEmit
// [mirror] per platform DI registrations of the maui project - keep in sync with:
// - src/Client/Boilerplate.Client.Maui/Platforms/Android/Extensions/IAndroidServiceCollectionExtensions.cs
// - src/Client/Boilerplate.Client.Maui/Platforms/iOS/Extensions/IIosServiceCollectionExtensions.cs
// - src/Client/Boilerplate.Client.Maui/Platforms/MacCatalyst/Extensions/IMacServiceCollectionExtensions.cs

//#if (notification == true)
using Boilerplate.Client.Maui.Platforms.Windows.Services;
//#endif
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// [mirror] not implemented push notification service of the windows targets - keep in sync with:
Comment thread
yasmoradi marked this conversation as resolved.
// - src/Client/Boilerplate.Client.Windows/Infrastructure/Services/WindowsPushNotificationService.cs

using Boilerplate.Shared.Features.PushNotification;

namespace Boilerplate.Client.Maui.Platforms.Windows.Services;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
//+:cnd:noEmit
// [mirror] apple app delegate - keep in sync with:
// - src/Client/Boilerplate.Client.Maui/Platforms/MacCatalyst/AppDelegate.cs

using UIKit;
using Foundation;
//#if (notification == true)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
//+:cnd:noEmit
// [mirror] per platform DI registrations of the maui project - keep in sync with:
// - src/Client/Boilerplate.Client.Maui/Platforms/Android/Extensions/IAndroidServiceCollectionExtensions.cs
// - src/Client/Boilerplate.Client.Maui/Platforms/MacCatalyst/Extensions/IMacServiceCollectionExtensions.cs
// - src/Client/Boilerplate.Client.Maui/Platforms/Windows/Extensions/IWindowsServiceCollectionExtensions.cs

//#if (notification == true)
using Boilerplate.Client.Maui.Platforms.iOS.Services;
//#endif
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// [mirror] NSData extensions - keep in sync with:
// - src/Client/Boilerplate.Client.Maui/Platforms/MacCatalyst/Extensions/NSDataExtensions.cs

using System.Text;

namespace Foundation;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// [mirror] apple entry point - keep in sync with:
// - src/Client/Boilerplate.Client.Maui/Platforms/MacCatalyst/Program.cs

using UIKit;

namespace Boilerplate.Client.Maui.Platforms.iOS;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// [mirror] UNUserNotificationCenter delegate - keep in sync with:
// - src/Client/Boilerplate.Client.Maui/Platforms/MacCatalyst/Services/AppUNUserNotificationCenterDelegate.cs

using Foundation;
using UserNotifications;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// [mirror] IPushNotificationService - subscription and permission flow - keep in sync with:
// - src/Client/Boilerplate.Client.Maui/Platforms/Android/Services/AndroidPushNotificationService.cs
// - src/Client/Boilerplate.Client.Maui/Platforms/MacCatalyst/Services/MacCatalystPushNotificationService.cs

using UIKit;
using UserNotifications;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
@*+:cnd:noEmit*@
@* [mirror] razor using list of the client projects - keep in sync with: *@
@* - src/Client/Boilerplate.Client.Core/Components/_Imports.razor *@
@* - src/Client/Boilerplate.Client.Web/_Imports.razor *@
@* - src/Client/Boilerplate.Client.Windows/_Imports.razor *@

@using System.Reflection
@using System.Globalization
@using System.Runtime.Loader
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<!DOCTYPE html>
<!-- [mirror] host page head tags, stylesheet and script list - keep in sync with:
- src/Server/Boilerplate.Server.Web/Components/App.razor
- src/Client/Boilerplate.Client.Web/wwwroot/index.html
[mirror] loading indicator markup and css - keep in sync with:
- src/Client/Boilerplate.Client.Core/Components/Common/LoadingComponent.razor
- src/Client/Boilerplate.Client.Web/wwwroot/index.html
-->

<html bit-theme-system bit-theme-persist bit-theme-view-transition>
<head>
<base href="/" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
@* [mirror] bswup progress bar markup and css - keep in sync with: *@
@* - src/Client/Boilerplate.Client.Web/wwwroot/index.html *@

@using Bit.Bswup
@using Bit.BlazorUI
@using Boilerplate.Client.Core.Components
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
@*+:cnd:noEmit*@
@* [mirror] razor using list of the client projects - keep in sync with: *@
@* - src/Client/Boilerplate.Client.Core/Components/_Imports.razor *@
@* - src/Client/Boilerplate.Client.Maui/_Imports.razor *@
@* - src/Client/Boilerplate.Client.Windows/_Imports.razor *@

@using System.Reflection
@using System.Globalization
@using System.Runtime.Loader
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
<!DOCTYPE html>
<!-- [mirror] host page head tags, stylesheet and script list - keep in sync with:
- src/Server/Boilerplate.Server.Web/Components/App.razor
- src/Client/Boilerplate.Client.Maui/wwwroot/index.html
[mirror] loading indicator markup and css - keep in sync with:
- src/Client/Boilerplate.Client.Core/Components/Common/LoadingComponent.razor
- src/Client/Boilerplate.Client.Maui/wwwroot/index.html
[mirror] bswup progress bar markup and css - keep in sync with:
- src/Client/Boilerplate.Client.Web/Components/AppBswupProgressBar.razor
-->

<html bit-theme-system bit-theme-persist bit-theme-view-transition>
<head>
<base href="/">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
//+:cnd:noEmit
// [mirror] push notification and notificationclick handlers - keep in sync with:
// - src/Client/Boilerplate.Client.Web/wwwroot/service-worker.published.js

// In development, always fetch from the network and do not enable offline support.
// This is because caching would make development more difficult (changes would not
// be reflected on the first load after each change).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
//+:cnd:noEmit
// [mirror] push notification and notificationclick handlers - keep in sync with:
// - src/Client/Boilerplate.Client.Web/wwwroot/service-worker.js

// bit version: 10.6.0-pre-01
// https://github.com/bitfoundation/bitplatform/tree/develop/src/Bswup

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
//+:cnd:noEmit
// [mirror] IBitDeviceCoordinator - applying the theme to native chrome - keep in sync with:
// - src/Client/Boilerplate.Client.Maui/Infrastructure/Services/MauiDeviceCoordinator.cs

using Boilerplate.Client.Core.Styles;

namespace Boilerplate.Client.Windows.Infrastructure.Services;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// [mirror] blazor hybrid exception handling - keep in sync with:
// - src/Client/Boilerplate.Client.Maui/Infrastructure/Services/MauiExceptionHandler.cs

namespace Boilerplate.Client.Windows.Infrastructure.Services;

public partial class WindowsExceptionHandler : ClientExceptionHandlerBase
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// [mirror] loopback interop server - endpoints, auth and static file serving - keep in sync with:
// - src/Client/Boilerplate.Client.Maui/Infrastructure/Services/MauiLocalHttpServer.cs

using System.Net;
using System.Text;
using System.Net.Sockets;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// [mirror] not implemented push notification service of the windows targets - keep in sync with:
Comment thread
yasmoradi marked this conversation as resolved.
// - src/Client/Boilerplate.Client.Maui/Platforms/Windows/Services/WindowsPushNotificationService.cs

using Boilerplate.Shared.Features.PushNotification;

namespace Boilerplate.Client.Windows.Infrastructure.Services;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// [mirror] IStorageService semantics - persistent vs temp storage - keep in sync with:
// - src/Client/Boilerplate.Client.Maui/Infrastructure/Services/MauiStorageService.cs

using System.IO.IsolatedStorage;

namespace Boilerplate.Client.Windows.Infrastructure.Services;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// [mirror] telemetry context properties - keep in sync with:
// - src/Client/Boilerplate.Client.Maui/Infrastructure/Services/MauiTelemetryContext.cs

namespace Boilerplate.Client.Windows.Infrastructure.Services;

public class WindowsTelemetryContext : AppTelemetryContext
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// [mirror] webauthn ceremony driven through the loopback server - keep in sync with:
// - src/Client/Boilerplate.Client.Maui/Infrastructure/Services/MauiWebAuthnService.cs

namespace Boilerplate.Client.Windows.Infrastructure.Services;

public partial class WindowsWebAuthnService : WebAuthnServiceBase
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
//+:cnd:noEmit
// [mirror] blazor hybrid DI registrations, logging and OpenTelemetry setup - keep in sync with:
// - src/Client/Boilerplate.Client.Maui/MauiProgram.Services.cs

using OpenTelemetry;
using OpenTelemetry.Resources;
using System.Diagnostics.Metrics;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
@*+:cnd:noEmit*@
@* [mirror] razor using list of the client projects - keep in sync with: *@
@* - src/Client/Boilerplate.Client.Core/Components/_Imports.razor *@
@* - src/Client/Boilerplate.Client.Web/_Imports.razor *@
@* - src/Client/Boilerplate.Client.Maui/_Imports.razor *@

@using System.Reflection
@using System.Globalization
@using System.Runtime.Loader
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
@*+:cnd:noEmit*@
@* [mirror] host page head tags, stylesheet and script list - keep in sync with: *@
@* - src/Client/Boilerplate.Client.Web/wwwroot/index.html *@
@* - src/Client/Boilerplate.Client.Maui/wwwroot/index.html *@

@using Microsoft.AspNetCore.Http;
@using Boilerplate.Client.Web.Components
@using Boilerplate.Server.Web.Components.Layout
Expand Down
Loading