How hosikiti/pomowor works
Project Type and Purpose
• Type: Cross-platform mobile application built with Flutter/Dart.
• Purpose: A Pomodoro-style work-timer that tracks elapsed time, shows progress, and sends local notifications.
File Structure
• Top-level platform folders:
– android/ (native Android project)
– ios/ (native iOS project)
– web/ (Web deployment assets)
• Core application code under lib/:
– lib/common/ : shared widgets, styles, providers, utilities
– lib/feature/timer/ : feature module containing UI pages, widgets, state providers, and domain types
– lib/main.dart : application entry point
• Assets: asset/alarm.mp3
• Configuration: pubspec.yaml (dependencies), build.yaml, Codemagic CI config
README.md
• Confirms it’s a simple work-timer app (Pomodoro technique).
• Mentions TODOs: persist state on crash, volume setting, crash fixes.
• Build badge indicates CI/CD via Codemagic.
Main Components
a. Client Platforms
– Android (APK)
– iOS (IPA) scaffolding
– Web (static assets)
b. Flutter Layer
– Flutter Engine (Dart VM + Skia)
– Flutter Framework (widgets, rendering)
c. Application Code
– UI Layer
• Feature-based screens (TimerPage, TimerCircle, TimerLabel)
– State Management Layer
• Provider instances for TimerState, Progress, TestMode, AppForegroundState
• Freezed-generated state classes
– Services / Data Layer
• Storage (shared_preferences via local_storage module)
• LocalNotifications (flutter_local_notifications plugin wrappers)
– Common Module
• Theme, Styling, Dialog utilities, CircleButton widget
d. Native Platform Services
– Android/iOS Local Notification APIs
– File/Shared Preferences storage
– App lifecycle callbacks
e. CI/CD Pipeline (external)
– Codemagic build & deploy
Relationships & Data Flow
• User taps UI → UI component (e.g., CircleButton) → calls TimerProvider
• TimerProvider changes state → notifies listeners → UI rebuilds TimerCircle & TimerLabel
• On timer completion or interval → LocalNotification service API → Native Notification
• Providers persist state via Storage service → Shared Preferences → file system
• AppForegroundState monitors lifecycle → pause/resume timer as app goes background/foreground
Architectural Patterns & Design Principles
• Feature-based modularization: “common” vs “feature/timer”
• Unidirectional data flow via Provider → notifyListeners() → UI rebuild
• Separation of concerns: UI widgets vs business logic vs data access
• Dependency injection via Provider tree in main.dart
• Freezed for immutable state representations