{"id":21934056,"url":"https://github.com/acmesoftwarellc/clean_framework_legacy","last_synced_at":"2025-07-20T09:08:22.893Z","repository":{"id":224049241,"uuid":"676473172","full_name":"AcmeSoftwareLLC/clean_framework_legacy","owner":"AcmeSoftwareLLC","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-16T11:47:04.000Z","size":4843,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-27T13:09:52.726Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AcmeSoftwareLLC.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-08-09T09:24:20.000Z","updated_at":"2024-08-16T11:47:08.000Z","dependencies_parsed_at":"2024-02-23T13:41:35.470Z","dependency_job_id":null,"html_url":"https://github.com/AcmeSoftwareLLC/clean_framework_legacy","commit_stats":null,"previous_names":["acmesoftwarellc/clean_framework_legacy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AcmeSoftwareLLC%2Fclean_framework_legacy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AcmeSoftwareLLC%2Fclean_framework_legacy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AcmeSoftwareLLC%2Fclean_framework_legacy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AcmeSoftwareLLC%2Fclean_framework_legacy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AcmeSoftwareLLC","download_url":"https://codeload.github.com/AcmeSoftwareLLC/clean_framework_legacy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244962164,"owners_count":20539123,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-29T00:14:26.640Z","updated_at":"2025-03-22T13:29:03.155Z","avatar_url":"https://github.com/AcmeSoftwareLLC.png","language":"Dart","readme":"# Clean Framework\n\n**Note:** This is a legacy version of the [Clean Framework](https://pub.dev/packages/clean_framework). \nConsider switching to the latest version.\n\n[![pub package](https://img.shields.io/pub/v/clean_framework.svg?include_prereleases)](https://pub.dartlang.org/packages/clean_framework)\n[![licence](https://img.shields.io/badge/licence-BSD-brightgreen.svg)](https://github.com/MattHamburger/clean_framework/blob/master/LICENSE)\n\nClean Architecture components library, inspired on the guidelines created by Uncle Bob.\n\n## Learning Resources\n\n1. [Introduction](https://github.com/MattHamburger/clean_framework/blob/master/doc/introduction.pdf), to understand the relationship between the components\nof the framework.\n2. [Navigating with CFRouter](https://github.com/MattHamburger/clean_framework/blob/master/doc/routing.md), to start using high level Navigator 2.0 APIs bundled with Clean Framework.\n3. [Mockoon Installation](https://github.com/MattHamburger/clean_framework/blob/master/doc/mockoon.md), since the tests in the example folder require\nan instance of Mockoon running.\n\n\n## Installation\n\n### 1. Depend on it\n\nAdd this to your package's pubspec.yaml file:\n```yaml\ndependencies:\n  clean_framework_legacy:\n    git:\n      url: https://github.com/AcmeSoftwareLLC/clean_framework_legacy.git\n```\n\n### 2. Install it\n\nYou can install packages from the command line:\nwith Flutter:\n```bash\n$ flutter pub get\n```\nAlternatively, your editor might support `flutter pub get`. Check the docs for your editor to learn more.\n\n### 3. Import it\n\nNow in your Dart code, you can use:\n```dart\nimport 'package:clean_framework_legacy/clean_framework.dart';\n```\n\n## Folder Structure\n\nWhatever name is used for `feature_name` can replace `feature` in the file names of the feature's directory\n```\nlib\n|-- feature_name\n|   |-- api\n|   |   |-- feature_service.dart\n|   |   |-- feature_service_request.dart\n|   |   |-- feature_service_response.dart\n|   |-- bloc\n|   |   |-- feature_bloc.dart\n|   |   |-- feature_service_adapter.dart\n|   |   |-- feature_usecase.dart\n|   |-- model\n|   |   |-- feature_entity.dart\n|   |   |-- feature_view_model.dart\n|   |-- ui\n|   |   |-- feature_widget.dart\n|   |   |-- feature_presenter.dart\n|   |   |-- feature_screen.dart\nlocator.dart\nmain.dart\n```\n\n## Layers\n\n### API\n\nThe *API* module defines the logic for your API services, request, and response. The module defines the logic for REST API request and response that will be consumed by the *Bloc*.\n\n\n#### Service\n\n* Every *Feature Service* class should extend *EitherService\u003cJsonRequestModel, JsonResponseModel\u003e* from `clean_framework_defaults.dart`\n\n#### ServiceRequest\n\n* Every *Feature ServiceRequest* class should extend *Equatable* and implement *JsonRequestModel* from `clean_framework_defaults.dart`\n\n##### ServiceResponse\n\n* Every *Feature ServiceResponse* class should extend *Equatable* and implement *JsonResponseModel* from `clean_framework_defaults.dart`\n\n### Bloc\n\nThe *Bloc* module represents the logic of data flow within the application. It is the middle layer between the *API* and *UI* layers. The *Bloc* is responsible for updating the pipe when the data changes.\n\n#### Bloc Class\n\n* Every *Feature Bloc* class should extend *Bloc* from `clean_framework.dart`\n* Responsible for updating the *ViewModel* as the data coming from the API changes\n\n#### ServiceAdapter\n\n* Every *Feature ServiceAdapter* should extend *ServiceAdapter* from `clean_framework.dart`\n* Responsible for connecting the contents of the *API* and the *UseCase*\n* Called when a *UseCase* requests data or sends data\n\n#### UseCase\n\n* Every *Feature UseCase* should extend *UseCase* from `clean_framework.dart`\n* Contains app-specific rules/commands\n* Responsible for the flow of data within the app\n\n### Model\n\nThe *Model* module defines the business logic of the application. This module consists of two main classes: *Entity* and *ViewModel*. The *Entity* class determines how the model class will be represented in the *Repository (in locator.dart)*. The *ViewModel* class represents how the data is passed through to the UI. The *Presenter* passes the *ViewModel* to the *Screen* when the *Presenter* is called in the *Widget*.\n\n#### Entity\n\n* Every *Feature Entity* class should extend *Entity* from `clean_framework.dart`\n* Made up of classes that represent the data in the *Repository*\n\n#### ViewModel\n\n* Every *Feature ViewModel* class should extend *ViewModel* from `clean_framework.dart`\n* Made up of classes that represent how the data is presented to the UI\n\n### UI\n\nThe *UI* module is responsible for all things UI, from triggering the bloc to update the UI, to painting the screen with data send from the UI.\n\n#### Widget\n\n* Every *Feature Widget* should extend *StatelessWidget*\n* Responsible for kickstarting the *Bloc* and return the *Presenter*\n* Is called in `main.dart` when the feature is the first screen, or in a Navigator when switching to that feature\n\n#### Presenter\n\n* Every *Feature Presenter* should extend *Presenter* from `clean_framework.dart`\n* Responsible for calling appropriate methods as data reaches different stages\n\n#### Screen\n* Every *Feature Screen* should extend *Screen* from `clean_framework.dart`\n* Responsible for building UI widgets; should not include any logic other than UI","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facmesoftwarellc%2Fclean_framework_legacy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facmesoftwarellc%2Fclean_framework_legacy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facmesoftwarellc%2Fclean_framework_legacy/lists"}