diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 62e571fc..00613885 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1,9 +1,15 @@ # FruitBankHybridApp — Domain Rules +@repo { + type = "product" + layer = 2 + own-dep-repos = ["AyCode.Core", "AyCode.Blazor", "Mango.Nop Libraries"] +} + > This is the **single source of truth** for domain rules. Do not duplicate these elsewhere. > For detailed docs see: `README.md` → `docs/` -> For core framework rules see: `../../../Aycode/Source/AyCode.Core/.github/copilot-instructions.md` -> For UI framework rules see: `../../../Aycode/Source/AyCode.Blazor/.github/copilot-instructions.md` +> For core framework rules see: `.github/copilot-instructions.md` (in AyCode.Core repo) +> For UI framework rules see: `.github/copilot-instructions.md` (in AyCode.Blazor repo) > For nopCommerce library rules see: `../NopCommerce.Common/4.70/Libraries/.github/copilot-instructions.md` ## Business Domain @@ -30,7 +36,7 @@ 12. All AyCode references are via **DLL** (not ProjectReference) — this is intentional. nopCommerce 4.80.9 requirement. 13. **No redundant code** — before writing new logic, search for existing methods. Reuse or extract shared logic into smaller methods rather than duplicating. 14. **Keep all .md files in sync** — when you modify code, update any affected .md file in the same area. If you already read an .md file during your work and notice it contradicts the current code, fix the discrepancy — but do NOT proactively scan or open .md files just to check for issues. -15. **MgGridBase** (AyCode.Blazor) is the canonical grid base for all data screens. New grids inherit `FruitBankGridBase`, set CRUD tags in the constructor, and use `MgGridWithInfoPanel` for layout. See `AyCode.Blazor/docs/MGGRID.md` for the full technical reference. Do NOT create parallel grid base classes. +15. **MgGridBase** (AyCode.Blazor) is the canonical grid base for all data screens. New grids inherit `FruitBankGridBase`, set CRUD tags in the constructor, and use `MgGridWithInfoPanel` for layout. See `AyCode.Blazor.Components/docs/MGGRID.md` (in AyCode.Blazor repo) for the full technical reference. Do NOT create parallel grid base classes. 16. **AyCode.Core** solution (`../../../Aycode/Source/AyCode.Core/`) contains all core framework code: SignalR base classes, serialization, binary protocol, data sources, logging. When a type is referenced but not defined in this solution, look it up in AyCode.Core source and docs. 17. **AyCode.Blazor** solution (`../../../Aycode/Source/AyCode.Blazor/`) contains all UI framework code: MgGridBase, MgGridWithInfoPanel, toolbar, layout persistence, Blazor component infrastructure. When a UI base class or component is not found here, look it up in AyCode.Blazor source and docs. 18. **Mango.Nop Libraries** (`../NopCommerce.Common/4.70/Libraries/`) — independent shared library with its own `.github/copilot-instructions.md` and `docs/`. Contains DTOs, entities, data access, and service base classes. When a DTO or entity base class is not found in this solution, look it up in the Libraries source and docs. diff --git a/FruitBank.Common.Server/README.md b/FruitBank.Common.Server/README.md index c6b912af..29f128dd 100644 --- a/FruitBank.Common.Server/README.md +++ b/FruitBank.Common.Server/README.md @@ -1,5 +1,13 @@ # FruitBank.Common.Server +@project { + type = "product" + own-dep-projects = [ + "AyCode.Core, AyCode.Interfaces, AyCode.Models.Server, AyCode.Services, AyCode.Services.Server (in AyCode.Core repo)", + "Mango.Nop.Core (in Mango.Nop Libraries repo)" + ] +} + Server-side library: SignalR hubs, real-time broadcast service, logging infrastructure, and nopCommerce integration constants. ## Folder Structure diff --git a/FruitBank.Common/README.md b/FruitBank.Common/README.md index a5006865..551b01dc 100644 --- a/FruitBank.Common/README.md +++ b/FruitBank.Common/README.md @@ -1,5 +1,13 @@ # FruitBank.Common +@project { + type = "product" + own-dep-projects = [ + "AyCode.Core, AyCode.Entities, AyCode.Interfaces, AyCode.Models, AyCode.Services, AyCode.Utils (in AyCode.Core repo)", + "Mango.Nop.Core (in Mango.Nop Libraries repo)" + ] +} + Shared domain library for the FruitBank nopCommerce plugin. Contains entities, DTOs, interfaces, measurement helpers, SignalR tags, and constants for fruit & vegetable wholesale operations. ## Folder Structure @@ -27,4 +35,4 @@ Shared domain library for the FruitBank nopCommerce plugin. Contains entities, D - **Shipping = INBOUND** (supplier → warehouse), **Order = OUTBOUND** (warehouse → customer) - **"Pallet" = measurement record**, always created even for non-measurable products - **NetWeight = GrossWeight − PalletWeight − (TrayQuantity × TareWeight)** -- See [`docs/GLOSSARY.md`](../docs/GLOSSARY.md) for full terminology +- See `docs/GLOSSARY.md` for full terminology diff --git a/FruitBankHybrid.Shared.Common/README.md b/FruitBankHybrid.Shared.Common/README.md index 77a4f32a..8bd76e8e 100644 --- a/FruitBankHybrid.Shared.Common/README.md +++ b/FruitBankHybrid.Shared.Common/README.md @@ -1,3 +1,7 @@ # FruitBankHybrid.Shared.Common +@project { + type = "product" +} + Shared common library. Currently a placeholder — no source files yet. .NET 10.0 with AOT enabled. diff --git a/FruitBankHybrid.Shared.Tests/README.md b/FruitBankHybrid.Shared.Tests/README.md index b303aa65..a927b3a8 100644 --- a/FruitBankHybrid.Shared.Tests/README.md +++ b/FruitBankHybrid.Shared.Tests/README.md @@ -1,5 +1,13 @@ # FruitBankHybrid.Shared.Tests +@project { + type = "test" + own-dep-projects = [ + "AyCode.Entities, AyCode.Services, AyCode.Utils (in AyCode.Core repo)", + "Mango.Nop.Core, Mango.Nop.Services (in Mango.Nop Libraries repo)" + ] +} + MSTest integration and serialization tests. Covers SignalR client operations, JSON reference handling, binary serialization, Toon format, and bunit component rendering. ## Folder Structure diff --git a/FruitBankHybrid.Shared/README.md b/FruitBankHybrid.Shared/README.md index 2187cd32..08bfb4e5 100644 --- a/FruitBankHybrid.Shared/README.md +++ b/FruitBankHybrid.Shared/README.md @@ -1,5 +1,14 @@ # FruitBankHybrid.Shared +@project { + type = "product" + own-dep-projects = [ + "AyCode.Core, AyCode.Entities, AyCode.Interfaces, AyCode.Models, AyCode.Services, AyCode.Services.Server, AyCode.Utils (in AyCode.Core repo)", + "AyCode.Blazor.Components (in AyCode.Blazor repo)", + "Mango.Nop.Core (in Mango.Nop Libraries repo)" + ] +} + Main Blazor UI library shared across all three deployment targets (Server, WASM, MAUI). Contains pages, DevExpress grid components, SignalR client, measurement service, and layout. ## Folder Structure diff --git a/FruitBankHybrid.Web.Client/README.md b/FruitBankHybrid.Web.Client/README.md index 460ca7fc..db3a1d66 100644 --- a/FruitBankHybrid.Web.Client/README.md +++ b/FruitBankHybrid.Web.Client/README.md @@ -1,5 +1,13 @@ # FruitBankHybrid.Web.Client +@project { + type = "product" + own-dep-projects = [ + "AyCode.Core, AyCode.Core.Server, AyCode.Entities, AyCode.Entities.Server, AyCode.Interfaces, AyCode.Interfaces.Server, AyCode.Models, AyCode.Models.Server, AyCode.Services, AyCode.Services.Server, AyCode.Utils (in AyCode.Core repo)", + "Mango.Nop.Core (in Mango.Nop Libraries repo)" + ] +} + Blazor WebAssembly client running in the browser after server prerendering. .NET 10.0. ## Folder Structure diff --git a/FruitBankHybrid.Web/README.md b/FruitBankHybrid.Web/README.md index f323bdda..f82738b2 100644 --- a/FruitBankHybrid.Web/README.md +++ b/FruitBankHybrid.Web/README.md @@ -1,5 +1,13 @@ # FruitBankHybrid.Web +@project { + type = "product" + own-dep-projects = [ + "AyCode.Core, AyCode.Core.Server, AyCode.Entities, AyCode.Entities.Server, AyCode.Interfaces, AyCode.Interfaces.Server, AyCode.Models, AyCode.Models.Server, AyCode.Services, AyCode.Services.Server, AyCode.Utils (in AyCode.Core repo)", + "Mango.Nop.Core (in Mango.Nop Libraries repo)" + ] +} + ASP.NET Core Blazor Server host. Serves the web interface, hosts SignalR hubs, and supports interactive WebAssembly rendering. ## Folder Structure diff --git a/FruitBankHybrid/README.md b/FruitBankHybrid/README.md index 93cd9224..4563217f 100644 --- a/FruitBankHybrid/README.md +++ b/FruitBankHybrid/README.md @@ -1,5 +1,13 @@ # FruitBankHybrid +@project { + type = "product" + own-dep-projects = [ + "AyCode.Core, AyCode.Services, AyCode.Entities (in AyCode.Core repo)", + "Mango.Nop.Core (in Mango.Nop Libraries repo)" + ] +} + .NET MAUI Hybrid cross-platform app hosting Blazor components via BlazorWebView. Targets Android (API 33+), iOS (15.0+), and Windows. ## Folder Structure diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 16558a93..37b802ba 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -18,9 +18,9 @@ FruitBankHybrid FruitBankHybrid.Web FruitBankHybrid.Web.Client All projects also reference **AyCode.Core** (net9.0) and **AyCode.Blazor** (net10.0) via DLL references (not ProjectReference). > **Context:** When a type or base class is not found in this solution, browse the external repos: -> - **AyCode.Core**: `../../../Aycode/Source/AyCode.Core/` — SignalR, serialization, binary protocol, data sources -> - **AyCode.Blazor**: `../../../Aycode/Source/AyCode.Blazor/` — MgGridBase, UI components, layout persistence -> - **Mango.Nop Libraries**: `../NopCommerce.Common/4.70/Libraries/` — independent library with own [copilot-instructions](../NopCommerce.Common/4.70/Libraries/.github/copilot-instructions.md) and [docs/](../NopCommerce.Common/4.70/Libraries/docs/) +> - **AyCode.Core** (in AyCode.Core repo) — SignalR, serialization, binary protocol, data sources +> - **AyCode.Blazor** (in AyCode.Blazor repo) — MgGridBase, UI components, layout persistence +> - **Mango.Nop Libraries**: `../NopCommerce.Common/4.70/Libraries/` — independent library with own `.github/copilot-instructions.md` and `docs/` > - **FruitBank Plugin**: `../NopCommerce.Common/4.70/Plugins/Nop.Plugin.Misc.AIPlugin/` — server-side SignalR hubs, measurement services, DbTable classes ## Target Frameworks @@ -67,7 +67,7 @@ User → DevExpress Grid → AcSignalRDataSource → SignalR (AcBinary) → DevA ## MgGrid — Grid System -All data screens use **MgGridBase** from AyCode.Blazor (see [AyCode.Blazor/docs/MGGRID.md](../../../Aycode/Source/AyCode.Blazor/docs/MGGRID.md) for full technical docs). +All data screens use **MgGridBase** from AyCode.Blazor (see `AyCode.Blazor.Components/docs/MGGRID.md` (in AyCode.Blazor repo) for full technical docs). ### FruitBank Grid Hierarchy @@ -90,7 +90,7 @@ public class FruitBankGridBase : MgGridBase, TDataItem, int, LoggerClient> ``` -Adds FruitBank-specific defaults (master vs detail grid settings, alternating row style, header background). For the full settings table see [`FruitBankHybrid.Shared/Components/Grids/README.md`](../FruitBankHybrid.Shared/Components/Grids/README.md). +Adds FruitBank-specific defaults (master vs detail grid settings, alternating row style, header background). For the full settings table see `FruitBankHybrid.Shared/Components/Grids/README.md`. ### SignalR Tag Mapping diff --git a/docs/CONVENTIONS.md b/docs/CONVENTIONS.md index 22db35d4..ad0c452d 100644 --- a/docs/CONVENTIONS.md +++ b/docs/CONVENTIONS.md @@ -1,7 +1,7 @@ # Conventions -> For core framework conventions see: `../../../Aycode/Source/AyCode.Core/docs/CONVENTIONS.md` -> For UI framework conventions see: `../../../Aycode/Source/AyCode.Blazor/docs/CONVENTIONS.md` +> For core framework conventions see: `CONVENTIONS.md` (in AyCode.Core repo) +> For UI framework conventions see: `CONVENTIONS.md` (in AyCode.Blazor repo) ## Naming @@ -20,7 +20,7 @@ - **GenericAttributes** for extending nopCommerce entities with custom data (IsMeasurable, Tare, AverageWeight). - **Composition interfaces** for measurement traits: IMeasuringValues = IMeasuringWeights + IMeasuringQuantity. - **DevExpress DxGrid** with `AcSignalRDataSource` for real-time grid data. -- **MgGridBase** — canonical grid base from AyCode.Blazor (see [MGGRID.md](../../../Aycode/Source/AyCode.Blazor/docs/MGGRID.md)). Provides SignalR CRUD, layout persistence, master-detail, InfoPanel, fullscreen. +- **MgGridBase** — canonical grid base from AyCode.Blazor (see `AyCode.Blazor.Components/docs/MGGRID.md` (in AyCode.Blazor repo)). Provides SignalR CRUD, layout persistence, master-detail, InfoPanel, fullscreen. - **FruitBankGridBase** — project adapter that fixes `TId=int`, `TLoggerClient=LoggerClient`, adds per-user layout and master/detail defaults. - **FruitBankSignalRClient** as single hub client for all server communication. - **DatabaseClient** for client-side caching with ConcurrentDictionary tables. diff --git a/docs/GLOSSARY.md b/docs/GLOSSARY.md index e0c769da..4c78c6ea 100644 --- a/docs/GLOSSARY.md +++ b/docs/GLOSSARY.md @@ -1,7 +1,7 @@ # Glossary / Fogalomtár -> For core framework glossary see: `../../../Aycode/Source/AyCode.Core/docs/GLOSSARY.md` -> For UI framework glossary see: `../../../Aycode/Source/AyCode.Blazor/docs/GLOSSARY.md` +> For core framework glossary see: `GLOSSARY.md` (in AyCode.Core repo) +> For UI framework glossary see: `GLOSSARY.md` (in AyCode.Blazor repo) Domain terminology for the FruitBank system. **Read this before making changes.** @@ -64,8 +64,8 @@ FruitBank extends them via: ## UI / Grid Components -For MgGrid framework terms (MgGridBase, MgGridWithInfoPanel, MgGridToolbarBase, MgGridDataColumn, MgGridInfoPanel, IMgGridBase, etc.) see [`AyCode.Blazor/docs/GLOSSARY.md`](../../../Aycode/Source/AyCode.Blazor/docs/GLOSSARY.md#mggrid-system) and [`MGGRID.md`](../../../Aycode/Source/AyCode.Blazor/docs/MGGRID.md). +For MgGrid framework terms (MgGridBase, MgGridWithInfoPanel, MgGridToolbarBase, MgGridDataColumn, MgGridInfoPanel, IMgGridBase, etc.) see `GLOSSARY.md` (in AyCode.Blazor repo) and `AyCode.Blazor.Components/docs/MGGRID.md` (in AyCode.Blazor repo). | Term | Definition | |---|---| -| **FruitBankGridBase** | Project-level adapter: fixes `TSignalRDataSource=SignalRDataSourceObservable`, `TId=int`, `TLoggerClient=LoggerClient`. Adds per-user layout, master/detail defaults. See [`Grids/README.md`](../FruitBankHybrid.Shared/Components/Grids/README.md). | +| **FruitBankGridBase** | Project-level adapter: fixes `TSignalRDataSource=SignalRDataSourceObservable`, `TId=int`, `TLoggerClient=LoggerClient`. Adds per-user layout, master/detail defaults. See `FruitBankHybrid.Shared/Components/Grids/README.md`. | diff --git a/docs/SCHEMA.md b/docs/SCHEMA.md index bba5b0a7..7236c454 100644 --- a/docs/SCHEMA.md +++ b/docs/SCHEMA.md @@ -1,6 +1,6 @@ # Domain Model Schema (Toon Format) -> Full domain model in [Toon](../../AyCode.Core/AyCode.Core/Serializers/Toons/README.md) (Token-Oriented Object Notation) format. +> Full domain model in Toon (Token-Oriented Object Notation) format — see `AyCode.Core/Serializers/Toons/README.md` (in AyCode.Core repo). > This is the authoritative schema for entities, DTOs, and enums in the FruitBank domain. @meta {