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: Implement Feature
Purpose
Implement a new feature or change an existing one in GrandNode without breaking layering, scoping, or existing conventions.
Inputs Required
- Repository root.
- Feature goal stated in user terms (what a customer, store owner, vendor, or admin should be able to do).
- Target area: storefront, admin, store area, vendor area, API module, plugin, or background task.
- Whether the feature needs persisted settings, localization resources, permissions, or new domain entities.
Steps
- Read
AGENTS.mdand identify every skill that applies. A feature that touches UI, data, and permissions needs all three. - Read
.ai/knowledge/repository-map.mdto place each new file in the owning project. - Read
.ai/knowledge/architecture.mdand.ai/knowledge/request-lifecycle.mdbefore adding a controller action, handler, or service. - Read
.ai/knowledge/scoping.mdwhen the feature exposes data that belongs to a store, vendor, customer group, language, or currency. - Locate the closest existing feature of the same shape and follow it. Name the file you are copying from in your output.
- Implement in this order, stopping when a step does not apply:
- Domain entity or settings class in
Grand.Domain. - Repository access through
IRepository<T>in the business layer. - Business service + interface in
Grand.Business.Core/Grand.Business.*. - Mediator command/query + handler for the web layer.
- FluentValidation validator.
- Controller action with the correct authorization attribute.
- View model, Razor view, and localization keys.
- Permission entry and admin sitemap entry, when the feature is admin-facing.
- Migration that seeds settings, resources, permissions, or sitemap entries.
- Unit tests.
- Domain entity or settings class in
- Follow
.ai/standards/naming.mdfor every new type, file, setting key, and localization key. - Build the narrowest affected project. Run the matching test project in
src/Tests/. - Run
.ai/prompts/review-change.mdagainst your own diff before reporting.
Mandatory Rules
- Do not add business logic to controllers — delegate to the mediator or a business service.
- Do not reference concrete MongoDB types from the business layer; use
IRepository<T>. - Do not register services in
Program.cs; useIStartupApplicationin the owning project. - Do not add a NuGet package version inline; add it to
Directory.Packages.props. - Do not hardcode user-facing strings; add localization resources and a migration that imports them.
- Do not add a new permission without a
PermissionProviderentry and a migration. - Do not widen scope beyond the stated goal.
Output Format
- Goal: one sentence restating what was built.
- Files changed: path + one-line reason for each.
- Pattern followed: the existing file(s) used as the template.
- Migration: what the migration seeds, or why none is needed.
- Validation: build and test commands run, with results. Name any command that could not be run.
- Risk: what is untested or assumed.