How itsthompson/neo_delta works
Main Components
• Frontend/UI Layer: Represented by the Flutter code in the “lib” directory. Break this down into:
• Pages (found in lib/pages): Home page, stats page, detailed delta views and selections.
• Widgets (in lib/widgets): Custom UI components like navigation bars, buttons, and charts (using fl_chart).
• Application Logic Layer:
• Models (in lib/models): Data models such as landmark_delta, recurring_delta, delta_progress, etc.
• Services (in lib/services): For example, the current_datetime service that likely provides timing or scheduling.
• Data Persistence Layer:
• Database (handled by files in lib/database): Includes files like database.dart, database_landmark_delta.dart, and database_recurring_delta.dart, which interface with the local sqflite database.
• Routing/Navigation:
• Router configuration in lib/routes/router_config.dart based on go_router.
• Platform-specific Configuration:
• Multiple folder structures for Android, iOS, macOS, Linux, Windows, and Web. Each platform contains its own build configurations, resources, and platform integration components.
• Assets:
Establish Relationships and Interactions
• The entry point (lib/main.dart) initializes the app and sets up state management (provider) and routes (go_router).
• The UI components (pages and widgets) interact with the Models to both display and collect data.
• The Database layer provides CRUD operations for storing user data such as habit tracking and delta calculations.
• The Services layer (e.g., current_datetime) assists in controlling time-based logic which then informs the models.
• Platform-specific folders support the same shared Flutter code but contain configurations and native code required for each target (Android, iOS, etc.).
Architectural Patterns & Technologies
• Model-View-Controller or Model-View-ViewModel (implicit in the use of provider for app state management).
• Layered architecture: Separation of UI (lib/pages, lib/widgets), business logic (lib/models, lib/services), and data persistence (lib/database).
• Cross-platform integration: Note different folders for Android, iOS, Linux, macOS, Windows, and Web.
• Key technologies: Flutter, sqflite, provider, go_router, and fl_chart.
Detailed Steps
• “Routing & Navigation (go_router via router_config.dart)”
• “State Management (Provider)”