{"id":32271521,"url":"https://github.com/nemr0/sqflite_live","last_synced_at":"2025-10-22T22:55:00.101Z","repository":{"id":293743560,"uuid":"981501218","full_name":"nemr0/sqflite_live","owner":"nemr0","description":"View/Query sqflite on a locally hosted sqlite viewer.","archived":false,"fork":false,"pushed_at":"2025-05-19T13:48:50.000Z","size":9183,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-22T22:54:58.511Z","etag":null,"topics":["sqflite","sqflite-database"],"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/nemr0.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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-11T08:55:39.000Z","updated_at":"2025-05-28T07:03:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"403e4be8-96a6-4a37-9c67-a615fb9dc429","html_url":"https://github.com/nemr0/sqflite_live","commit_stats":null,"previous_names":["nemr0/sqflite_live"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/nemr0/sqflite_live","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nemr0%2Fsqflite_live","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nemr0%2Fsqflite_live/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nemr0%2Fsqflite_live/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nemr0%2Fsqflite_live/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nemr0","download_url":"https://codeload.github.com/nemr0/sqflite_live/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nemr0%2Fsqflite_live/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280528607,"owners_count":26345643,"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","status":"online","status_checked_at":"2025-10-22T02:00:06.515Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["sqflite","sqflite-database"],"created_at":"2025-10-22T22:54:56.822Z","updated_at":"2025-10-22T22:55:00.082Z","avatar_url":"https://github.com/nemr0.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sqflite\\_live\n\nA Dart package that spins up a local HTTP/WebSocket server to provide a live, real-time view of your SQLite database (`sqflite`) in the browser or any networked device.\n\n## Demo \n\n![Demo](https://raw.githubusercontent.com/nemr0/sqflite_live/master/demo.gif)\n\n## Features\n\n- [x] Runs a local server with a symbolic link to your sqflite db file.\n- [x] Runs on any device on the same network using the provided link.\n- [x] Just refresh for updates.(on any CRUD operation just refresh your browser)\n- [x] Deletes all unneeded data after closing the server.\n- [ ] Adding a widget for showing that the server is running.\n\n## Credits\n  This package utilizes a custom version of [sqlite_viewer](https://github.com/inloop/sqlite-viewer) for displaying and interacting with the SQLite database. \n\n## Installation\n\nAdd the package to your `pubspec.yaml`:\n\n```yaml\ndependencies:\n  sqflite_live: ^1.0.0\n```\n\nThen run:\n\n```bash\nflutter pub get\n```\n\n## Example Usage\n\nIn your Flutter app, simply call `.live()` on your database instance. For example:\n\n```dart\nimport 'package:path/path.dart';\nimport 'package:sqflite/sqflite.dart';\nimport 'package:sqflite_live/sqflite_live.dart';\n\nFuture\u003cDatabase\u003e _initDatabase() async {\n  final dbPath = await getDatabasesPath();\n  final path = join(dbPath, 'my_database.db');\n\n  return (await openDatabase(\n    path,\n    version: 1,\n    onCreate: (db, version) async {\n      await db.execute(\n        'CREATE TABLE items(id INTEGER PRIMARY KEY, name TEXT)',\n      );\n    },\n  ))\n    // Start the live server on port 8080\n    ..live(port: 8080);\n}\n```\n\nNow run your app and open your browser (or any device on the same network) to:\n\n```\nhttp://\u003cYOUR_DEVICE_IP\u003e:8080\n```\n\nto view and interact with live database updates.\n\n## Platform-Specific Permissions\n\nMost Apps doesn't need these permissions and work correctly without them, but if you want to access the sqlite viewer from other devices on the same network, you need to add some permissions.\n\n### Android\n\nif you are using an emulator and you want to access the sqlite viewer from host, run in your terminal:\n\n`adb -s emulator-5554 forward tcp:8081 tcp:8081`\n\nreplace `emulator-5554` with your emulator ID and `8081` with your selected port.\n\nit's advised to use this in debug mode only as you can use `AndroidManifest.xml` inside your `debug` folder.\n\nIn **android/app/src/main/AndroidManifest.xml**, ensure you have:\n\n```xml\n\u003cmanifest xmlns:android=\"http://schemas.android.com/apk/res/android\" package=\"com.example.app\"\u003e\n  \u003c!-- Allow HTTP server to receive and send traffic --\u003e\n  \u003cuses-permission android:name=\"android.permission.INTERNET\" /\u003e\n  \n  \u003capplication\n    android:label=\"${applicationName}\"\n    android:usesCleartextTraffic=\"true\"  \u003c!-- Enable clear-text (HTTP) traffic --\u003e\n    ...\u003e\n  \u003c/application\u003e\n\u003c/manifest\u003e\n```\n\nIf targeting Android 9+ and you want to restrict cleartext to local LAN only, create `android/app/src/main/res/xml/network_security_config.xml`:\n\n```xml\n\u003cnetwork-security-config\u003e\n  \u003cdomain-config cleartextTrafficPermitted=\"true\"\u003e\n    \u003cdomain includeSubdomains=\"true\"\u003e10.0.2.2\u003c/domain\u003e\n    \u003cdomain includeSubdomains=\"true\"\u003e192.168.*.*\u003c/domain\u003e\n  \u003c/domain-config\u003e\n\u003c/network-security-config\u003e\n```\n\nThen reference it in your `AndroidManifest.xml`:\n\n```xml\n\u003capplication\n  android:networkSecurityConfig=\"@xml/network_security_config\"\n  android:usesCleartextTraffic=\"false\"\n  ...\u003e\n```\n\n\n\n### iOS\nit's advised to use this in debug mode only as you can create a `info-development.plist`\n\nIn **ios/Runner/Info.plist**, add:\n\n```xml\n\u003ckey\u003eNSLocalNetworkUsageDescription\u003c/key\u003e\n\u003cstring\u003eThis app needs to host a local HTTP server to provide a live view of the database on other devices.\u003c/string\u003e\n\n\u003ckey\u003eNSBonjourServices\u003c/key\u003e\n\u003carray\u003e\n  \u003cstring\u003e_http._tcp\u003c/string\u003e\n\u003c/array\u003e\n```\n\nAfter installation, iOS will prompt:\n\n\u003e “\"YourApp\" Would Like to Find and Connect to Devices on Your Local Network.”\n\nBe sure the user grants this, or go to **Settings → Privacy → Local Network**.\n\n### macOS\nit's advised to use this in debug mode only as you can create a `info-development.plist`\n\nFor Flutter desktop apps, add these entitlements and Info.plist entries.\n\n**macos/Runner/DebugProfile.entitlements** \u0026 **Release.entitlements**:\n\n```xml\n\u003ckey\u003ecom.apple.security.network.client\u003c/key\u003e\n\u003ctrue/\u003e\n\u003ckey\u003ecom.apple.security.network.server\u003c/key\u003e\n\u003ctrue/\u003e\n```\n\n**macos/Runner/Info.plist**:\n\n```xml\n\u003ckey\u003eNSLocalNetworkUsageDescription\u003c/key\u003e\n\u003cstring\u003eThis app hosts a local HTTP server for live database debugging.\u003c/string\u003e\n\n\u003ckey\u003eNSBonjourServices\u003c/key\u003e\n\u003carray\u003e\n  \u003cstring\u003e_http._tcp\u003c/string\u003e\n\u003c/array\u003e\n```\n\nReinstall the app to see the Local Network permission prompt in System Settings.\n\n## License\n\n[BSD 3-clause license](https://opensource.org/license/BSD-3-Clause) © Omar Elnemr\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnemr0%2Fsqflite_live","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnemr0%2Fsqflite_live","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnemr0%2Fsqflite_live/lists"}