How hubertfus/brewlogix works
Main Layers and Components
• Presentation Layer
• Blazor Razor Components (Components/Layout, Components/Pages)
• Static Assets (wwwroot: bootstrap CSS/JS)
• Application (Business) Layer
• Program.cs (app startup, DI container)
• Services (BatchService, ClientService, IngredientService, etc.)
• Validation Attributes (AtLeastOneIngredientAttribute, UniqueIngredientsAttribute)
• Data Access Layer
• EF Core AppDbContext (Services/AppDbContext)
• DbContextProvider & DBName (dbhelpers)
• Migrations (BrewLogix/Migrations) & Seeders (BrewLogix/Seeders)
• Database
• Relational DB (PostgreSQL via connection string in appsettings.json)
• External Frameworks & Libraries
• ASP.NET Core, Blazor, EF Core
• Bootstrap (wwwroot/lib/bootstrap)
Relationships and Data Flows
• User ↔ Browser (UI events over HTTP/SignalR for server-side Blazor)
• Browser → Razor Component (user clicks, form submissions)
• Razor Component → Service (injected via DI; calls CRUD methods)
• Service → AppDbContext (LINQ queries, SaveChanges)
• AppDbContext → Database (SQL commands applied)
• Startup Sequence → Migrations & Seeders (automated schema creation and test data)
Architectural Patterns
• Layered Architecture (Presentation → Business → Data → Database)
• Dependency Injection (all services & DbContext registered in Program.cs)
• Repository-like pattern via EF Core DbContext
• Model-View separation: Razor UI vs Models + Services
Technologies
• .NET 7+ / ASP.NET Core Host
• Blazor (Server-Side)
• Entity Framework Core (code-first migrations)
• PostgreSQL (or other RDBMS)
• Bootstrap for responsive UI
• appsettings.json for configuration