Based on a pronpt to create a demo domain to illustrate some development principles, the response below can serve as a roadmap for building this demo app.
dotnet ef database update
This should create a ticket.db file in the API project area. Obv, not a production DB or location, but good enough for development and testing purposes.
A strong, realistic domain for this is an internal service request & incident management system (think lightweight IT/help desk) with SLAs, approvals, and escalations. issuetrak
- Familiar mental model: “tickets,” “requests,” “incidents,” and “tasks” exist in almost every enterprise, not just IT. atlassian
- Rich workflows: request intake, triage, assignment, fulfilment, resolution, and closure, with branching for urgent incidents, compliance-related items, and multi-step approvals. synergycodes
- Rule-heavy: SLAs, priority rules, escalation rules, routing rules, and approval matrices all need dynamic evaluation and change over time. ibm
- Entities: Request (or Ticket), Task, SLA, Escalation, Approval, User, Team, Asset/Service, Knowledge Article. issuetrak
- States: New → In Triage → In Progress → Waiting on Customer → Resolved → Closed, plus “On Hold” and “Cancelled” variants. wrike
- Task types: Incident resolution, service fulfillment (e.g., “new laptop” request), change implementation, review tasks, and approval tasks. synergycodes
One concrete example: “Employee requests VPN access” creates a request, spawns an approval task (manager), then a technical task (IT), both under an SLA with response and resolution targets. trailhead.salesforce
- Request intake workflow: Form-based submission, auto-categorization, and initial priority based on impact/urgency rules. atlassian
- SLA tracking workflow: Start SLA timers, track first-response and resolution times, and emit events when thresholds are approaching or breached. manageengine
- Escalation workflow: If a task is still “In Progress” near SLA breach, escalate to a higher-tier group or manager and increase priority. purplegriffon
- Approval workflow: Multi-step approvals for specific categories (e.g., software over a cost threshold), with parallel or sequential approval tasks. applications-platform
These map nicely onto a state machine plus rule-driven transitions, which is ideal for illustrating workflow and rules engines. servicenow
- Routing rules: “If category = Network and priority ≥ High, route to Network Ops team; else route to Service Desk.” issuetrak
- SLA rules: Different SLAs by priority, request type, or customer tier (e.g., VIP users get stricter response times). ibm
- Escalation rules: Trigger escalation events at N minutes before or after SLA breach; send notifications, reassign, or bump priority. manageengine
- Approval rules: Use matrices like “If cost > X and application is ‘Finance system’, require Finance + Security approvals.” spendflo
These rules can be modeled as data-driven policies or a rules engine, making it easy to demo dynamic business decisions and configuration-driven behavior. trailhead.salesforce
You can treat “Requests” and “Tasks” as your core aggregates, then use:
- Commands: SubmitRequest, ApproveTask, StartTask, CompleteTask, ReassignTask, ConfigureSla, ConfigureRuleSet, etc. servicenow
- Events: RequestSubmitted, RequestCategorized, SlaApplied, SlaBreached, TaskEscalated, ApprovalGranted, ApprovalRejected. purplegriffon
- Queries: GetRequestDetails, ListMyTasks, GetSlaStatus, GetPendingApprovals, GetBreachRiskDashboard. wrike
That gives you a believable enterprise task management tool whose workflows, SLAs, approvals, and escalations are complex enough to show CQRS, mediator pipelines, rule evaluation, and permission checks, but still small enough to implement as a sample.
If you’d like, I can next sketch the concrete bounded contexts and a minimal set of commands/events that would fit your .NET Aspire + mediator-style CQRS setup.