Habiter follows a clean, layered architecture to ensure separation of concerns.
The lib/ folder is organized by technical function:
features/ or screens/: UI components and Pages.providers/: State management (Business Logic).services/: External data sources and system interaction.models/: Data classes.theme/: Styling definitions.main.dart is the entry point. It initializes:
MultiProvider for state injection.HabiterApp root widget._RootShell which handles the persistent bottom navigation and the animated background.The _RootShell widget in main.dart is crucial. It contains the PageView for top-level navigation (Home, Analytics) and the _ShellBackground which renders the animated Glow Orbs.
// main.dart
class _RootShell extends StatefulWidget { ... }