How xlxl85/vipul_task_master works
Project Type and Purpose
• QuickTask is a mobile‑only Flutter application (Android & iOS).
• It follows Uncle Bob’s Clean Architecture, with BLoC for state management, Hive for local storage, and Cloud Firestore for remote storage.
File Structure
• Top‑level mobile projects: android/, ios/, assets/, lib/, test/
• lib/ subdivided into:
• core/ (shared constants, DI, router, services, themes, utils)
• data/ (datasources/local Hive & remote Firestore, models, repos impl)
• domain/ (entities, repository interfaces, use‑cases)
• presentation/ (UI screens, widgets, BLoCs)
• Configuration files: pubspec.yaml, android/manifest, iOS plist, build scripts.
README for Insights
• Confirms: Clean Architecture layers, BLoC pattern (events → states → blocs), dual storage (Hive & Firestore), DI via get_it, routing via go_router, local notifications, device info service.
Main Components
a. Presentation Layer
• UI Widgets & Screens
• BLoCs (tasks_bloc, theme_cubit)
• Router (go_router)
b. Domain Layer
• Entities (Task)
• Use Cases (e.g., getTasks, addTask, updateTask)
• Repository Interfaces (TaskRepository)
c. Data Layer
• Repositories Impl (TaskRepositoryImpl)
• Data Sources:
• Local: HiveService
• Remote: FirestoreService
• Data Models & Mappers (TaskModel ↔ Task entity)
d. Core Services
• Service Locator (get_it)
• NotificationService (flutter_local_notifications)
• DeviceInfoService
• AppConstants & HiveConstants
• AppTheme
e. External Systems
• Cloud Firestore
• Hive Local Database
• OS Notification API (Android & iOS)
• Device Info API
Relationships and Data Flows
• User taps UI → Presentation emits Event → BLoC
• BLoC invokes Use Case in Domain
• Use Case calls Abstract Repository → Data Layer
• RepositoryImpl chooses Local or Remote DataSource based on logic
• DataSource returns Model → Repository maps to Entity → Use Case returns result
• BLoC emits new State → UI rebuilds
• NotificationService schedules jobs via OS Notification API
• DeviceInfoService provides device ID to Use Cases
Architectural Patterns & Principles
• Clean Architecture (separate presentation, domain, data)
• BLoC pattern (unidirectional data flow)
• Dependency Injection (service locator for loose coupling)
• Repository pattern (abstraction over data sources)
• Offline‑first design (Hive fallback)
• External‑integration isolation (Firestore, Notifications)
• Clear component labels (e.g., “TaskRepositoryImpl”)
• Annotations for key technologies (flutter_bloc, get_it, hive, cloud_firestore)
• External dependencies positioned at the edge