How malikkurosaki/phis_mobile works
1. This is a Flutter client application named probus_mobile, built to run across Android, iOS, web, and macOS. The repository is mostly a frontend app plus its platform shells; there is no backend service code here.
2. The main app entrypoint is lib/main.dart. Shared app-wide concerns appear to live in lib/store.dart and lib/tema.dart, which likely provide global state and theming used by multiple screens.
3. The codebase is split into two major business domains:
- components_phis / models_phis for a hotel/property-operations workflow
- components_presto / models_presto for a restaurant/F&B workflow
This split is one of the clearest architectural boundaries in the repo.
4. The UI/navigation layer lives under lib/views. The visible app surfaces include login.dart, home.dart, hotel.dart, and restaurant.dart, which likely act as top-level routes or section launchers into the two business domains.
5. The hotel/PHIS feature set includes operational dashboards and daily status views: arrivals, departures, in-house guests, next-day variants, reservations, forecast occupancy, and room production by geography. The corresponding models mirror those screens, suggesting a fairly direct mapping from API payloads to display components.
6. The restaurant/Presto feature set centers on analytics and reporting: daily revenue, home index, payment breakdowns, product sales, sales performance, sales traffic, transaction summary, and various sales-analysis screens. There is also a master subfolder with reference-data screens such as outlet, department, date, type, and product group.
7. Calendar-specific functionality is isolated in lib/model_calendar and lib/views/calendar_*. The presence of booking/room-type models suggests a booking/calendar workflow separate from the hotel and restaurant dashboards.
8. The network/data layer is concentrated in lib/rest_api.dart plus the response wrappers rest_response_restaurant.dart, rest_restponse_calendar.dart, and rest_restponse_phis.dart. These files likely normalize external API responses into typed Dart models before the data reaches the UI components.
9. The repository contains a few auxiliary or experimental files at the root such as response.js, x_fake_api.dart, x.rest, xcoba.dart, and perintah.dart. These look like developer tooling, mock API scaffolding, or scratch code rather than core runtime architecture.
10. Assets are lightweight but functional: assets/sound contains several audio cues, which implies the UI uses sound feedback for interactions or status events. Standard Flutter-generated native wrappers are present under android/, ios/, macos/, and web/, with no special native subsystem beyond the usual platform launch/configuration files.
11. Testing is split between test/widget_test.dart for basic widget coverage and integration_test/ for end-to-end app flows. This indicates the app is expected to be exercised at both unit/widget and device-integration levels.
12. For an architecture diagram, the most important flow is: platform shell launches Flutter app → main.dart initializes shared state/theme → user enters via login/home → navigates into hotel, restaurant, or calendar modules → each module renders component screens backed by typed models → data is fetched and normalized through the REST/response layer.
Main entry points: main.dart Main app · home.dart Views · store.dart Store + theme · rest_api.dart REST API
Components 19
Platform shells
Flutter platform wrappers and launch code
- Android · Android launcher and native wrapper
android/app/src/main/kotlin/makuro/probus/system/probus_mobile/MainActivity.kt - iOS · iOS runner and launch wrapper
ios/Runner/AppDelegate.swift - macOS · macOS runner and window wrapper
macos/Runner/AppDelegate.swift - Web · Web bootstrap and manifest
web/index.html
Core app
Entrypoint, global state, theming, and navigation
- Main app · Application bootstrap and root wiring
lib/main.dart - Store + theme · Global state and theming used across screens
lib/store.dart - Views · Top-level screens and section navigation
lib/views/home.dart - Login · Entry login surface
lib/views/login.dart
PHIS domain
Hotel/property-operations screens and models
- Hotel home · Hotel/property operations landing screen
lib/components_phis/hotel_home.dart - PHIS models · Arrival, departure, occupancy, reservation, and production models
lib/models_phis/model_hotel_home.dart
Presto domain
Restaurant/F&B screens and models
- Presto home · Restaurant analytics and reporting landing screen
lib/components_presto/home_index.dart - Presto models · Revenue, sales, payment, traffic, and summary models
lib/models_presto/model_home_index.dart
Calendar domain
Booking and room-type workflow
- Calendar screens · Calendar-related views for booking and room types
lib/views/calendar_v5.dart - Calendar models · Booking list and room-type data models
lib/model_calendar/model_list_booking.dart
Data layer
REST client and response normalization
- REST API · Shared API access and request orchestration
lib/rest_api.dart - PHIS response · Normalized PHIS API payload wrapper
lib/rest_restponse_phis.dart - Restaurant response · Normalized restaurant API payload wrapper
lib/rest_response_restaurant.dart - Calendar response · Normalized calendar API payload wrapper
lib/rest_restponse_calendar.dart
Quality checks
Widget and integration test entry points
- Tests · Widget and integration test entry points
test/widget_test.dart
Connections 23
- Android → Main app: launches · Android shell starts the Flutter app
- iOS → Main app: launches · iOS shell starts the Flutter app
- macOS → Main app: launches · macOS shell starts the Flutter app
- Web → Main app: launches · Web bootstrap starts the Flutter app
- Main app → Store + theme: configures · Entrypoint initializes shared state and theme
- Main app → Views: boots · Entrypoint wires the app navigation shell
- Views → Login: routes · Top-level navigation exposes login
- Views → Hotel home: routes · Navigation enters the hotel/PHIS area
- Views → Presto home: routes · Navigation enters the restaurant/Presto area
- Views → Calendar screens: routes · Navigation enters the calendar workflow
- Hotel home → PHIS models: uses · Hotel UI is driven by PHIS typed models
- Presto home → Presto models: uses · Restaurant UI is driven by Presto typed models
- Calendar screens → Calendar models: uses · Calendar UI is driven by booking models
- REST API → PHIS response: normalizes · API layer shapes PHIS responses
- REST API → Restaurant response: normalizes · API layer shapes restaurant responses
- REST API → Calendar response: normalizes · API layer shapes calendar responses
- PHIS response → PHIS models: maps to · PHIS responses are mapped into domain models
- Restaurant response → Presto models: maps to · Restaurant responses are mapped into domain models
- Calendar response → Calendar models: maps to · Calendar responses are mapped into booking models
- Store + theme → Hotel home: shared by · Hotel screens share global state and theming
- Store + theme → Presto home: shared by · Restaurant screens share global state and theming
- Store + theme → Calendar screens: shared by · Calendar screens share global state and theming
- Tests → Main app: covers · Tests exercise the app entrypoint and flows