{"id":43832879,"url":"https://github.com/openthc/cre","last_synced_at":"2026-02-06T03:33:25.533Z","repository":{"id":55087409,"uuid":"235693311","full_name":"openthc/cre","owner":"openthc","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-15T19:27:14.000Z","size":571,"stargazers_count":1,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-15T21:50:25.544Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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-01-23T00:10:31.000Z","updated_at":"2026-01-15T19:27:21.000Z","dependencies_parsed_at":"2023-10-13T13:29:56.687Z","dependency_job_id":"17dca986-c259-4cce-8358-a5e4ca93c39d","html_url":"https://github.com/openthc/cre","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/openthc/cre","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openthc%2Fcre","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openthc%2Fcre/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openthc%2Fcre/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openthc%2Fcre/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openthc","download_url":"https://codeload.github.com/openthc/cre/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openthc%2Fcre/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29148257,"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":[],"created_at":"2026-02-06T03:33:24.484Z","updated_at":"2026-02-06T03:33:25.519Z","avatar_url":"https://github.com/openthc.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cannabis/Compliance/Crop Reporting Engine - CRE\n\nThis is a simple software solution for collecting and reporting on crops of cannabis or other tightly tracked, regulated products.\nA simple setup of an event-object-audit-log database, along with the API end-point to collect the necessary details.\n\nThe platform is extendable by the regulatory agency/operating company through middleware.\n\nMore information is available at https://openthc.com/cre\n\n\n## Global Storage\n\n * Company\n * License\n * Contact\n * Variety\n\n\n### License Specific Data\n\n * Section (aka: Area, Room)\n * Inventory Lot\n * Crop\n * B2B Transaction (aka: Manifest, Invoice, Transfer)\n * B2C Transaction (aka: Retail, Dispense)\n\n\n## Actions / Events\n\n * Crop/Create - Create Crops from Inventory Lot (of type: Plant, Clone or Seed)\n * Crop/Collect/Raw - Collect raw materials from the crop\n * Crop/Collect/Net - Account for net materials Dry/Cured/Trimmed state.\n * Crop/Collect/Lot - Creates Production Inventory Lot\n * Inventory/Create\n * Inventory/Convert - One or more Source Lots into one Output Lot\n * Inventory/Combine\n * Inventory/Sample - Remove a Small Portion for Unique Sample (Employee, QA, Vendor, etc)\n * B2B/Create - File the B2B Transaction\n * B2B/Commit - Commit/Send the B2B Transaction\n * B2B/Accept - Accept/Receive the B2B Transaction\n * B2B/Reject - Reject the B2B Transaction\n\n\n## Reporting\n\n * Realtime Object States\n * Realtime Activity Reports\n * Verbose Logging with complete Object delta\n * Easily extendable via Middleware components\n\n\n## APIs\n\n * Simple [API Interface](https://api.openthc.org/)\n * Direct Write/Update of Objects (Crop, Inventory, B2B, B2C)\n * Indirect Update via Actions\n\n\n## Identifiers\n\n * ULID/UUID - https://github.com/ulid/spec\n * No reliance on central authority (*BioTrack*, *METRC*, *LeafData*)\n * No reliance on expensive RFID (*METRC*)\n * No \"Smart\" numbers (*BioTrack*, *LeafData*)\n * Support for billions of billions of tracked items\n   * Usable until 10889 AD\n   * 1.21 Giga-Giga (2^80) unique items per millisecond!\n\n\n## Customizing\n\nIf you want to add new custom Services, Middleware or other code use the `./Custom` directory.\nAll of your custom libraries would be in `./Custom/Service` or `./Custom/Middleware`.\nThen you can use them in the `./webroot/main.php` script.\n\n\n## Authenitication\n\n```mermaid\n\nsequenceDiagram\n    App-\u003e\u003e+CRE: Auth Service, Contact, Company, License\n    CRE-\u003e\u003e+SSO: Auth Service, Contact, Company\n    SSO-\u003e\u003e-CRE: Service, Contact, Company\n    CRE--\u003eDIR: License Verify\n    CRE--\u003e\u003eCRE: License Verify\n    CRE-\u003e\u003e-App: Session\n    App-\u003e\u003eCRE: Req\n    CRE-\u003e\u003eApp: Res\n    App--\u003e\u003eCRE: ReqN\n    CRE--\u003e\u003eApp: ResN\n```\n\n\n## Docker\n\nBuild it (regular or via compose)\n\n```shell\ndocker build \\\n  --file docker/Dockerfile \\\n  --tag openthc/cre:latest \\\n  ./\n# OR\ndocker compose \\\n  --file docker/compose.yaml \\\n  build\n# OR\ncd docker \u0026\u0026 docker compose build\n```\n\n\nRun it and test?\n\n```shell\ndocker run --rm -it openthc/cre:latest\n# OR\ndocker compose --file docker/compose.yaml up\n# OR\ncd docker \u0026\u0026 docker compose up\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenthc%2Fcre","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenthc%2Fcre","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenthc%2Fcre/lists"}