{"id":38695564,"url":"https://github.com/furyhawk/flutter_stack","last_synced_at":"2026-01-17T10:39:44.485Z","repository":{"id":292802686,"uuid":"981965787","full_name":"furyhawk/flutter_stack","owner":"furyhawk","description":"flutter project template","archived":false,"fork":false,"pushed_at":"2025-05-30T07:57:38.000Z","size":475,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-30T09:49:05.482Z","etag":null,"topics":["architecture","authentication","flutter","openapi"],"latest_commit_sha":null,"homepage":"https://dev.furyhawk.lol/","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/furyhawk.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,"zenodo":null}},"created_at":"2025-05-12T07:12:01.000Z","updated_at":"2025-05-30T07:57:42.000Z","dependencies_parsed_at":"2025-05-30T08:47:01.458Z","dependency_job_id":"2e10f3b8-5e93-49fe-b976-7f5d7bc33ff6","html_url":"https://github.com/furyhawk/flutter_stack","commit_stats":null,"previous_names":["furyhawk/flutter_stack"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/furyhawk/flutter_stack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/furyhawk%2Fflutter_stack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/furyhawk%2Fflutter_stack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/furyhawk%2Fflutter_stack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/furyhawk%2Fflutter_stack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/furyhawk","download_url":"https://codeload.github.com/furyhawk/flutter_stack/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/furyhawk%2Fflutter_stack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28506593,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T10:25:30.148Z","status":"ssl_error","status_checked_at":"2026-01-17T10:25:29.718Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["architecture","authentication","flutter","openapi"],"created_at":"2026-01-17T10:39:44.401Z","updated_at":"2026-01-17T10:39:44.467Z","avatar_url":"https://github.com/furyhawk.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flutter Stack\n\nA modern Flutter project with API client generation capabilities that follows best practices.\n\n## Overview\n\nThis project demonstrates a Flutter application with integrated OpenAPI client generation. It uses a variety of modern Flutter packages and tools including:\n\n- JSON serialization with `json_annotation` and `freezed`\n- API client generation with OpenAPI Generator\n- HTTP requests using `dio`\n- Secure storage with `flutter_secure_storage`\n- Testing with `mockito` and `http_mock_adapter`\n\n## Features\n\n- Authentication (login, registration, and profile management)\n- **Weather Hub**: Comprehensive weather dashboard with Singapore weather data\n  - Real-time weather overview\n  - Multiple forecast types (2-hour, 24-hour, 4-day outlook)\n  - Air temperature, lightning, and wind direction data\n  - Interactive weather service cards\n- Item management (create, read, update, and delete items)\n- Weather information display\n- Secure storage for authentication tokens\n- Theme support (light and dark)\n- Clean architecture pattern\n\n## Architecture\n\nThe application follows a clean architecture approach with the following layers:\n\n- **Presentation**: UI components (screens, widgets)\n- **Domain**: Business logic and models\n- **Data**: Repositories and data sources\n\n### Project Structure\n\n```\nlib/\n  ├── core/            # Core functionality\n  │   ├── api/         # API-related code\n  │   ├── theme/       # Theming\n  │   └── utils/       # Utilities\n  ├── features/        # Application features\n  │   ├── auth/        # Authentication feature\n  │   ├── items/       # Items management\n  │   ├── profile/     # User profile\n  │   └── weather/     # Weather information\n  ├── app.dart         # Main app widget\n  └── main.dart        # Application entry point\n```\n\n## API Client Generation\n\nThis project uses OpenAPI Generator to create a Dart client for API interactions.\n\n### Generating the API Client\n\nTo generate the API client:\n\n```bash\n./scripts/generate_api.sh\n```\n\nThis script will:\n1. Automatically disable the `api_client` dependency in pubspec.yaml\n2. Clean any previous generated files\n3. Generate a new API client from the OpenAPI specification\n4. Run build_runner for any additional code generation\n\n### Using the Generated API Client\n\nAfter generating the API client, you need to uncomment the dependency in pubspec.yaml:\n\n```yaml\ndependencies:\n  # ...other dependencies\n  api_client:\n    path: api/api_client\n```\n\nOr run the provided command in the terminal (displayed after running the generation script).\n\n## Development\n\n### Requirements\n\n- Flutter SDK ^3.7.2\n- Dart SDK\n- Node.js and npm (for OpenAPI Generator)\n\n\n\n### Troubleshooting\n\n#### Missing `libsecret-1` Dependency\n\nIf you encounter an error indicating that the `libsecret-1` package is missing, it is required by the `flutter_secure_storage_linux` plugin.\n\nYou can install it by running one of the following commands in your terminal, depending on your Linux distribution:\n\nFor Debian/Ubuntu-based distributions:\nThe CMake error indicates that the `libsecret-1` package, version 0.18.4 or higher, is missing. This is a dependency for the `flutter_secure_storage_linux` plugin.\n\nRun the following command to install `libsecret-1-dev`, which should resolve the issue:\n```\nsudo apt-get update \u0026\u0026 sudo apt-get install -y libsecret-1-dev\n```\n\n### Setup\n\n1. Clone the repository\n2. Run `flutter pub get` to install dependencies\n3. Generate the API client using the script\n4. Run the application with `flutter run`\n\n## Testing\n\n```bash\nflutter test\n=======\nA scalable Flutter application architecture using the API Client package.\n\n## Architecture Overview\n\nThis project follows a clean architecture approach with the following layers:\n\n### Core Layer\n- **config**: Application configuration such as environment settings\n- **di**: Dependency injection using a simple service locator pattern\n- **network**: API client setup and network utilities\n- **theme**: Application theme definitions\n- **utils**: Common utility functions\n\n### Data Layer\n- **datasources**: Data sources (local and remote)\n- **repositories**: Implementation of data repositories\n\n### Domain Layer\n- **models**: Business logic models\n- **usecases**: Use cases that encapsulate business logic\n- **services**: Services that coordinate between multiple repositories\n\n### Presentation Layer\n- **blocs**: Business Logic Components for state management\n- **screens**: UI screens\n- **widgets**: Reusable UI components\n\n## API Client Usage\n\nThe API client is a generated client based on OpenAPI specifications. It's integrated into the app using a provider pattern:\n\n### 1. Create API Client Provider\n\n```dart\n// Create API client with proper configuration\nfinal apiClientProvider = ApiClientProvider();\n\n// Access specific API services\nfinal itemsApi = apiClientProvider.itemsApi;\nfinal usersApi = apiClientProvider.usersApi;\n```\n\n### 2. Use Repository Pattern\n\nRepositories abstract away the data sources and handle API responses:\n\n```dart\n// Example repository method\nFuture\u003cApiResult\u003cItemsPublic\u003e\u003e getItems() {\n  return safeApiCall(() =\u003e apiClientProvider.itemsApi.readItems());\n}\n```\n\n### 3. Use Cases\n\nUse cases encapsulate business logic:\n\n```dart\n// Example use case\nfinal result = await getItemsUseCase.execute();\nif (result.isSuccess) {\n  // Handle success\n} else {\n  // Handle error\n}\n```\n\n## Getting Started\n\n1. Install dependencies:\n```bash\nflutter pub get\n```\n\n2. Run the app:\n```bash\nflutter run\n```\n\n## Environment Configuration\n\nConfigure different environments in `app_config.dart`:\n\n- Development\n- Staging\n- Production\n\nSwitch environments in `main.dart`:\n\n```dart\nAppConfig.initialize(environment: Environment.dev);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuryhawk%2Fflutter_stack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffuryhawk%2Fflutter_stack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuryhawk%2Fflutter_stack/lists"}