Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
Prompt: Create Plugin
Purpose
Scaffold a new installable GrandNode plugin end to end, with the correct project shape, manifest, provider registration, and install/uninstall behavior.
Inputs Required
- Repository root.
- Plugin kind: payment, shipping, tax, widget, external authentication, discount rule, exchange rate, or theme.
- System name, following
{Group}.{Name}(e.g.Payments.Adyen,Widgets.Chat). - Friendly name shown in the admin plugin list.
- Whether the plugin needs admin configuration, storefront UI, persisted settings, or its own data collection.
Steps
- Read
.ai/knowledge/plugin-types.mdfor the inventory, structure, and manifest rules. - Read the skill for the plugin kind:
- payment →
.ai/skills/plugin-payment.md - shipping →
.ai/skills/plugin-shipping.md - widget →
.ai/skills/plugin-widget.md - discount rule →
.ai/skills/plugin-discount-rules.md - theme →
.ai/skills/theme-creation.md - anything else →
.ai/skills/plugin-module.md
- payment →
- Read
.ai/templates/plugin/and copy the skeleton files that apply. Read.ai/examples/for a worked end-to-end plugin. - Pick the closest existing plugin in
src/Plugins/and diff your scaffold against it. State which one you used. - Create the project and add it to
GrandNode.slnx. - Wire up in this order:
.csproj— SDK,Grand.Common.propsimport, output path,Private=falsereferences.Manifest.cs—[assembly: PluginInfo(...)]with an existingGroupvalue.{Feature}Defaults.cs— system name, friendly-name resource key, configuration URL.{Feature}Settings.cs—ISettingsimplementation, when settings are persisted.{Feature}Provider.cs— the provider interface for the plugin kind.{Feature}Plugin.cs—BasePlugin,Install()/Uninstall().StartupApplication.cs—IStartupApplicationregistrations.Areas/Admin/controller +Configure.cshtml, when configurable.Views/,Components/,Controllers/,EndpointProvider.cs, when the plugin has storefront UI.logo.jpg.
- Verify the build output lands in
src/Web/Grand.Web/Plugins/{SystemName}/. - Run
.ai/prompts/review-change.mdon the result.
Mandatory Rules
SystemNameinManifest.csmust equal the value in{Feature}Defaultsand the output folder name.Groupmust be one of the existing group names in.ai/knowledge/plugin-types.md.- Import
src/Build/Grand.Plugin.propsfor the shared host references; do not repeat them in the plugin. Anything referenced beyond that set must bePrivate="false". - Use
Microsoft.NET.Sdk.Razorwhen the plugin contains.cshtmlfiles,Microsoft.NET.Sdkotherwise. Install()saves default settings and adds localization resources, then callsbase.Install()last.Uninstall()deletes settings and removes localization resources, then callsbase.Uninstall()last.- Admin controllers carry
[AuthorizeAdmin],[Area("Admin")], and the correct[PermissionAuthorize(...)]. - Add package references without versions — versions live in
Directory.Packages.props.
Output Format
- Plugin: system name, group, friendly name.
- Reference plugin: which existing plugin the scaffold follows.
- Files created: path + purpose.
- Registration: services registered and where.
- Install/Uninstall: settings and resource keys handled.
- Validation: build result and confirmed output path.
- Remaining work: what the author still has to fill in (credentials, API calls, views).