{"id":43832870,"url":"https://github.com/openthc/bong","last_synced_at":"2026-02-06T03:33:25.472Z","repository":{"id":56198761,"uuid":"269430839","full_name":"openthc/bong","owner":"openthc","description":"Basic Object Normalization Gateway","archived":false,"fork":false,"pushed_at":"2025-12-15T16:07:38.000Z","size":758,"stargazers_count":4,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-12-18T21:49:23.785Z","etag":null,"topics":["seed-to-sale","traceability"],"latest_commit_sha":null,"homepage":"https://openthc.com/bong","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openthc.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2020-06-04T18:08:03.000Z","updated_at":"2025-12-15T16:07:42.000Z","dependencies_parsed_at":"2025-12-11T03:01:53.528Z","dependency_job_id":null,"html_url":"https://github.com/openthc/bong","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/openthc/bong","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openthc%2Fbong","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openthc%2Fbong/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openthc%2Fbong/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openthc%2Fbong/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openthc","download_url":"https://codeload.github.com/openthc/bong/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openthc%2Fbong/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29148259,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T02:39:25.012Z","status":"ssl_error","status_checked_at":"2026-02-06T02:37:22.784Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["seed-to-sale","traceability"],"created_at":"2026-02-06T03:33:24.064Z","updated_at":"2026-02-06T03:33:25.462Z","avatar_url":"https://github.com/openthc.png","language":"PHP","readme":"# Basic Object Normalization Gateway\n\nInterfaces with multiple Cannabis APIs (BioTrack, CCRS, Metrc).\nNormalizes to the OpenTHC API interfaces and data-models.\n\n```mermaid\nsequenceDiagram\n    App-\u003e\u003e+Bong: Create Object (100)\n    Bong-\u003e\u003e+CRE: Upload Object (102)\n    CRE--\u003e\u003e-Bong: Success (201)\n    Bong--\u003e\u003e-App: Success (201)\n```\n\n\n## Install\n\n1. Clone this Repository to somewhere clever `git clone $REPO /opt/openthc/bong`\n1. Update the Apache Config (use `etc/apache2-example.conf` as a template)\n1. Create the Base Database from `etc/sql/*.sql` and add the triggers.\n1. Configure in `etc/config.php` from `etc/config-example.php`\n\n\n## Connect\n\nYou can use BONG through it's normal web-interface to view objects in real time or view logs.\n\nBONG also provides an API -- so that other services can consume the data from the different back-ends easier.\n\n\n### With JWT\n\n```\ncurl --header \"Bearer: jwt/$JWT\" $BONG/auth/open\n```\n\n\n### With Session\n\n```php\ncurl --cookie=cookie-file.dat $BONG/auth/open\n```\n\n\n## Sync \u0026 Cache\n\nThe APIs that BONG interfaces with don't all agree on how to do pages of data, or sorting, or filtering.\nBONG has tools that work in the background to pull and cache data.\n\n```\nGET $BONG/status\nGET $BONG/inventory/status\n```\n\n\n## Reading Objects\n\nA low level, GET and POST/PUT interface exists.\n\n\n```\nGET https://$BONG/license\nGET https://$BONG/license/current/status\nGET https://$BONG/license/$ID/status\n```\n\n\n## Reading Crop\n\n```\nGET /crop\nGET /crop?filter=(active|wet-collect|dry-collect|done|dead)\nGET /crop?filter=and\u0026f-[n0]=[v0]\u0026f-[n1]=[v1]\nGET /crop?filter=or\u0026f-[n0]=[v0]\u0026f-[n1]=[v1]\n```\n\n## Reading Inventory\n\n```\nGET /inventory\nGET /inventory?filter=(active)\nGET /inventory?filter=and\nGET /inventory?filter=or\n```\n\n## Reading Transfer Data\n\n```\nGET /b2b\nGET /b2b/outgoing?filter=(active)\nGET /b2b/incoming?filter=(active)\nGET /b2b?filter=and\nGET /b2b?filter=or\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenthc%2Fbong","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenthc%2Fbong","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenthc%2Fbong/lists"}