An app that generates random quotes from the TV show 'Adventure Time' when the big red button is pressed. It's sole purpose was to allow me to practice Clean Architecture and TDD.
- Navigate to the root folder of the project.
$ cd <directory_of_this_project>
- Assuming flutter is setup on your machine, just run the application on your prefered simulator/emulator/device
$ flutter run
- Press the big red button. The other buttons are lies...
C4Component
title Component diagram for Adventure Time Quote Generator
Container_Boundary(pr, "Presentation") {
Container(widgets, "Widgets", "UI in Flutter and Dart")
Container(vm, "ViewModel", "BLoC Flutter Statemanagement")
Rel(vm, widgets, "Updates the state of the application")
UpdateRelStyle(vm, widgets, $textColor="lightblue", $offsetY="40", $offsetX="-100")
Rel(widgets, vm, "Listens for changes to the state of the application")
UpdateRelStyle(widgets, vm, $textColor="lightblue", $offsetY="-70", $offsetX="-100")
}
Rel(uc, vm, "Updates the state of <br> the application based on <br> the result of the business logic")
UpdateRelStyle(uc, vm, $textColor="lightblue" $offsetY="40", $offsetX="-70")
Container_Boundary(do, "Domain") {
Component(uc, "Use Cases", "Business logic in Dart")
Component(ent, "Entities", "Domain-based objects")
Rel(ent, uc, "entities are managed and used by use cases")
UpdateRelStyle(ent, uc, $textColor="lightblue", $offsetX="-100")
}
Rel(repo, ent, "The repositories create entities from external data")
UpdateRelStyle(repo, ent, $textColor="lightblue" $offsetY="0", $offsetX="-100")
Container_Boundary(da, "Data") {
Component(repo, "Repositories", "Repository Pattern")
Component(m, "Models", "Application Data DTO",)
Component(rds, "Remote Data Sources", "Remote Data Logic")
Component(lds, "Local Data Sources", "Local Data Logic")
System_Ext(api, "API", "Third-Party Adventure Time API")
ContainerDb(db, "Local Database", "Shared Preferences Cache")
Rel(m, repo, "models are <br> passed to <br> repositories")
UpdateRelStyle(m, repo, $textColor="lightblue" $offsetY="-40", $offsetX="-30")
Rel(rds, m, "creates models")
UpdateRelStyle(rds, m, $textColor="lightblue" $offsetY="0", $offsetX="-60")
Rel(lds, m, "creates models")
UpdateRelStyle(lds, m, $textColor="lightblue" $offsetY="0", $offsetX="-40")
Rel(api, rds, "passes raw data retrived from the API")
UpdateRelStyle(api, rds, $textColor="lightblue" $offsetY="0", $offsetX="-100")
Rel(db, lds, "passes raw data retrieved from the local database")
UpdateRelStyle(db, lds, $textColor="lightblue" $offsetY="0", $offsetX="-150")
}