How yasunosubaru/ham-win works
Ham for Windows is a Wuhan University campus desktop client. The main workflow is user interaction through the WPF shell, AppService coordination, optional CAS sign-in and campus-data fetching, then domain calculations and presentation; user data is persisted locally. The README also documents a WinUI 3 presentation that reuses Core and Infrastructure, with a separate real-data bus fetcher. Several feature implementations were not sampled, so those capabilities are represented at their documented module paths without speculative call wiring; Sport and Rating are models/demo-only, not live integrations.
Main entry points: AppService.cs App service · ViewModels Feature view models · App.xaml.cs WPF shell · EducationClient.cs Education client
Components 27
Desktop presentation
- WPF shell
src/Ham.App/App.xaml.cs - Feature views
src/Ham.App/Views - Feature view models
src/Ham.App/ViewModels - WinUI shell
src/Ham.Ui/App.xaml.cs
Application coordination
- App service
src/Ham.App/Services/AppService.cs - CAS login window
src/Ham.App/Services/CasLoginWindow.cs - Reminder scheduler
src/Ham.App/Services/ReminderScheduler.cs - Notifications
src/Ham.App/Services/NotificationService.cs
Domain logic
- Education domain
src/Ham.Core/Models/Education.cs - Calendar and schedule
src/Ham.Core/Models/SemesterCalendar.cs - Score calculations
src/Ham.Core/Models/ScoreCalculator.cs - GPA scale
src/Ham.Core/Models/GpaScale.cs - Sport models
src/Ham.Infrastructure/Sport/Models/SportModels.cs - Rating models
src/Ham.Infrastructure/Rating/Models/RatingModels.cs
Campus and local data
- WinUI bus fetcher
src/Ham.Ui/Services/BusFetcher.cs - Education client
src/Ham.Infrastructure/Education/EducationClient.cs - CAS client
src/Ham.Infrastructure/Cas/CasClient.cs - Campus HTTP session
src/Ham.Infrastructure/Net/CampusHttpClient.cs - Library client
src/Ham.Infrastructure/Library/LibraryClient.cs - Weather client
src/Ham.Infrastructure/Campus/WeatherClient.cs - Bus data module
src/Ham.Infrastructure/Campus - Local JSON store
src/Ham.Infrastructure/Storage/DataStore.cs
Other components
- Campus user
- University education systems
- University library
- Open-Meteo
- University bus site
Connections 27
- Campus user → WPF shell: uses
- WPF shell → App service: initializes
- WPF shell → Feature view models: creates shell
- Feature views → Feature view models: binds to
- Feature view models → App service: updates and reads
- App service → Local JSON store: loads and saves
- App service → CAS client: authenticates
- CAS client → CAS login window: uses host login
- CAS client → Campus HTTP session: seeds cookies and requests
- App service → Education client: fetches coursework
- Education client → Campus HTTP session: sends requests
- Education client → University education systems: queries
- Education client → Education domain: parses records
- Feature view models → Score calculations: calculates results
- Score calculations → GPA scale: uses scale
- Feature view models → Calendar and schedule: uses schedule rules
- App service → Library client: fetches library data
- Library client → Campus HTTP session: sends requests
- Library client → University library: queries
- App service → Weather client: refreshes weather
- Weather client → Open-Meteo: fetches forecast
- WPF shell → Reminder scheduler: starts scheduler
- Reminder scheduler → Notifications: dispatches reminders
- Campus user → WinUI shell: uses
- WinUI shell → WinUI bus fetcher: hosts bus feature
- WinUI bus fetcher → University bus site: fetches bus page
- Bus data module → University bus site: provides bus data