From e2c49940c6f4b800d6ff67d2f6674812cb6be823 Mon Sep 17 00:00:00 2001 From: Loretta Date: Sun, 29 Mar 2026 09:26:16 +0200 Subject: [PATCH] Update docs: enforce .md sync, clarify structure & TFMs Expanded and clarified solution/project documentation: - Added all top-level docs and docs/ folder as solution items in .sln files - Inserted maintenance notices in all project and subfolder READMEs: require .md sync with code - Main READMEs now include project tables with TFM, purpose, and README links - ARCHITECTURE.md now details dependency graph and TFM rationale - CONVENTIONS.md and copilot-instructions.md require code reuse, no redundancy - Glossary and conventions updated to require terminology/rule updates with code changes - Emphasized DLL-only AyCode.Core refs and nopCommerce .NET 9.0 requirement - Clarified domain terms and intentional typos - No code logic changes; documentation and guidance only --- .github/copilot-instructions.md | 4 ++- FruitBank.Common.Server/Interfaces/README.md | 4 --- FruitBank.Common.Server/README.md | 4 --- .../Services/Loggers/README.md | 4 --- FruitBank.Common.Server/Services/README.md | 4 --- .../Services/SignalRs/README.md | 4 --- FruitBank.Common/Databases/README.md | 4 --- FruitBank.Common/Dtos/README.md | 4 --- FruitBank.Common/Entities/README.md | 4 --- FruitBank.Common/Enums/README.md | 4 --- FruitBank.Common/Helpers/README.md | 4 --- FruitBank.Common/Interfaces/README.md | 4 --- FruitBank.Common/Loggers/README.md | 4 --- FruitBank.Common/Models/README.md | 4 --- FruitBank.Common/README.md | 4 --- FruitBank.Common/Services/README.md | 4 --- FruitBank.Common/SignalRs/README.md | 4 --- FruitBankHybrid.Shared.Common/README.md | 4 --- FruitBankHybrid.Shared.Tests/README.md | 4 --- .../TestData/README.md | 4 --- .../Components/Grids/README.md | 4 --- FruitBankHybrid.Shared/Components/README.md | 4 --- FruitBankHybrid.Shared/Databases/README.md | 4 --- FruitBankHybrid.Shared/Extensions/README.md | 4 --- FruitBankHybrid.Shared/Layout/README.md | 4 --- FruitBankHybrid.Shared/Models/README.md | 4 --- FruitBankHybrid.Shared/Pages/README.md | 4 --- FruitBankHybrid.Shared/README.md | 4 --- .../Services/Loggers/README.md | 4 --- FruitBankHybrid.Shared/Services/README.md | 4 --- .../Services/SignalRs/README.md | 4 --- FruitBankHybrid.Web.Client/README.md | 4 --- FruitBankHybrid.Web.Client/Services/README.md | 4 --- FruitBankHybrid.Web/Components/README.md | 4 --- FruitBankHybrid.Web/README.md | 4 --- FruitBankHybrid.Web/Services/README.md | 4 --- FruitBankHybrid.sln | 13 ++++++- FruitBankHybrid/Platforms/README.md | 4 --- FruitBankHybrid/README.md | 4 --- FruitBankHybrid/Services/README.md | 4 --- README.md | 30 ++++++++-------- docs/ARCHITECTURE.md | 34 +++++++++++++------ docs/CONVENTIONS.md | 10 +++--- docs/GLOSSARY.md | 4 --- 44 files changed, 59 insertions(+), 188 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 1b770d4f..11552aad 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -24,4 +24,6 @@ ## Technical 10. SignalR uses **AcBinaryHubProtocol** (custom binary), not default JSON. 11. Do not suggest removal/rollback as a solution — find a fix for the problem. -12. All AyCode references are via **DLL** (not ProjectReference) — this is intentional. +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 (README.md, docs/, GLOSSARY, ARCHITECTURE, CONVENTIONS, SCHEMA, etc.). If you notice any .md content does not match the current code, fix it automatically. diff --git a/FruitBank.Common.Server/Interfaces/README.md b/FruitBank.Common.Server/Interfaces/README.md index a833e99d..69d35c89 100644 --- a/FruitBank.Common.Server/Interfaces/README.md +++ b/FruitBank.Common.Server/Interfaces/README.md @@ -7,7 +7,3 @@ Server-side marker interfaces extending the shared Common interfaces. Used for D - **`IFruitBankDataControllerServer.cs`** — Extends IFruitBankDataControllerCommon. Empty server marker. - **`ICustomOrderSignalREndpointServer.cs`** — Extends ICustomOrderSignalREndpointCommon. Empty server marker. - **`IStockSignalREndpointServer.cs`** — Extends IStockSignalREndpointCommon. Empty server marker. - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBank.Common.Server/README.md b/FruitBank.Common.Server/README.md index dc242989..c6b912af 100644 --- a/FruitBank.Common.Server/README.md +++ b/FruitBank.Common.Server/README.md @@ -18,7 +18,3 @@ Server-side library: SignalR hubs, real-time broadcast service, logging infrastr - nopCommerce via Mango.Nop.Core - AyCode.Core, AyCode.Services.Server (DLL references) - Microsoft.AspNetCore.SignalR - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBank.Common.Server/Services/Loggers/README.md b/FruitBank.Common.Server/Services/Loggers/README.md index f11701dd..e369affc 100644 --- a/FruitBank.Common.Server/Services/Loggers/README.md +++ b/FruitBank.Common.Server/Services/Loggers/README.md @@ -6,7 +6,3 @@ Server-side logging implementations. - **`ConsoleLogWriter.cs`** — Lightweight console logger extending AcConsoleLogWriter. Configurable by AppType, LogLevel, category. - **`LoggerToLoggerApiController.cs`** — Aggregates multiple IAcLogWriterBase implementations into a single logger for API controllers. - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBank.Common.Server/Services/README.md b/FruitBank.Common.Server/Services/README.md index d36617e5..9fe542c5 100644 --- a/FruitBank.Common.Server/Services/README.md +++ b/FruitBank.Common.Server/Services/README.md @@ -8,7 +8,3 @@ Server-side SignalR hubs, real-time broadcast, and logging infrastructure. |---|---| | [`Loggers/`](Loggers/README.md) | Console and API controller log writers | | [`SignalRs/`](SignalRs/README.md) | SignalR hubs and broadcast service | - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBank.Common.Server/Services/SignalRs/README.md b/FruitBank.Common.Server/Services/SignalRs/README.md index 59c46b63..f3d9ec38 100644 --- a/FruitBank.Common.Server/Services/SignalRs/README.md +++ b/FruitBank.Common.Server/Services/SignalRs/README.md @@ -8,7 +8,3 @@ SignalR hub implementations and real-time broadcast service. - **`AcWebSignalRHubWithSessionBase.cs`** — Generic base hub with session management (OnConnected/OnDisconnected hooks). - **`SignalRSendToClientService.cs`** — Broadcasts real-time notifications to all clients: SendOrderChanged, SendOrderItemChanged, SendShippingChanged, SendProductChanged, etc. - **`LoggerSignalRHub.cs`** — Minimal hub for logging/diagnostics. - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBank.Common/Databases/README.md b/FruitBank.Common/Databases/README.md index 0a9f108b..d4eb2559 100644 --- a/FruitBank.Common/Databases/README.md +++ b/FruitBank.Common/Databases/README.md @@ -5,7 +5,3 @@ Local in-memory database abstraction for offline/cached data using ConcurrentDic ## Key Files - **`DatabaseLocalBase.cs`** — Abstract base with generic table management for IEntityInt entities. Thread-safe AddTable, GetRows, GetRow, AddRow, AddRows, DeleteRow. - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBank.Common/Dtos/README.md b/FruitBank.Common/Dtos/README.md index 894cbf43..76fdea7f 100644 --- a/FruitBank.Common/Dtos/README.md +++ b/FruitBank.Common/Dtos/README.md @@ -13,7 +13,3 @@ Binary-serializable DTOs for efficient SignalR communication. All marked with `[ ## Why DTOs Exist nopCommerce entities (Order, OrderItem, Product) are extended with measurement logic via these DTOs. The DTOs add computed properties and GenericAttribute access that the raw nopCommerce entities don't have. - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBank.Common/Entities/README.md b/FruitBank.Common/Entities/README.md index 408db657..e3d2d811 100644 --- a/FruitBank.Common/Entities/README.md +++ b/FruitBank.Common/Entities/README.md @@ -31,7 +31,3 @@ Domain entities for inbound/outbound goods tracking and inventory. All map to `f ## Critical: "Pallet" Naming Despite the name, `XxxItemPallet` entities are **measurement records**, NOT physical pallets. They are ALWAYS created for every item. For non-measurable products, weights = 0.0 and only TrayQuantity is tracked. - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBank.Common/Enums/README.md b/FruitBank.Common/Enums/README.md index a1fed4cb..3b93128e 100644 --- a/FruitBank.Common/Enums/README.md +++ b/FruitBank.Common/Enums/README.md @@ -5,7 +5,3 @@ Core enumeration types for measurement and document classification. ## Key Files - **`MeasuringStatus.cs`** — NotStarted(0) → Started(10) → **Finnished**(20) → Audited(30). Note: "Finnished" is an intentional legacy typo — do NOT fix. - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBank.Common/Helpers/README.md b/FruitBank.Common/Helpers/README.md index a3b15bfc..90e5679a 100644 --- a/FruitBank.Common/Helpers/README.md +++ b/FruitBank.Common/Helpers/README.md @@ -7,7 +7,3 @@ Measurement aggregation utilities. - **`MeasuringValuesHelper.cs`** — Static helper for rolling up pallet-level measurements to shipping item level. - `SetShippingItemTotalMeasuringValues()` — Sums quantities and weights from all pallets. - `GetTotalNetAndGrossWeightFromPallets()` — Returns (Quantity, NetWeight, GrossWeight) tuple. - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBank.Common/Interfaces/README.md b/FruitBank.Common/Interfaces/README.md index a6fc2c63..47680f21 100644 --- a/FruitBank.Common/Interfaces/README.md +++ b/FruitBank.Common/Interfaces/README.md @@ -27,7 +27,3 @@ SignalR endpoint contracts, measurement composition traits, and entity interface - **`IMeasurementServiceBase`** — Base service marker - **`ISecureCredentialService`** — Save/retrieve/clear credentials with 2-day expiration - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBank.Common/Loggers/README.md b/FruitBank.Common/Loggers/README.md index c602f14e..b921ec05 100644 --- a/FruitBank.Common/Loggers/README.md +++ b/FruitBank.Common/Loggers/README.md @@ -5,7 +5,3 @@ SignalR client-to-server log writer. ## Key Files - **`SignaRClientLogItemWriter.cs`** — Routes client logs to `{BaseUrl}/loggerHub` via SignalR. Configurable by AppType and LogLevel. - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBank.Common/Models/README.md b/FruitBank.Common/Models/README.md index 51dbabf2..ddb8e7ac 100644 --- a/FruitBank.Common/Models/README.md +++ b/FruitBank.Common/Models/README.md @@ -11,7 +11,3 @@ Application and view models for UI state management. ## Subfolders - **`SignalRs/SignalRMessageToClientWithText.cs`** — Generic message wrapper with optional text and typed content. - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBank.Common/README.md b/FruitBank.Common/README.md index 17382442..a5006865 100644 --- a/FruitBank.Common/README.md +++ b/FruitBank.Common/README.md @@ -28,7 +28,3 @@ Shared domain library for the FruitBank nopCommerce plugin. Contains entities, D - **"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 - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBank.Common/Services/README.md b/FruitBank.Common/Services/README.md index 1b02cd23..49eda194 100644 --- a/FruitBank.Common/Services/README.md +++ b/FruitBank.Common/Services/README.md @@ -8,7 +8,3 @@ Business logic services and credential management. - **`ISecureCredentialService.cs`** — Interface: SaveCredentialsAsync (2-day expiry), GetCredentialsAsync, ClearCredentialsAsync. StoredCredentials sealed record. Platform implementations: MAUI → SecureStorage, Web → obfuscated localStorage, Server → no-op. - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBank.Common/SignalRs/README.md b/FruitBank.Common/SignalRs/README.md index 3a3095fb..6070eea0 100644 --- a/FruitBank.Common/SignalRs/README.md +++ b/FruitBank.Common/SignalRs/README.md @@ -17,7 +17,3 @@ SignalR method identifiers as numeric constants for type-safe client-server comm - **195-200:** Authentication - **500+:** Server→client notifications (SendOrderChanged, SendShippingChanged, etc.) - **1000+:** Diagnostic/Logging - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBankHybrid.Shared.Common/README.md b/FruitBankHybrid.Shared.Common/README.md index 424dac53..77a4f32a 100644 --- a/FruitBankHybrid.Shared.Common/README.md +++ b/FruitBankHybrid.Shared.Common/README.md @@ -1,7 +1,3 @@ # FruitBankHybrid.Shared.Common Shared common library. Currently a placeholder — no source files yet. .NET 10.0 with AOT enabled. - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBankHybrid.Shared.Tests/README.md b/FruitBankHybrid.Shared.Tests/README.md index 30322629..b303aa65 100644 --- a/FruitBankHybrid.Shared.Tests/README.md +++ b/FruitBankHybrid.Shared.Tests/README.md @@ -19,7 +19,3 @@ MSTest integration and serialization tests. Covers SignalR client operations, JS - **`SandboxEndpointSimpleTests.cs`** — Endpoint connectivity and SignalR negotiate tests. - **`GridPartnerBaseTests.cs`** — Grid component tests (disabled). - **`GridPartnerRazorTests.cs`** — bunit Blazor rendering tests (disabled). - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBankHybrid.Shared.Tests/TestData/README.md b/FruitBankHybrid.Shared.Tests/TestData/README.md index 34646156..ae2a7b53 100644 --- a/FruitBankHybrid.Shared.Tests/TestData/README.md +++ b/FruitBankHybrid.Shared.Tests/TestData/README.md @@ -5,7 +5,3 @@ Demo models for Toon serialization testing. ## Key Files - **`ToonTestData.cs`** — TestOrder, TestCustomer, TestOrderItem, TestProduct models with one-to-many relationships and back-references for testing complex object graph serialization. - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBankHybrid.Shared/Components/Grids/README.md b/FruitBankHybrid.Shared/Components/Grids/README.md index ecc510f3..91f3e00a 100644 --- a/FruitBankHybrid.Shared/Components/Grids/README.md +++ b/FruitBankHybrid.Shared/Components/Grids/README.md @@ -14,7 +14,3 @@ Domain-specific DevExpress grid components, one per entity type. All extend MgGr | `ShippingItems/` | GridShippingItemBase — shipping item detail with context awareness | | `Shippings/` | GridShippingBase — master shipping grid | | `StockTakingItems/` | GridStockTakingItemBase — stock taking item grid | - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBankHybrid.Shared/Components/README.md b/FruitBankHybrid.Shared/Components/README.md index 3fda9c99..61781e97 100644 --- a/FruitBankHybrid.Shared/Components/README.md +++ b/FruitBankHybrid.Shared/Components/README.md @@ -16,7 +16,3 @@ DevExpress Blazor grid wrappers, pallet measurement components, and toast notifi | [`Grids/`](Grids/README.md) | Domain-specific grid components by entity type | | [`FileUploads/`](FileUploads/README.md) | File upload components | | [`StockTakings/`](StockTakings/README.md) | Stock taking UI components | - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBankHybrid.Shared/Databases/README.md b/FruitBankHybrid.Shared/Databases/README.md index 9b9b2958..2305124a 100644 --- a/FruitBankHybrid.Shared/Databases/README.md +++ b/FruitBankHybrid.Shared/Databases/README.md @@ -5,7 +5,3 @@ Client-side in-memory table cache using ConcurrentDictionary for offline/fast da ## Key Files - **`DatabaseClient.cs`** — (~250 lines) Local client-side database with typed tables (Shipping, ShippingDocument, ShippingItem, etc.). ProductDtoTable and OrderDtoTable with semaphore-based async loading. DatabaseTableBase generic base. ObjectLock for thread-safe type-based locking. LoadingPanelVisibility global flag. - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBankHybrid.Shared/Extensions/README.md b/FruitBankHybrid.Shared/Extensions/README.md index f3fce043..8a172e08 100644 --- a/FruitBankHybrid.Shared/Extensions/README.md +++ b/FruitBankHybrid.Shared/Extensions/README.md @@ -5,7 +5,3 @@ DevExpress dialog helper extensions. ## Key Files - **`DevexpressComponentExtensions.cs`** — ShowMessageBoxAsync() and ShowConfirmBoxAsync() for DevExpress dialogs. - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBankHybrid.Shared/Layout/README.md b/FruitBankHybrid.Shared/Layout/README.md index 111d6bc9..e698372d 100644 --- a/FruitBankHybrid.Shared/Layout/README.md +++ b/FruitBankHybrid.Shared/Layout/README.md @@ -7,7 +7,3 @@ Application shell: root layout, navigation menu, auto-login, and toast notificat - **`MainLayout.razor`** — Root layout with navigation menu. - **`MainLayout.razor.cs`** — SignalR message handling, auto-login on first render, toast notification for orders, login/logout handling, navigation guards. - **`NavMenu.razor`** — Navigation component. - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBankHybrid.Shared/Models/README.md b/FruitBankHybrid.Shared/Models/README.md index b38a0b30..4b3aafba 100644 --- a/FruitBankHybrid.Shared/Models/README.md +++ b/FruitBankHybrid.Shared/Models/README.md @@ -5,7 +5,3 @@ View models for measuring pages. ## Key Files - **`MeasuringDateSelectorModel.cs`** — Date picker model: ShippingId, DateTime, IsMeasured flag. - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBankHybrid.Shared/Pages/README.md b/FruitBankHybrid.Shared/Pages/README.md index c41f2eae..4ee41c51 100644 --- a/FruitBankHybrid.Shared/Pages/README.md +++ b/FruitBankHybrid.Shared/Pages/README.md @@ -11,7 +11,3 @@ Routed Blazor pages for the FruitBank application. - **`MeasuringIn.razor.cs`** — Shipping measurement: calendar date picker, item detail, pallet recording. - **`MeasuringOut.razor.cs`** — Order measurement/audit: measurement tracking, approval workflow, RevisorId assignment. - **`StockTaking.razor.cs`** — Inventory management: stock taking sessions, item reconciliation. - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBankHybrid.Shared/README.md b/FruitBankHybrid.Shared/README.md index 2d2f5984..2187cd32 100644 --- a/FruitBankHybrid.Shared/README.md +++ b/FruitBankHybrid.Shared/README.md @@ -22,7 +22,3 @@ Main Blazor UI library shared across all three deployment targets (Server, WASM, ## Target Framework .NET 10.0 with AOT compilation and WASM IL stripping enabled. - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBankHybrid.Shared/Services/Loggers/README.md b/FruitBankHybrid.Shared/Services/Loggers/README.md index aea7a603..b40270ab 100644 --- a/FruitBankHybrid.Shared/Services/Loggers/README.md +++ b/FruitBankHybrid.Shared/Services/Loggers/README.md @@ -5,7 +5,3 @@ Custom logger implementations for the FruitBank client. ## Key Files - **`LoggerClient.cs`** — Non-generic and generic `LoggerClient` extending AyCode logger base. - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBankHybrid.Shared/Services/README.md b/FruitBankHybrid.Shared/Services/README.md index 0483dad1..e05d55a6 100644 --- a/FruitBankHybrid.Shared/Services/README.md +++ b/FruitBankHybrid.Shared/Services/README.md @@ -14,7 +14,3 @@ Business logic, SignalR client, measurement helpers, and platform abstractions. |---|---| | [`Loggers/`](Loggers/README.md) | LoggerClient and LoggerClient extending AyCode logger | | [`SignalRs/`](SignalRs/README.md) | FruitBankSignalRClient hub client + DataSource wrappers | - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBankHybrid.Shared/Services/SignalRs/README.md b/FruitBankHybrid.Shared/Services/SignalRs/README.md index a8d266c6..e2625a91 100644 --- a/FruitBankHybrid.Shared/Services/SignalRs/README.md +++ b/FruitBankHybrid.Shared/Services/SignalRs/README.md @@ -6,7 +6,3 @@ Main SignalR hub client and data source wrappers. - **`FruitBankSignalRClient.cs`** — (~343 lines) Central hub client for ALL server communication. Methods for Partners, Shippings, ShippingItems, ShippingDocuments, Orders, OrderItems, OrderItemPallets, Products, StockTaking, GenericAttributes, Authentication. - **`SignalRDataSource.cs`** — `SignalRDataSourceList` and `SignalRDataSourceObservable` wrappers for DevExpress grid binding. - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBankHybrid.Web.Client/README.md b/FruitBankHybrid.Web.Client/README.md index 012ef5aa..460ca7fc 100644 --- a/FruitBankHybrid.Web.Client/README.md +++ b/FruitBankHybrid.Web.Client/README.md @@ -12,7 +12,3 @@ Blazor WebAssembly client running in the browser after server prerendering. .NET - **`Program.cs`** — WASM startup, DI registration. - **`_Imports.razor`** — Global imports. - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBankHybrid.Web.Client/Services/README.md b/FruitBankHybrid.Web.Client/Services/README.md index 15b988f9..64f4d5bf 100644 --- a/FruitBankHybrid.Web.Client/Services/README.md +++ b/FruitBankHybrid.Web.Client/Services/README.md @@ -10,7 +10,3 @@ WASM-specific service implementations. ## Subfolders - **`Loggers/BrowserConsoleLogWriter.cs`** — Browser console logging via JS interop. - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBankHybrid.Web/Components/README.md b/FruitBankHybrid.Web/Components/README.md index fc68d162..0cfa9986 100644 --- a/FruitBankHybrid.Web/Components/README.md +++ b/FruitBankHybrid.Web/Components/README.md @@ -7,7 +7,3 @@ Blazor Server app shell components. - **`App.razor`** — Root component: DevExpress theme, asset configuration, render mode. - **`_Imports.razor`** — Global imports. - **`Pages/Error.razor`** — Error page with request ID tracking. - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBankHybrid.Web/README.md b/FruitBankHybrid.Web/README.md index 4cc91667..f323bdda 100644 --- a/FruitBankHybrid.Web/README.md +++ b/FruitBankHybrid.Web/README.md @@ -13,7 +13,3 @@ ASP.NET Core Blazor Server host. Serves the web interface, hosts SignalR hubs, a ## Key Files (Root) - **`Program.cs`** — DI, SignalR hub mapping (DevAdminSignalRHub, LoggerSignalRHub), 256KB max message size, DevExpress Fluent theme, static asset versioning. - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBankHybrid.Web/Services/README.md b/FruitBankHybrid.Web/Services/README.md index c944cea8..77edae82 100644 --- a/FruitBankHybrid.Web/Services/README.md +++ b/FruitBankHybrid.Web/Services/README.md @@ -6,7 +6,3 @@ Server-side service implementations. - **`FormFactor.cs`** — Returns "Web" as form factor. - **`ServerSecureCredentialService.cs`** — No-op implementation (clients handle credential storage). - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBankHybrid.sln b/FruitBankHybrid.sln index 7aa5222a..a41867c8 100644 --- a/FruitBankHybrid.sln +++ b/FruitBankHybrid.sln @@ -1,4 +1,4 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 18 VisualStudioVersion = 18.0.11222.15 @@ -33,10 +33,21 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution ProjectSection(SolutionItems) = preProject ..\..\..\Aycode\Source\AyCode.Blazor\AyCode.Blazor.Components\Components\Grids\MgGridSignalRDataSource.txt = ..\..\..\Aycode\Source\AyCode.Blazor\AyCode.Blazor.Components\Components\Grids\MgGridSignalRDataSource.txt SqlSchemaCompare_Dev_to_Prod.scmp = SqlSchemaCompare_Dev_to_Prod.scmp + .github\copilot-instructions.md = .github\copilot-instructions.md + CLAUDE.md = CLAUDE.md + README.md = README.md EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AyCode.Blazor.Components.Tests", "..\..\..\Aycode\Source\AyCode.Blazor\AyCode.Blazor.Components.Tests\AyCode.Blazor.Components.Tests.csproj", "{5EFD44C6-DC9E-FEB8-F229-3E07C2E224FA}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{B7D3E8A1-F4C2-4E9D-A6B5-1C3D5E7F9A2B}" + ProjectSection(SolutionItems) = preProject + docs\ARCHITECTURE.md = docs\ARCHITECTURE.md + docs\CONVENTIONS.md = docs\CONVENTIONS.md + docs\GLOSSARY.md = docs\GLOSSARY.md + docs\SCHEMA.md = docs\SCHEMA.md + EndProjectSection +EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AyCode.Core", "..\..\..\Aycode\Source\AyCode.Core\AyCode.Core\AyCode.Core.csproj", "{EC0E3D9A-40DE-52EB-9E66-CFFBB36B5326}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AyCode.Core.Serializers.SourceGenerator", "..\..\..\Aycode\Source\AyCode.Core\AyCode.Core.Serializers.SourceGenerator\AyCode.Core.Serializers.SourceGenerator.csproj", "{1C882DAC-5027-BD65-9F22-A5FFF813FA36}" diff --git a/FruitBankHybrid/Platforms/README.md b/FruitBankHybrid/Platforms/README.md index fff8f242..10533833 100644 --- a/FruitBankHybrid/Platforms/README.md +++ b/FruitBankHybrid/Platforms/README.md @@ -8,7 +8,3 @@ Per-platform entry points for MAUI. - **`iOS/`** — AppDelegate.cs, Program.cs. - **`MacCatalyst/`** — AppDelegate.cs, Program.cs. - **`Windows/`** — App.xaml.cs (WinUI entry point). - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBankHybrid/README.md b/FruitBankHybrid/README.md index ed73329f..93cd9224 100644 --- a/FruitBankHybrid/README.md +++ b/FruitBankHybrid/README.md @@ -16,7 +16,3 @@ - **`MauiProgram.cs`** — DI registration, DevExpress init, SignalR client setup. - **`MainPage.xaml.cs`** — BlazorWebView host page. - **`App.xaml.cs`** — MAUI Application entry point. - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/FruitBankHybrid/Services/README.md b/FruitBankHybrid/Services/README.md index c70f5593..3d323f9a 100644 --- a/FruitBankHybrid/Services/README.md +++ b/FruitBankHybrid/Services/README.md @@ -10,7 +10,3 @@ MAUI platform-specific service implementations. ## Subfolders - **`Loggers/BrowserConsoleLogWriter.cs`** — Browser console logging bridge for BlazorWebView. - ---- - -> **LLM Maintenance:** If you modify code in this folder, update this README to reflect the changes. If you notice the README content does not match the current code, automatically update the README to match the code. diff --git a/README.md b/README.md index 37bbe917..a9d46a2f 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ nopCommerce plugin for FruitBank, a fruit & vegetable wholesaler. Manages supplier inbound delivery (Shipping), outgoing orders (Order), warehouse weighing, and inventory stocktaking. Runs as Blazor Server, Blazor WASM, and MAUI Hybrid (Android/iOS/Windows). +nopCommerce 4.80.9 requires it + ## LLM Context Domain rules and critical pitfalls live in a single file: [`.github/copilot-instructions.md`](.github/copilot-instructions.md) @@ -16,22 +18,18 @@ Detailed docs: [`docs/`](docs/) — GLOSSARY.md, ARCHITECTURE.md, CONVENTIONS.md ## Solution Structure -| Project | Purpose | README | -|---|---|---| -| [`FruitBank.Common`](FruitBank.Common/README.md) | Shared domain: entities, DTOs, interfaces, SignalR tags, measurement helpers | [README](FruitBank.Common/README.md) | -| [`FruitBank.Common.Server`](FruitBank.Common.Server/README.md) | Server-side: SignalR hubs, broadcast service, logging, nopCommerce integration | [README](FruitBank.Common.Server/README.md) | -| [`FruitBankHybrid.Shared`](FruitBankHybrid.Shared/README.md) | Blazor UI: pages, grids, SignalR client, measurement service, layout | [README](FruitBankHybrid.Shared/README.md) | -| [`FruitBankHybrid.Shared.Common`](FruitBankHybrid.Shared.Common/README.md) | Shared common library (placeholder) | [README](FruitBankHybrid.Shared.Common/README.md) | -| [`FruitBankHybrid`](FruitBankHybrid/README.md) | MAUI Hybrid app: Android, iOS, Windows | [README](FruitBankHybrid/README.md) | -| [`FruitBankHybrid.Web`](FruitBankHybrid.Web/README.md) | Blazor Server host with SignalR hubs | [README](FruitBankHybrid.Web/README.md) | -| [`FruitBankHybrid.Web.Client`](FruitBankHybrid.Web.Client/README.md) | Blazor WebAssembly client | [README](FruitBankHybrid.Web.Client/README.md) | +| Project | TFM | Purpose | README | +|---|---|---|---| +| [`FruitBank.Common`](FruitBank.Common/README.md) | net9.0 | Shared domain: entities, DTOs, interfaces, SignalR tags, measurement helpers | [README](FruitBank.Common/README.md) | +| [`FruitBank.Common.Server`](FruitBank.Common.Server/README.md) | net9.0 | Server-side: SignalR hubs, broadcast service, logging, nopCommerce integration | [README](FruitBank.Common.Server/README.md) | +| [`FruitBankHybrid.Shared`](FruitBankHybrid.Shared/README.md) | net10.0 | Blazor UI: pages, grids, SignalR client, measurement service, layout | [README](FruitBankHybrid.Shared/README.md) | +| [`FruitBankHybrid.Shared.Common`](FruitBankHybrid.Shared.Common/README.md) | net10.0 | Shared common library (placeholder) | [README](FruitBankHybrid.Shared.Common/README.md) | +| [`FruitBankHybrid`](FruitBankHybrid/README.md) | net10.0‑android/ios/win | MAUI Hybrid app: Android, iOS, Windows | [README](FruitBankHybrid/README.md) | +| [`FruitBankHybrid.Web`](FruitBankHybrid.Web/README.md) | net10.0 | Blazor Server host with SignalR hubs | [README](FruitBankHybrid.Web/README.md) | +| [`FruitBankHybrid.Web.Client`](FruitBankHybrid.Web.Client/README.md) | net10.0 | Blazor WebAssembly client | [README](FruitBankHybrid.Web.Client/README.md) | ### Test Projects -| Project | Purpose | README | -|---|---|---| -| [`FruitBankHybrid.Shared.Tests`](FruitBankHybrid.Shared.Tests/README.md) | Integration + serialization tests (SignalR, JSON, Toon, bunit) | [README](FruitBankHybrid.Shared.Tests/README.md) | - ---- - -> **LLM Maintenance:** If you modify this solution's structure, update this README to reflect the changes. +| Project | TFM | Purpose | README | +|---|---|---|---| +| [`FruitBankHybrid.Shared.Tests`](FruitBankHybrid.Shared.Tests/README.md) | net10.0 | Integration + serialization tests (SignalR, JSON, Toon, bunit) | [README](FruitBankHybrid.Shared.Tests/README.md) | diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 191d1424..d6237b3f 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -3,19 +3,37 @@ ## Solution Dependency Graph ``` -FruitBank.Common (shared domain) +FruitBank.Common (shared domain, net9.0) ↑ -FruitBank.Common.Server (server-side services, nopCommerce) +FruitBank.Common.Server (server-side services, nopCommerce, net9.0) ↑ -FruitBankHybrid.Shared.Common (shared utilities, placeholder) +FruitBankHybrid.Shared.Common (shared utilities, net10.0) ↑ -FruitBankHybrid.Shared (Blazor UI components, pages, services) +FruitBankHybrid.Shared (Blazor UI components, pages, services, net10.0) ↑ ↑ ↑ FruitBankHybrid FruitBankHybrid.Web FruitBankHybrid.Web.Client -(MAUI Hybrid) (Blazor Server) (Blazor WASM) +(MAUI, net10.0) (Server, net10.0) (WASM, net10.0) ``` -All projects also reference **AyCode.Core** and **AyCode.Blazor** via DLL references (not ProjectReference). +All projects also reference **AyCode.Core** (net9.0) and **AyCode.Blazor** (net10.0) via DLL references (not ProjectReference). + +## Target Frameworks + +nopCommerce 4.80.9 requires .NET 9 + +| Project | TFM | Reason | +|---|---|---| +| FruitBank.Common | net9.0 | nopCommerce entity references | +| FruitBank.Common.Server | net9.0 | nopCommerce server integration | +| FruitBankHybrid.Shared | net10.0 | Blazor UI | +| FruitBankHybrid.Shared.Common | net10.0 | Shared utilities | +| FruitBankHybrid | net10.0‑android/ios/win | MAUI Hybrid | +| FruitBankHybrid.Web | net10.0 | Blazor Server host | +| FruitBankHybrid.Web.Client | net10.0 | Blazor WASM | +| FruitBankHybrid.Shared.Tests | net10.0 | Tests | +| **AyCode.Core** (external) | net9.0 | Foundation — used by nopCommerce layer | +| **AyCode.Blazor** (external) | net10.0 | UI framework | +| **AyCode.Core.Serializers.SourceGenerator** | netstandard2.0 | Roslyn analyzer requirement | ## Three Deployment Targets @@ -49,7 +67,3 @@ User → DevExpress Grid → AcSignalRDataSource → SignalR (AcBinary) → DevA - **Three measurement hierarchies** — Shipping/Order/StockTaking share same base but have different audit rules - **Client-side database** — `DatabaseClient` caches entities in ConcurrentDictionary for offline/fast access - **Platform-specific credential storage** — MAUI uses SecureStorage, Web uses obfuscated localStorage, Server uses no-op - ---- - -> **LLM Maintenance:** If you modify the architecture, update this document. diff --git a/docs/CONVENTIONS.md b/docs/CONVENTIONS.md index 828b10ee..c91ee220 100644 --- a/docs/CONVENTIONS.md +++ b/docs/CONVENTIONS.md @@ -18,6 +18,12 @@ - **FruitBankSignalRClient** as single hub client for all server communication. - **DatabaseClient** for client-side caching with ConcurrentDictionary tables. +## Code Reuse + +- Before writing new code, search the codebase for existing implementations. +- If a method does most of what you need, extract the shared part into a smaller reusable method rather than copying and modifying. +- Prefer composing existing helpers over creating parallel implementations. + ## Critical Rules - **MeasuringStatus.Finnished** — intentional legacy typo. Do NOT fix. @@ -32,7 +38,3 @@ - Status labels and UI text are in Hungarian. - MeasuringStatus display: "Nincs elkezdve", "Elkezdve", "Kész", "Auditált". - Date format follows Hungarian conventions. - ---- - -> **LLM Maintenance:** If you establish new conventions, document them here. diff --git a/docs/GLOSSARY.md b/docs/GLOSSARY.md index 8a4a3434..bb8b2981 100644 --- a/docs/GLOSSARY.md +++ b/docs/GLOSSARY.md @@ -58,7 +58,3 @@ FruitBank extends them via: | IsMeasurable=false means no Pallet | ❌ Pallet is always created, weights just = 0.0 | | NetWeight is stored | ❌ It's calculated: GrossWeight − PalletWeight − (TrayQuantity × TareWeight) | | GenericAttribute is simple | ❌ It's polymorphic: KeyGroup determines which entity type owns the record | - ---- - -> **LLM Maintenance:** If you modify domain terminology or introduce new business concepts, update this glossary.