Mango.Nop.Libraries/Mango.Nop.Core
Loretta 5535011df9 Comprehensive documentation overhaul and expansion
- Added detailed .md docs for Core, Data, and Services projects: DTOs, NopDependencies, repositories, transactions, services, and logging bridge
- Updated all project README.md files with metadata, documentation tables, inheritance diagrams, and clearer dependency/reference explanations
- Root README.md now includes a documentation map and improved project/type tables
- Expanded and clarified `.github/copilot-instructions.md` as the single source of truth for domain rules, patterns, and conventions
- Updated ARCHITECTURE.md, CONVENTIONS.md, and GLOSSARY.md to document DTO strategies, transaction and logging patterns, project boundaries, and AyCode integration
- Added CLAUDE.md for Claude-specific code authoring guidance
- All .csproj files now include new docs as non-compilable content
- Ensured clear separation of concerns and improved AI/tooling discoverability across the codebase
2026-03-30 10:26:35 +02:00
..
Dtos Add serialization attributes and update to PROD config 2026-03-20 17:06:49 +01:00
Entities Add ToonDescription attributes to core entities and DTOs 2026-01-15 11:34:06 +01:00
Extensions improvements, fixes 2025-11-26 09:42:07 +01:00
Interfaces improvements, fixes 2025-11-26 09:42:07 +01:00
Loggers refactoring, cleanup, etc... 2025-10-22 15:16:20 +02:00
Models Minimal SignalR test hub and endpoint for isolated testing 2025-12-11 23:46:36 +01:00
NopDependencies Add serialization attributes and update to PROD config 2026-03-20 17:06:49 +01:00
Services SignalR improvements; etc... 2025-10-30 14:54:33 +01:00
Utils Mango.Nop.Core cleanup; 2025-11-05 14:56:40 +01:00
docs Comprehensive documentation overhaul and expansion 2026-03-30 10:26:35 +02:00
Mango.Nop.Core.csproj Comprehensive documentation overhaul and expansion 2026-03-30 10:26:35 +02:00
NopCommonConst.cs temp 2025-09-02 15:21:57 +02:00
README.md Comprehensive documentation overhaul and expansion 2026-03-30 10:26:35 +02:00

README.md

Mango.Nop.Core

@project { type = "framework" own-dep-projects = [ "AyCode.Core, AyCode.Core.Server, AyCode.Entities, AyCode.Entities.Server, AyCode.Interfaces, AyCode.Interfaces.Server, AyCode.Utils (in AyCode.Core repo)" ] }

Shared domain library containing entities, DTOs, interfaces, and nopCommerce entity mirrors. net9.0. Zero nopCommerce runtime dependency.

Documentation

Document Topic
DTOS.md DTO system — two mapping strategies, all DTO types, GenericAttribute typed access
NOP_DEPENDENCIES.md NopDependencies pattern — mirror copies, namespace rules, file list

Folder Structure

Folder Purpose
Dtos/ DTO classes shared across consumers
Entities/ Custom domain entities
Extensions/ Extension methods for BaseEntity collections and GenericAttribute
Interfaces/ DTO interfaces, soft-delete, foreign key markers
Loggers/ ILogger / Logger — logging abstraction wrapping AyCode logger
Models/ Login request/response models
NopDependencies/ Mirror copies of nopCommerce entity classes (same namespaces as originals)
Services/ IMgLockService interface
Utils/ CommonHelper2 — email validation, type conversion utilities

Entity Hierarchy

Nop.Core.BaseEntity (NopDependencies/, implements IBaseEntity)
  +-- MgEntityBase (Entities/, implements IEntityInt from AyCode)
        +-- MgOrderDto<TOrderItemDto, TProductDto>
        +-- MgOrderItemDto<TProductDto>
        +-- MgProductDto
        +-- MgStockQuantityHistoryDto<TProductDto>
        +-- MgStockTaking<TStockTakingItem>
        +-- MgStockTakingItem<TStockTaking, TProduct>

Key Types (not in docs/)

Entities

Type Key features
MgEntityBase Inherits BaseEntity, implements IEntityInt. ToString() -> "{TypeName}; Id: {Id}"
MgStockTaking<TStockTakingItem> StartDateTime, IsClosed, List<TStockTakingItem> navigation. Implements ITimeStampInfo
MgStockTakingItem<TStockTaking, TProduct> StockTakingId, ProductId, IsMeasured, stock quantities. Navigations to parent and product

Extensions

Method Purpose
UpdateBaseEntityCollection Add/update/remove entities in a list by Id match

Loggers

Extends AyCode logging infrastructure — for base types see AyCode.Core/docs/LOGGING.md.

Type Inherits Purpose
ILogger IAcLoggerBase Mango-level logger interface
ILogger<TCategory> ILogger Generic category logger interface
Logger AcLoggerBase Logger implementation with IAcLogWriterBase[] writers
Logger<TCategory> Logger Typed logger — category name from typeof(TCategory).Name

Models

Type Purpose
MgLoginModelRequest Email + Password for SignalR/API login
MgLoginModelResponse CustomerDto? + ErrorMessage. Computed IsSuccesLogin

Other

Type Purpose
NopCommonConst Abstract const class inheriting AcConst (placeholder)
CommonHelper2 Email validation, IP validation, type conversion (To<T>), string utilities

Dependencies

  • linq2db — data access, [Association] / [Table] attributes
  • Microsoft.AspNetCore.Mvc.NewtonsoftJson — JSON serialization
  • Binary serialization: AcBinarySerializer (see AyCode.Core/docs/BINARY_FORMAT.md). SignalR transport: AcSignalR (see AyCode.Core/AyCode.Services/docs/SIGNALR.md).
  • AyCode DLL references: AyCode.Interfaces, AyCode.Core, AyCode.Utils, AyCode.Entities (types only, no runtime nopCommerce dependency)