{"id":44634576,"url":"https://github.com/flutter-news-app-full-source-code/data-repository","last_synced_at":"2026-02-14T17:19:44.981Z","repository":{"id":290345034,"uuid":"973074600","full_name":"flutter-news-app-full-source-code/data-repository","owner":"flutter-news-app-full-source-code","description":"A generic repository that serves as a crucial abstraction layer within the Flutter News App Full Source Code Toolkit.","archived":false,"fork":false,"pushed_at":"2026-02-03T10:56:04.000Z","size":91,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-08T08:55:28.218Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flutter-news-app-full-source-code.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-26T07:44:42.000Z","updated_at":"2026-01-01T16:19:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"1c4ec1f4-4351-40b1-b89d-a9af8158a82c","html_url":"https://github.com/flutter-news-app-full-source-code/data-repository","commit_stats":null,"previous_names":["headlines-toolkit/ht-data-repository","flutter-news-app-full-source-code/ht-data-repository","flutter-news-app-full-source-code/data-repository"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/flutter-news-app-full-source-code/data-repository","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutter-news-app-full-source-code%2Fdata-repository","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutter-news-app-full-source-code%2Fdata-repository/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutter-news-app-full-source-code%2Fdata-repository/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutter-news-app-full-source-code%2Fdata-repository/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flutter-news-app-full-source-code","download_url":"https://codeload.github.com/flutter-news-app-full-source-code/data-repository/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flutter-news-app-full-source-code%2Fdata-repository/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29450850,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T15:52:44.973Z","status":"ssl_error","status_checked_at":"2026-02-14T15:52:11.208Z","response_time":53,"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":[],"created_at":"2026-02-14T17:19:44.386Z","updated_at":"2026-02-14T17:19:44.976Z","avatar_url":"https://github.com/flutter-news-app-full-source-code.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://avatars.githubusercontent.com/u/202675624?s=400\u0026u=dc72a2b53e8158956a3b672f8e52e39394b6b610\u0026v=4\" alt=\"Flutter News App Toolkit Logo\" width=\"220\"\u003e\n  \u003ch1\u003eData Repository\u003c/h1\u003e\n  \u003cp\u003e\u003cstrong\u003eA generic repository that serves as a crucial abstraction layer within the Flutter News App Full Source Code Toolkit.\u003c/strong\u003e\u003c/p\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/coverage-100%25-green?style=for-the-badge\" alt=\"coverage: 100%\"\u003e\n  \u003ca href=\"https://flutter-news-app-full-source-code.github.io/docs/\"\u003e\u003cimg src=\"https://img.shields.io/badge/LIVE_DOCS-VIEW-slategray?style=for-the-badge\" alt=\"Live Docs: View\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/flutter-news-app-full-source-code\"\u003e\u003cimg src=\"https://img.shields.io/badge/MAIN_PROJECT-BROWSE-purple?style=for-the-badge\" alt=\"Main Project: Browse\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nThis `data_repository` package serves as a crucial abstraction layer within the [**Flutter News App Full Source Code Toolkit**](https://github.com/flutter-news-app-full-source-code). It provides a generic, type-safe interface for interacting with data sources, decoupling business logic from the underlying data client implementations. By mirroring the data access methods of a `DataClient`, it ensures consistency and simplifies data operations across the Flutter mobile app, web dashboard, and Dart Frog backend API.\n\n## ⭐ Feature Showcase: Robust Data Access \u0026 Management\n\nThis package offers a comprehensive set of features for managing data entities.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e🧱 Core Functionality\u003c/strong\u003e\u003c/summary\u003e\n\n### 🚀 Generic Data Operations\n- **`DataRepository\u003cT\u003e`:** A generic class that provides a consistent interface for CRUD (Create, Read, Update, Delete) operations, querying, counting, and aggregation for any data type `T`.\n- **Abstraction over `DataClient`:** Hides the complexities of `DataClient` implementations and `SuccessApiResponse` structures, offering a clean, business-logic-focused API.\n\n### 🔐 User Scoping \u0026 Permissions\n- **Optional `userId` Parameter:** All data access methods support an optional `userId` parameter, enabling seamless management of both user-specific and global resources.\n\n### 🔍 Advanced Querying\n- **`readAll` Method:** A powerful method that returns a `Future\u003cPaginatedResponse\u003cT\u003e\u003e`, supporting rich filtering, multi-field sorting, and cursor-based pagination, compatible with modern NoSQL database capabilities.\n- **`count` and `aggregate`:** Efficient methods for counting documents and executing complex data aggregation pipelines directly on the data source.\n\n### 🔄 Reactive Updates\n- **`entityUpdated` Stream:** A broadcast stream that emits the `Type` of a data entity whenever a Create, Update, or Delete operation is successfully completed. This allows other parts of the application to react to data changes in real-time, facilitating dynamic UI updates and side effects.\n\n### 🛡️ Robust Error Handling\n- **Exception Propagation:** Catches and re-throws standardized exceptions (like `HttpException` subtypes or `FormatException`) from the underlying data client layer. This ensures predictable error handling and allows higher layers (e.g., BLoCs, API route handlers) to implement specific error recovery logic.\n\n### 💉 Dependency Injection Ready\n- **Constructor Injection:** Designed to receive an `DataClient\u003cT\u003e` instance via its constructor, promoting loose coupling and testability.\n\n\u003e **💡 Your Advantage:** You get a meticulously designed, production-quality data access layer that simplifies interactions with your data sources, ensures consistency, and provides robust error handling and reactive capabilities. This package accelerates development by providing a solid foundation for data management.\n\n\u003c/details\u003e\n\n## 🔑 Licensing\n\nThis source code is licensed for commercial use and is provided for local evaluation. A **Lifetime Commercial License** is required for any production or public-facing application.\n\nPlease visit the main [Flutter News App Full Source Code Toolkit](https://github.com/flutter-news-app-full-source-code) organization page to review the full license terms and to purchase.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflutter-news-app-full-source-code%2Fdata-repository","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflutter-news-app-full-source-code%2Fdata-repository","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflutter-news-app-full-source-code%2Fdata-repository/lists"}