# BerryApp **Repository Path**: kongdf/BerryApp ## Basic Information - **Project Name**: BerryApp - **Description**: A modern MES demo desktop app built with WPF (.NET 9) using MVVM, DI, and event-driven architecture. Features real-time machine telemetry, order management, and alarm handling. Portfolio-ready. - **Primary Language**: C# - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-05-13 - **Last Updated**: 2026-05-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # πŸ“ BerryApp MES System A modern **Manufacturing Execution System (MES)** desktop application built with **WPF (.NET 9)**, designed using **MVVM architecture**, **dependency injection**, and **modular navigation patterns**. This project simulates a real-world industrial monitoring system, including **machine telemetry**, **order management**, and **alarm handling**, making it suitable as a **portfolio-level enterprise desktop application**. --- ## πŸš€ Key Features ### πŸ“Š Real-Time Dashboard - Live machine status updates (`Running` / `Stopped` / `Error`) - Simulated telemetry (e.g., temperature) - Event-driven alarm triggering ### πŸ“¦ Orders Management - Create and delete production orders - Data binding via `ObservableCollection` - MVVM command-based interactions ### 🚨 Alarm System - Event-driven architecture using a custom `EventBus` - Real-time alarm panel updates - Timestamped alert tracking ### 🧭 Navigation System - Sidebar-based navigation - Dynamic page switching via `ContentControl` - ViewModel β†’ View resolution using `DataTemplate` ### 🧱 Architecture Highlights - Strict **MVVM separation** - Layered design (**UI / Application / Domain / Infrastructure**) - Centralized **Dependency Injection** using `Microsoft.Extensions.DependencyInjection` --- ## 🧩 Project Structure ``` BerryApp/ β”œβ”€β”€ BerryApp.WPF/ # Presentation layer β”‚ β”œβ”€β”€ App.xaml / App.xaml.cs # Bootstrap, DI, DataTemplates β”‚ β”œβ”€β”€ MainWindow.xaml # Shell (Sidebar + ContentControl) β”‚ β”œβ”€β”€ Pages/ β”‚ β”‚ β”œβ”€β”€ DashboardView.xaml # Real-time machine dashboard β”‚ β”‚ β”œβ”€β”€ OrdersView.xaml # Order management UI β”‚ β”‚ └── AlarmsView.xaml # Alarm panel UI β”‚ └── ViewModels/ β”‚ β”œβ”€β”€ MainViewModel.cs # Navigation + orchestration β”‚ β”œβ”€β”€ DashboardViewModel.cs # Monitoring logic β”‚ β”œβ”€β”€ OrdersViewModel.cs # CRUD logic β”‚ └── AlarmsViewModel.cs # Event-driven alarm handling β”œβ”€β”€ BerryApp.Domain/ # Core business entities β”œβ”€β”€ BerryApp.Biz/ # Application services (use cases) β”œβ”€β”€ BerryApp.Infra/ # Infrastructure (PLC, persistence) └── BerryApp.Shared/ # Shared utilities (EventBus, base classes) ``` --- ## βš™οΈ Getting Started ### Prerequisites - .NET 9 SDK - Visual Studio 2022 (17.10+) ### Run the Application ```bash git clone cd BerryApp ``` Open `BerryApp.WPF.sln` in Visual Studio and press **F5**. --- ## πŸ›οΈ Architecture Overview ### πŸ”Ή MVVM Pattern - Views contain no business logic - ViewModels expose bindable state and commands - Full separation of concerns ### πŸ”Ή Navigation Mechanism ``` Sidebar Button β†’ Command β†’ NavigationService β†’ CurrentView ↓ ContentControl (UI) ``` - `ContentControl` binds to `CurrentView` - `DataTemplate` maps ViewModel β†’ View automatically ### πŸ”Ή Event-Driven Design ``` Machine Update β†’ EventBus β†’ AlarmEvent β†’ AlarmsViewModel β†’ UI ``` - Decouples modules - Enables real-time UI updates ### πŸ”Ή Dependency Injection Configured in `App.xaml.cs`: - Services (`MachineService`, `PlcService`) - ViewModels - `NavigationService` - `EventBus` --- ## πŸ› οΈ Technologies Used - **WPF (.NET 9)** - **MVVM Pattern** - **Microsoft.Extensions.DependencyInjection** - **ObservableCollection / INotifyPropertyChanged** - **Custom Event Bus** (lightweight pub/sub) --- ## πŸ“ˆ Roadmap (Next Improvements) This project is designed to evolve toward a **production-grade MES system**: - [ ] Real-time charts (e.g., LiveCharts2) - [ ] Database integration (Dapper + SQL Server) - [ ] PLC communication (Modbus / OPC UA) - [ ] Authentication & role-based UI - [ ] Logging system (Serilog) - [ ] Multi-machine dashboard scaling --- ## Screenshots ![Main Dashboard](Docs/screenshots/Dashboard.png) *Real-time machine status and telemetry* ![Main Dashboard](Docs/screenshots/Orders.png) *Orders data grid* ![Alarm Panel](Docs/screenshots/Alarms.png) *Event‑driven alarm list* --- ## 🎯 Purpose of This Project This project demonstrates: - Enterprise-level WPF architecture - Real-time UI handling - Decoupled system design - Practical MES domain modeling It is intended for: - Portfolio showcase - Interview preparation - Industrial desktop application learning --- ## πŸ“„ License MIT License --- ## 🀝 Contributions Contributions, issues, and suggestions are welcome. Feel free to open a Pull Request or Issue. ---