How floranguyen0/mmas-money-tracker works
Main Components
• User Interface (UI) Layer – Representing all the visual and navigation components.
• This includes the various pages found under lib/project/app_pages and lib/project/auth_pages (e.g., add/edit pages, sign in/up, report, calendar, currency).
• Business Logic/State Management Layer – Responsible for handling the app’s functionality and inter-component communication.
• The “provider.dart” file and the auth_services (for Firebase Authentication) illustrate centralized state management and authentication logic.
• The “classes” folder holds custom widgets/components (e.g., alert_dialog, app_bar, chart_pie, etc.) that encapsulate business-specific UI logic.
• Data Persistence Layer – Handling storage and database operations.
• The database_management folder includes “sqflite_services” for SQLite interactions and “shared_preferences_services” for lightweight persistence.
• Localization and Internationalization – Ensuring multi-language support.
• The lib/project/localization folder, with its JSON files for each language, represents the translation engine of the app.
• Platform-Specific Integration – Highlighting native configuration files.
• The “android” and “ios” directories show separate configuration, resource, and build settings required by each OS platform.
Relationships and Interactions
• UI components (pages and widgets) interact with the state management layer (using providers and services) to reflect app state changes.
• Business logic components direct requests to the Data Persistence layer (i.e., using sqflite and shared_preferences) for saving/retrieving user data.
• The Authentication Services (Firebase, likely abstracted in auth_services/firebase_authentication.dart) act as a gateway between the UI and backend user authentication.
• The Localization layer provides language resources to UI components ensuring that the app’s text and layout adapt appropriately.
• The underlying Flutter framework acts as the glue ensuring interaction between these layers.
• Platform-specific directories (android and ios) indicate that, although much of the logic is handled in Dart, the underlying system settings and native resource integrations (such as launch images, manifest files, plist files) wake-up the Flutter engine in each environment.
Architectural Patterns and Technologies
• The app is structured following the common separation-of-concerns pattern – dividing presentation, business logic, and data layers.
• It likely employs a Provider pattern (or similar state management approach) to manage UI state, authentication flows, and global variables.
• The use of SQLite (sqflite) for local persistence and Shared Preferences for small configuration storage indicates clear data access abstractions.
• For localization, the JSON-based approach in “lib/project/localization/lang” shows an emphasis on supporting multiple languages through external resource files.
• Flutter is the primary framework, with platform-specific configurations for Android (Gradle, AndroidManifest.xml) and iOS (Xcode project, Info.plist).
Elements
• Clearly Labeled Components:
• “UI Layer” with subdivisions: Auth Pages and App Pages.
• “State Management / Business Logic” (Provider, Auth Services, Custom Widgets).
• “Data Layer” subdivided into “Local Database (sqflite)” and “Shared Preferences”.
• “Localization Module” indicating language JSON files.
• “Platform Integration” for Android and iOS native configurations.