How hantsaniala/trosa works
Main Components
a. Mobile Application Layer
• iOS Client (Native Swift)
• Android Client (Native Kotlin)
• Flutter Cross-Platform Layer
b. Application Core
• UI Components
• Business Logic
• Local Database
• State Management
Detailed Architecture Breakdown
a. Presentation Layer (Top Level):
• Main screens (lib/screens/trosa/)
• UI components (lib/components/)
• Relationship with the state management system
b. Business Logic Layer (Middle Level):
• Notifier pattern for state management (lib/notifier/trosa_notifier.dart)
• Models (lib/models/trosa.dart)
• API services (lib/api/trosa_api.dart)
c. Data Layer (Bottom Level):
• Local database implementation (lib/db/sqflite_provider.dart)
• Data persistence flow
Specific Implementation Details
• Main Application Entry (lib/main.dart)
• Constants (lib/const.dart)
• Currency Formatting (lib/components/currency_input_formatter.dart)
• Database Provider (lib/db/sqflite_provider.dart)
• Trosa API Service (lib/api/trosa_api.dart)
[Mobile Platforms]
• ↓
[Flutter Framework]
• ↓
[UI Layer] ←→ [State Management]
• ↓ ↕
[Business Logic] → [Models]
• ↓
[Data Layer]
• ↓
[Local Storage]
Technical Stack Highlights
• Flutter for cross-platform development
• SQLite for local storage (sqflite)
• Provider pattern for state management
• Native platform integration (Swift/Kotlin)