Commercial food manufacturing operates under strict constraints: perishable inventory, rapid batch scaling, strict allergen segregation, and chaotic factory floor environments where network connectivity cannot be assumed.
The Södervidinge Bakery Enterprise Suite was architected to manage the full lifecycle of industrial bakery operations across 6 core projects: Core, Infrastructure, API, Web, Desktop, and DemoData.
1. Clean Onion Architecture
To ensure the business logic remained completely decoupled from UI frameworks and database drivers, we implemented a strict Onion/Clean Architecture:
graph TD
Domain["Domain Entities & Interfaces<br/>(BakeryEnterprise.Core)"] --> App["Application Use Cases<br/>(Batch Calculations, Order Workflows)"]
App --> Infra["Infrastructure & Persistence<br/>(Entity Framework, SQL Server, Email)"]
App --> API["ASP.NET Core Web API<br/>(REST Endpoints, JWT Auth)"]
App --> Desktop["WPF Factory Terminals<br/>(Touch Interface, Local SQLite Cache)"]
2. Dynamic Batch Scaling & Recipe Hydration
Bakery recipes cannot simply be multiplied linearly. Fermentation times, yeast activity percentages, hydration ratios, and flour humidity alter the required mix parameters.
The calculation engine evaluates:
- Flour Hydration Ratios:
Hydration% = (Water Weight / Total Flour Weight) * 100 - Temperature Control Math: Calculating ice vs. tap water ratios to achieve target dough exit temperatures (
DDT). - Allergen Segregation Matrix: Preventing cross-contamination by scheduling non-allergen batches prior to allergen-containing production runs.
3. Offline-First Factory Floor WPF Terminals
Factory floor touchscreens run a specialized WPF / MAUI desktop application:
- Local SQLite Cache: Operations continue smoothly even if the main plant network drops.
- Bi-directional Sync: Changes queue locally and sync with
BakeryEnterprise.APIvia optimistic concurrency tokens once the connection resumes. - High-Contrast Touch UI: Designed for flour-dusted gloves with oversized hit targets and barcode scanner integration.
The Södervidinge solution demonstrates how enterprise software can achieve rock-solid reliability when business domains are modeled with rigorous software engineering.