Mi Cole follows a feature-based architecture where each domain has its own directory underDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/andrespaul123/micole-flutter/llms.txt
Use this file to discover all available pages before exploring further.
lib/feature/. Cross-cutting concerns such as the HTTP client, router, secure storage, and shared widgets live in lib/core/. This separation keeps business logic isolated to its feature slice while infrastructure details remain reusable across the entire app.
Directory tree
Feature module pattern
Every feature directory follows the same four-layer convention:Model
A plain Dart class (or set of classes) that represents the domain entity returned by the API. Models are immutable data holders with
fromJson factory constructors and, where needed, toJson methods.Repository
Responsible for all network calls. It holds a
Dio instance injected at construction time and exposes typed async methods. Repository methods throw DioException on failure; ViewModels catch and surface the error.ViewModel
A
ChangeNotifier that owns the UI state: loading flags, error strings, and lists of models. It calls the repository and calls notifyListeners() after each state change so that dependent widgets rebuild.Core vs Feature
core/
Infrastructure shared by every feature: the
DioClient singleton, the GoRouter factory, SecureStorage, MainLayout shell, shared utilities such as ApiErrorHandler, and reusable widgets. Nothing in core/ depends on a specific feature.feature/
Self-contained domain slices. A feature may depend on
core/ utilities but must not import from a sibling feature. Cross-feature data (e.g. AcademicPeriodRepository shared by CursoViewModel and InscripcionViewModel) is injected at the main.dart wiring level.Multi-platform support
The Flutter project targets six platforms. Each has its own top-level directory alongsidelib/:
| Directory | Platform |
|---|---|
android/ | Android |
ios/ | iOS |
web/ | Browser (PWA-ready, uses PathUrlStrategy) |
linux/ | Linux desktop |
macos/ | macOS desktop |
windows/ | Windows desktop |
Web is the primary non-mobile target.
PathUrlStrategy is enabled in main() so that URLs look like /home instead of /#/home, which is important for deep-linking and SEO.