How rmanguinho/clean-flutter-app works
4Dev Flutter is a survey application for programmers. Its principal user journey is account access, survey browsing, and viewing or saving survey answers/results; the README also identifies a deliberately layered Clean Architecture design. The tree shows UI, presentation, domain, data, infrastructure, and composition-root responsibilities, but the sampled source contains no Dart runtime excerpts. Accordingly, workflow and dependency arrows are dashed and unverified rather than presented as observed calls.
Main entry points: presenters Page presenters · http_adapter.dart HTTP adapter · usecases Domain use cases · remote_load_surveys.dart Survey loading
Components 22
Flutter client
- Login and signup
lib/ui/pages/login/login_page.dart - Signup page
lib/ui/pages/signup/signup_page.dart - Session splash
lib/ui/pages/splash/splash_page.dart - Survey browsing
lib/ui/pages/surveys/surveys_page.dart - Survey results
lib/ui/pages/survey_result/survey_result_page.dart
Domain and presentation
- Page presenters
lib/presentation/presenters - Survey entities
lib/domain/entities/survey_entity.dart - Domain use cases
lib/domain/usecases - Field validation
lib/validation/validators
Data and use cases
- Account actions
lib/data/usecases/authentication/remote_authentication.dart - Survey loading
lib/data/usecases/load_surveys/remote_load_surveys.dart - Result loading
lib/data/usecases/load_survey_result/remote_load_survey_result.dart - Result saving
lib/data/usecases/save_survey_result/remote_save_survey_result.dart
Infrastructure and composition
- Application entry
lib/main/main.dart - Offline fallbacks
lib/main/composites/remote_load_surveys_with_local_fallback.dart - HTTP adapter
lib/infra/http/http_adapter.dart - Authorized HTTP
lib/main/decorators/authorize_http_client_decorator.dart - Local and secure cache
lib/infra/cache - Dependency factories
lib/main/factories/usecases
Other components
- App user
- Survey API
- Device storage
Connections 32
- App user → Application entry: opens
- Application entry → Login and signup: routes
- Application entry → Session splash: routes
- App user → Signup page: registers
- App user → Survey browsing: browses
- App user → Survey results: views
- Login and signup → Page presenters: delegates
- Signup page → Page presenters: delegates
- Session splash → Page presenters: delegates
- Survey browsing → Page presenters: delegates
- Survey results → Page presenters: delegates
- Page presenters → Domain use cases: invokes
- Page presenters → Field validation: validates
- Domain use cases → Account actions: dispatches
- Domain use cases → Survey loading: dispatches
- Domain use cases → Result loading: dispatches
- Domain use cases → Result saving: dispatches
- Survey loading → Offline fallbacks: composes
- Result loading → Offline fallbacks: may fall back
- Account actions → HTTP adapter: uses
- Survey loading → HTTP adapter: uses
- Result loading → HTTP adapter: uses
- Result saving → HTTP adapter: uses
- HTTP adapter → Authorized HTTP: may be wrapped
- HTTP adapter → Survey API: requests
- Offline fallbacks → Local and secure cache: uses
- Local and secure cache → Device storage: reads and writes
- Dependency factories → Domain use cases: constructs
- Dependency factories → HTTP adapter: constructs
- Dependency factories → Local and secure cache: constructs
- Survey loading → Survey entities: returns data
- Result loading → Survey entities: returns data