How ssyruss/stpms_mobile works
Project Type and Purpose
• This is a cross-platform full-stack Flutter application (mobile: Android/iOS; desktop: Windows/macOS/Linux; web).
• It provides user authentication (login/register), profile management, and event/facility management. Data appears to be stored locally via SQLite and possibly fetched from remote services (see query.dart).
File-Structure Analysis
• Top-level:
• android/, ios/, macos/, windows/, linux/, web/ – platform runner code and build configs
• lib/ – the Dart application code
• test/ – automated widget tests
• pubspec.yaml – dependency and asset configuration
• Under lib/:
• main.dart – application entry point
• components/ – reusable UI widgets (input controls)
• screens/ – per-screen UI and screen controllers
– login/, register/, home/, profile/, event/
• model/ – data classes (User, Event, Facility, etc.)
• utils/ – data-persistence and local storage helpers (SQL, key-value store)
• query.dart – data-access layer (net calls or repository facade)
• extension.dart – Dart extensions to augment built-ins
README Insights
• Confirms Flutter 3.13.8, Dart 3.1.4, Android SDK 34.0.0
• Standard Flutter run instructions; no custom architecture docs
a. Main Components
1. Flutter Framework & Engine
2. Presentation Layer (Screens + UI Components)
3. Application Logic Layer (Screen Controllers)
4. Data Layer
• Local Storage (SQLite via utils/sql)
• Local Key-Value Store (utils/store)
• Remote API / Repository (query.dart)
5. Domain Models (in model/)
6. Platform Integration
• Android: MainActivity.kt, AndroidManifest
• iOS: AppDelegate.swift, Info.plist
• Web: index.html, manifest.json
• Desktop: runner code under linux/, macos/, windows/
b. Relationships and Data Flows
• User interacts with Presentation Layer → events sent to Controllers
• Controllers orchestrate CRUD: fetch/save via Data Layer
• Data Layer reads/writes to SQLite or calls remote API → returns Domain Models
• Controllers update Presentation with model data
• All Dart code runs on Flutter Engine; Engine communicates with platform via channels
c. Architectural Patterns
• Layered Architecture (UI → Controller → Data / Repository → Storage)
• MVC-/MVVM-like separation (View = Screens, Controller = *-controller.dart, Model = model/*)
• Plugin-based platform integration (Flutter engine + platform code)
d. Core Technologies
• Flutter & Dart
• sqflite or similar SQLite plugin
• Shared Preferences or equivalent (utils/store)
• HTTP client or custom RPCs in query.dart
• Platform channels for native calls