{"id":15177585,"url":"https://github.com/MAHMOUDELSAYED7/hive","last_synced_at":"2025-10-26T16:30:42.813Z","repository":{"id":254023433,"uuid":"845235398","full_name":"MAHMOUDELSAYED7/hive","owner":"MAHMOUDELSAYED7","description":"HiveDb - Hive Database Handler for Flutter","archived":false,"fork":false,"pushed_at":"2024-12-06T07:57:25.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T21:11:26.796Z","etag":null,"topics":["build-runner","database","db","flutter","flutter-apps","hive","hive-data-collection","hive-database","hive-db","hive-flutter","hive-generator","hivedb","local-database","localdb","localstorage","pub-dev","pub-package"],"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/MAHMOUDELSAYED7.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-08-20T21:19:06.000Z","updated_at":"2024-12-06T07:57:28.000Z","dependencies_parsed_at":"2024-09-27T14:40:50.787Z","dependency_job_id":"377b4025-d5c1-404d-a9af-8f56c622dd12","html_url":"https://github.com/MAHMOUDELSAYED7/hive","commit_stats":{"total_commits":3,"total_committers":2,"mean_commits":1.5,"dds":"0.33333333333333337","last_synced_commit":"ee9f53575653112a092c21a069dc97eabe086c2e"},"previous_names":["mahmoudelsayed69/hive","mahmoudelsayed7/hive"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MAHMOUDELSAYED7%2Fhive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MAHMOUDELSAYED7%2Fhive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MAHMOUDELSAYED7%2Fhive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MAHMOUDELSAYED7%2Fhive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MAHMOUDELSAYED7","download_url":"https://codeload.github.com/MAHMOUDELSAYED7/hive/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238366692,"owners_count":19460170,"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":["build-runner","database","db","flutter","flutter-apps","hive","hive-data-collection","hive-database","hive-db","hive-flutter","hive-generator","hivedb","local-database","localdb","localstorage","pub-dev","pub-package"],"created_at":"2024-09-27T14:40:45.843Z","updated_at":"2025-10-26T16:30:42.523Z","avatar_url":"https://github.com/MAHMOUDELSAYED7.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HiveDb - Hive Database Handler for Flutter\n\nThis Flutter project provides a reusable, singleton class, **HiveDb**, to handle Hive database operations. The class manages the initialization, configuration, and CRUD operations on a database, allowing developers to define their own data models and manage user accounts, pizzas, and invoices dynamically.\n\n## Features\n\n- **Singleton Pattern**: Uses a single database instance throughout the app.\n- **Initialization**: Sets up the database and opens necessary boxes.\n- **Table Management**: Allows custom table definitions for box creation.\n- **CRUD Operations**: Provides methods for creating, reading, updating, and deleting records.\n- **User Management**: Supports user insertion and retrieval with validation.\n- **Invoice Management**: Saves invoices and generates the next invoice number.\n\n## Getting Started\n\n### Prerequisites\n\nEnsure you have Flutter installed and set up on your machine. You will also need to include the following dependencies in your `pubspec.yaml` file:\n\n```yaml\ndependencies:\n  flutter:\n    sdk: flutter\n  hive: ^2.0.0\n  hive_flutter: ^1.1.0\n  path_provider: ^2.0.10\n\ndev_dependencies:\n  build_runner: ^2.4.11\n  hive_generator: ^2.0.1\n```\n### Installation\n1. Clone the repository or copy the HiveDb class into your Flutter project.\n\n2. Run the build_runner command in your terminal:\n```\ndart run build_runner build\n```\n3. Initialize the database in your main application file. You can do this using an anonymous object:\n\n```dart\nFuture\u003cvoid\u003e main() async {\n  WidgetsFlutterBinding.ensureInitialized();\n  await HiveDb().initializeDatabase();\n  runApp(MyApp());\n}\n```\n## Notice\n\nYou can easily customize the database structure by modifying the user, pizza, and invoice classes as needed. This makes `HiveDb` suitable for a variety of applications, from simple projects to more complex systems with unique data requirements.\n## Contact\n\nFor any questions or feedback, please reach out via email: [mahmoudelsayed.dev@gmail.com](mahmoudelsayed.dev@gmail.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMAHMOUDELSAYED7%2Fhive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMAHMOUDELSAYED7%2Fhive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMAHMOUDELSAYED7%2Fhive/lists"}