How danilobaptistads/smartkiwi works
Project Type and Purpose
• SmartKiwi is a console‐based queue management system written in C#.
• It demonstrates layered architecture (UI, Services, Models) to simulate real‐world queue operations: check‐in, attendant calls, dynamic priority, aging, cycle checks.
File Structure Analysis
• Top-level:
• Program.cs & App.cs – application entry and bootstrap
• SmartKiwi.sln / .csproj – .NET solution and project files
• Models/ – domain objects: Client, Node, Queue (linked-queue implementation)
• Services/ – business logic modules:
• CheckIn, Attendant, QueueBuilder, QueueController (orchestrator), Aging, PrioritiesMatcher, CycleChecker
• Controller/ – console UI screens: InitialUi, MainUi, CheckInUi, AttendantUi, QueueBuilderUi
README Insights
• Clear separation of concerns: UI layer, Services (business rules), Models (data structures)
• Key features: linked queues, priority matching, aging, cycle detection
• No external persistence or web layer (future DB / dashboard modules are planned but not yet implemented)
a. Main Components
• Application Bootstrap: Program.cs → App.cs
• UI Layer: Controller/*Ui.cs classes
• Service Layer: QueueController + specialized services (CheckIn, Attendant, QueueBuilder, Aging, PrioritiesMatcher, CycleChecker)
• Data Model Layer: Node, Queue, Client
• Infrastructure: .NET 9.0 runtime, Console I/O
b. Relationships and Interactions
1. Program.cs initializes App, which constructs the main UI (MainUi).
2. MainUi listens for user input and delegates to sub-UIs (CheckInUi, AttendantUi, QueueBuilderUi).
3. Each UI invokes the appropriate service(s) via QueueController:
– CheckInUi → QueueController.CheckInService → Models (Client → Node → Queue)
– AttendantUi → QueueController.AttendantService → Queue (dequeue, update Client)
– QueueBuilderUi → QueueController.QueueBuilderService
4. Background tasks (Aging, CycleChecker, PrioritiesMatcher) are invoked periodically or within QueueController to recalculate priorities or detect cycles.
c. Architectural Patterns and Principles
– Layered Architecture: clearly separate UI, business logic, data model
– Single Responsibility: each service handles one aspect (check‐in, aging, etc.)
– Dependency Injection (lightweight): App.cs wires up UI → QueueController → individual services
– Modularization: each service is an independent module, enabling future extension (e.g., persistence, web API)
d. Technologies and Frameworks
– C# 9.0 / .NET 9.0
– Console I/O for UI layer
– Custom in‐memory linked list for queue model