
Solution Description:
This is the backend solution for the Sales sample application. It is organized into multiple projects that follow a layered architecture so each concern is isolated and easy to run locally.
The entire backend solution is approximately 7,200 lines of code (LOC) across all projects. This is a rough estimate intended to give a sense of scale.
Projects:
Sales.AI - AI/ML helpers for features such as recommendations. ~300 LOC
Sales.Api — ASP.NET Core Web API and app host. Exposes HTTP endpoints and configures services. ~900 LOC
Sales.Archives - Archive management and historical data storage. ~500 LOC
Sales.Calendar - Provides services for managing calendar, subscriptions, events, availability windows, recurrence rules, and conflict detection. ~600 LOC
Sales.Data — Entity Framework Core data access layer and migrations. ~400 LOC
Sales.Domain — Pure domain model (entities, value objects, domain rules) and business logic. ~800 LOC
Sales.Fulfillment - Order fulfillment and logistics management. ~1,200 LOC
Sales.Maintenance - Background and operational services for the Sales backend. ~420 LOC
Sales.MessageBroker - Message broker for realtime asynchronous communication. ~350 LOC
Sales.Services — Application services and orchestration. ~700 LOC
Sales.Utility — Shared helpers and utilities used across the solution. ~200 LOC
Sales.Desktop.Manager — WPF desktop client that consumes the API. ~1,000 LOC
High-level integration:
Sales.Api depends on Sales.Services, Sales.Domain, and Sales.Data to serve HTTP requests.
Sales.Data depends on Sales.Domain for entity types and contains EF Core migrations; Sales.Api is the typical startup project for design-time EF operations.
Sales.Desktop.Manager is an independent WPF client that calls the API (default base URL `https://localhost:7282/api/` configured in `Sales.Desktop.Manager\App.config`).
Sales.Ai is invoked by application services (via Sales.Services) to provide AI-driven features such as recommendations or text processing. It is intentionally kept as an integration layer so the implementation can swap providers or models without changing core domain logic.
Sales.MessageBroker defines message contracts and contains producers/consumers used by Sales.Api, Sales.Fulfillment, and other background services to perform asynchronous work and decouple components.
Sales.Fulfillment subscribes to order/payment events (via the message broker or direct service calls) and handles fulfillment workflows, external provider calls, and inventory reconciliation. It can run as a hosted worker process or container.
Prerequisites:
.NET 10 SDK
Visual Studio 2026 or `dotnet` CLI
SQL Server or other EF Core provider if using a real database