{"id":19834286,"url":"https://github.com/fzl-22/faisal-starter-code-flutter","last_synced_at":"2025-07-01T22:32:08.975Z","repository":{"id":229194995,"uuid":"772398808","full_name":"fzl-22/faisal-starter-code-flutter","owner":"fzl-22","description":"My Flutter's starter code (v1.0.0) ","archived":false,"fork":false,"pushed_at":"2024-06-06T03:32:31.000Z","size":1617,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-01T17:32:04.546Z","etag":null,"topics":["dart","flutter","starter-code"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fzl-22.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2024-03-15T05:39:46.000Z","updated_at":"2024-06-06T03:32:34.000Z","dependencies_parsed_at":"2024-03-28T02:30:01.873Z","dependency_job_id":"4889781f-adc5-4961-90f5-c6f7e8193486","html_url":"https://github.com/fzl-22/faisal-starter-code-flutter","commit_stats":null,"previous_names":["fzl-22/faisal-starter-code-flutter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fzl-22/faisal-starter-code-flutter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fzl-22%2Ffaisal-starter-code-flutter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fzl-22%2Ffaisal-starter-code-flutter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fzl-22%2Ffaisal-starter-code-flutter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fzl-22%2Ffaisal-starter-code-flutter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fzl-22","download_url":"https://codeload.github.com/fzl-22/faisal-starter-code-flutter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fzl-22%2Ffaisal-starter-code-flutter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263046479,"owners_count":23405193,"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":["dart","flutter","starter-code"],"created_at":"2024-11-12T12:03:49.255Z","updated_at":"2025-07-01T22:32:08.882Z","avatar_url":"https://github.com/fzl-22.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Faisal's Starter Code Flutter\n\n\u003e Version 1.0.0\n\nThis repository contains my starter code for a Flutter project, which is highly inspired by [dbestech](https://dbestech.com) and [Very Good Ventures](https://verygood.ventures).\n\nFor quick installation, you can run the following command:\n\n**Linux \u0026 MacOS:**\n\n```bash\ncurl -s https://raw.githubusercontent.com/fzl-22/faisal-starter-code-flutter/master/install.sh \u003e install.sh \u0026\u0026 bash install.sh\n```\n\n\u003e Note: `gnu-sed` is required for installation on MacOS (`brew install gnu-sed`)\n\n## Table of Contents\n\n- [1 Technology Stack](#1-technology-stack)\n- [2 Dependencies](#2-dependencies)\n- [3. Directory Structures and Architectural Overviews](#3-directory-structures-and-architectural-overviews)\n  - [3.1 `assets/`](#31-assets)\n  - [3.2 `lib/`](#32-lib)\n    - [3.2.1 `lib/core/`](#321-libcore)\n    - [3.2.2 `lib/src/`](#322-libsrc)\n- [4 Guides](#4-guides)\n  - [4.1 Setup Project](#41-setup-project)\n    - [4.1.1 Clone project](#411-clone-project)\n    - [4.1.2 Get all dependencies](#412-get-all-dependencies)\n    - [4.1.3 Run the code generator](#413-run-the-code-generator)\n  - [4.2 Run project](#42-run-project)\n  - [4.3 Installing and removing packages](#43-installing-and-removing-packages)\n- [5 Documentation](#5-documentation)\n\n## 1 Technology Stack\n\n| Software | Version |\n| -------- | ------- |\n| Flutter  | 3.19.2  |\n| Dart     | 3.3.0   |\n| OpenJDK  | 11.0.22 |\n\n## 2 Dependencies\n\n| Package                                                               | Description                                                                                                           |\n| --------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |\n| [bloc](https://pub.dev/packages/bloc)                                 | State management library that helps implement the BLoC design pattern.                                                |\n| [cached_network_image](https://pub.dev/packages/cached_network_image) | Loads and caches network images.                                                                                      |\n| [dartz](https://pub.dev/packages/dartz)                               | Functional programming in Dart (used for clean error-handling)                                                        |\n| [dio](https://pub.dev/packages/dio)                                   | HTTP networking package with supports on Interceptor, request cancellation, timeout, and etc.                         |\n| [envied](https://pub.dev/packages/envied)                             | Explicitly reads environment variables into a dart file from a .env file for more security and faster start up times. |\n| [equatable](https://pub.dev/packages/equatable)                       | Value-based objects comparison.                                                                                       |\n| [flutter_bloc](https://pub.dev/packages/flutter_bloc)                 | Flutter Widgets that make it easy to implement the [bloc](https://pub.dev/packages/bloc)                              |\n| [flutter_dotenv](https://pub.dev/packages/flutter_dotenv)             | Load configuration at runtime from a `.env` file                                                                      |\n| [flutter_svg](https://pub.dev/packages/flutter_svg)                   | SVG rendering widget from an asset.                                                                                   |\n| [freezed_annotation](https://pub.dev/packages/freezed_annotation)     | Annotations for [freezed](https://pub.dev/packages/freezed).                                                          |\n| [get_it](https://pub.dev/get_it)                                      | Simple direct Service Locator for dependency injection.                                                               |\n| [go_router](https://pub.dev/packages/go_router)                       | Routing package with URL-based API.                                                                                   |\n| [injectable](https://pub.dev/packages/injectable)                     | Code generator for [get_it](https://pub.dev/get_it)                                                                   |\n| [logger](https://pub.dev/packages/logger)                             | Beautiful log printer.                                                                                                |\n| [provider](https://pub.dev/packages/provider)                         | A wrapper around `InheritedWidget`. Used for local state-abstraction.                                                 |\n| [safe_change_notifier](https://pub.dev/packages/safe_change_notifier) | Safer replacement for `ChangeNotifier` and `ValueNotifer`.                                                            |\n| [talker_dio_logger](https://pub.dev/packages/talker_dio_logger)       | Lightweight and customizable dio http client logger on talker base.                                                   |\n| [bloc_test](https://pub.dev/packages/bloc_test)                       | Testing library for blocs and cubits (_dev_dependencies_)                                                             |\n| [build_runner](https://pub.dev/packages/build_runner)                 | A build system for Dart code generation and modular compilation (_dev_dependencies_)                                  |\n| [envied_generator](https://pub.dev/packages/envied_generator)         | Generator for [https://pub.dev/packages/envied](envied) (_dev_dependencies_).                                         |\n| [freezed](https://pub.dev/packages/freezed)                           | Code generation for immutable classes (_dev_dependencies_).                                                           |\n| [injectable_generator](https://pub.dev/packages/injectable_generator) | A generator for [injectable](https://pub.dev/packages/injectable_generator) library (_dev_dependencies_)              |\n| [mocktail](https://pub.dev/packages/mocktail)                         | Mock library which simplifies mocking with null safety support (_dev_dependencies_)                                   |\n| [very_good_analysis](https://pub.dev/packages/very_good_analysis)     | Lint rules for Dart and Flutter by Very Good Ventures (_dev_dependencies_).                                           |\n\n## 3. Directory Structures and Architectural Overviews\n\n### 3.1 `assets/`\n\nThis directory contains asset resources such as fonts, images, icon, and etc. Any new asset must be registered to [pubspec.yaml](./pubspec.yaml) and [lib/core/resources](./lib/core/resources/).\n\n### 3.2 `lib/`\n\nHere resides the application source code. Contains only [lib/core/] and [lib/src/].\n\n#### 3.2.1 `lib/core/`\n\nContains core features and utilities of the app written **mostly** in Dart code (_almost framework-independent_).\n\n##### 3.2.1.1 `lib/core/common/`\n\nContains application-wide shared themes, widgets, screens, or state.\n\n##### 3.2.1.2 `lib/core/constants/`\n\nContains application-wide constant values.\n\n##### 3.2.1.3 `lib/core/errors/`\n\nContains predefined exceptions and failures.\n\n##### 3.2.1.4 `lib/core/extensions/`\n\nContains developer-defined extensions for built-in Dart object. This directory provides more-compact of some Dart object/method calls.\n\n##### 3.2.1.5 `lib/core/injection/`\n\nContains injection of dependencies of the application architecture. This directory provides dependency injection container.\n\n##### 3.2.1.6 `lib/core/resources/`\n\nContains registered constants that hold the value of each assets path in [assets/](./assets/) and defined typographies. This dependency provides UI assets consistency.\n\n##### 3.2.1.7 `lib/core/router/`\n\nContains application routes and transitions. This directory defines routes configuration.\n\n##### 3.2.1.8 `lib/core/usecase/`\n\nContains classes that encapsulate the business logic of the application (usecases).\n\n##### 3.2.1.9 `lib/core/utils/`\n\nContains additional utilities to the application.\n\n#### 3.2.2 `lib/src/`\n\nThis directory holds the features of the application. Any feature added in the application must reside in this directory as `lib/src/[feature]/`.\n\nEach feature has 3 layers according to the Clean Architecture design by Robert C. Martin.\n\n![](./assets/readme/clean-architecture-flow.jpg)\nSource image: [dbestech.com](https://www.dbestech.com/)\n\nSo, each feature must have:\n\n- `lib/src/[feature]/domain/`\n- `lib/src/[feature]/data/`\n- `lib/src/[feature]/presentation/`\n\n##### 3.2.2.1 Domain Layer (`lib/src/[feature]/domain/`)\n\nDomain layer contains the business logic of the application (core business logic, not BLoC logic).\n\n\u003e Domain does not depend on anyone. Presentation layer finds domain layer to work with.\n\nThis layer have 3 sublayers:\n\n- `lib/src/[feature]/domain/entities/`\n- `lib/src/[feature]/domain/repos/`\n- `lib/src/[feature]/domain/usecases/`\n\n###### 3.2.2.1.1 Entities (`lib/src/[feature]/domain/entities/`)\n\nEntities hold the blue print of data model which we will pass around for a certain features or screens or pages.\n\n###### 3.2.2.1.2 Repositories (`lib/src/[feature]/domain/repos`)\n\nDomain repositories contains abstract classes that defines a contract between domain layer and data layer.\n\n\u003e The method of repository must be implemented in the data layer's repository.\n\n###### 3.2.2.1.3 Usecases (`lib/src/[feature]/domain/usecases`)\n\nUsecases contains communication tunnel between presentation and domain layer\n\n\u003e Usecases depend on repositories and should be independent of anything outside of domain layer.\n\n##### 3.2.2.2 Data Layer (`lib/src/[feature]/data/`)\n\nData layer is an interface to communicate with data outside the app (remote or local).\n\n\u003e Data layer depends on domain layer.\n\nThis layer have 3 sublayers:\n\n- `lib/src/[feature]/data/models/`\n- `lib/src/[feature]/data/repos/`\n- `lib/src/[feature]/data/datasources/`\n\n###### 3.2.2.2.1 Models (`lib/src/[feature]/data/models/`)\n\nModel is an extension of the _extensions_. This sublayer provides JSON serialization or constructorss to interact with outside data.\n\n###### 3.2.2.2.2 Repositories (`lib/src/[feature]/data/repos/`)\n\nThe repos in data layer is the implementation of the repos in the domain layer. It provides the communication with domain layers.\n\n\u003e Data layer's repositories depends on datasources.\n\n###### 3.2.2.2.3 Data Sources (`lib/src/[feature]/data/datasources/`)\n\nData sources provides communication with data from outside (API, local storage, and etc).\n\n\u003e Data sources depends on external source, for example: http package.\n\n##### 3.2.2.3 Presentation Layer (`lib/src/[feature]/presentation/`)\n\nPresentation layer provides UI presented to the user. Flutter's code only resides here in `lib/src/[feature]/` directory.\n\nDO NOT add framework-dependent code to any other layer than the presentation layer.\n\n\u003e Presentation layer is framework-dependent and depends on domain layer.\n\nThis layer **may have** 3 sublayers:\n\n- `lib/src/[feature]/domain/bloc/`\n- `lib/src/[feature]/domain/views/`\n- `lib/src/[feature]/domain/widgets/`\n\nThis sublayer can have `providers` to manages local state-abstraction if necessary.\n\n###### 3.2.2.3.1 BLoC (`lib/src/[feature]/presentation/bloc`).\n\nBLoC contains the state management to controls UI state.\n\n\u003e BLoC is dependent to the domain layer's usecases.\n\nIt provides multilayer state-management between presentation layer and domain layer.\n\n**Note:** It is recommended to inject BLoC to the widget tree via the [router](./lib/core/router/) instead of the root widget or inside a views.\n\n###### 3.2.2.3.2 Views (`lib/src/[feature]/presentation/views`).\n\nViews sublayer provides the screens of the feature. The state of the screens and widgets inside is controlled with state manager.\n\n###### 3.2.2.3.3 Widgets (`lib/src/[feature]/presentation/widgets/`).\n\nProvides the feature-wide shared widgets that resides in the views sublayer.\n\n## 4 Guides\n\n### 4.1 Setup Project\n\n#### 4.1.1 Clone project\n\nClone this repository to your local machine.\n\n```bash\ngit clone git@github.com:fzl-22/faisal-starter-code-flutter.git\n```\n\n#### 4.1.2 Get all dependencies\n\nTo get all dependencies, run the following command.\n\n```bash\nflutter pub get\n```\n\n#### 4.1.3 Run the code generator\n\nIn a newly cloned project, you will notice that some files with `*.g.dart`, `*.config.dart`, and `*.freezed.dart` are missing. You need to generate those files with [build_runner](https://pub.dev/packages/build_runner).\n\n```bash\ndart run build_runner build # one time and exits\n```\n\nor\n\n```bash\ndart run build_runner watch # watch and rebuild as necessary\n```\n\n### 4.2 Run project\n\nTurn on your Android emulator or physical device. Then, run the project.\n\n```bash\nflutter run\n```\n\n`flutter run` key commands.\n\n- `r` to hot reload.\n- `R` to hot restart.\n- `h` to list all available interactive commands.\n- `d` to detach (terminate \"flutter run\" but leave application running).\n- `c` to clear the screen\n- `q` to quit (terminate the application on the device).\n\n### 4.3 Installing and removing packages\n\nInstall a package.\n\n```bash\nflutter pub add {package}\n```\n\nInstall a package as `dev_dependencies`.\n\n```bash\nflutter pub add dev:{package}\n```\n\nUninstall a package.\n\n```bash\nflutter pub remove {package}\n```\n\n## 5 Documentation\n\nThe documentation of this project can be generated using [dartdoc](https://pub.dev/packages/dartdoc).\n\nInstall compatible version of `dartdoc`.\n\n```bash\nfvm dart pub global activate dartdoc\n```\n\nIn the project root directory, generate HTML documentation.\n\n```bash\ndart doc .\n```\n\n\u003e Make sure you have no error in the source code\n\nYour generated documentation will be on `doc/api/` directory.\n\nServe the docs with [dhttpd](https://pub.dev/packages/dhttpd) package (install with `fvm dart pub global activate dhttpd`).\n\n```bash\ndhttpd --path doc/api\n```\n\nYou can read the documentation at `http://localhost:8080`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffzl-22%2Ffaisal-starter-code-flutter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffzl-22%2Ffaisal-starter-code-flutter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffzl-22%2Ffaisal-starter-code-flutter/lists"}