{"id":43461631,"url":"https://github.com/open-farms/inventory","last_synced_at":"2026-02-03T05:53:04.394Z","repository":{"id":46252105,"uuid":"423638676","full_name":"open-farms/inventory","owner":"open-farms","description":"Inventory management API for agriculture","archived":false,"fork":false,"pushed_at":"2021-11-09T06:34:18.000Z","size":633,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-06-21T03:14:44.902Z","etag":null,"topics":["agriculture","api","farms","golang","grpc"],"latest_commit_sha":null,"homepage":"","language":"Go","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/open-farms.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}},"created_at":"2021-11-01T22:48:51.000Z","updated_at":"2023-06-04T18:56:10.000Z","dependencies_parsed_at":"2022-08-28T01:24:55.271Z","dependency_job_id":null,"html_url":"https://github.com/open-farms/inventory","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/open-farms/inventory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-farms%2Finventory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-farms%2Finventory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-farms%2Finventory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-farms%2Finventory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/open-farms","download_url":"https://codeload.github.com/open-farms/inventory/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-farms%2Finventory/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29034916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T02:28:16.591Z","status":"ssl_error","status_checked_at":"2026-02-03T02:27:48.904Z","response_time":96,"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":["agriculture","api","farms","golang","grpc"],"created_at":"2026-02-03T05:53:01.452Z","updated_at":"2026-02-03T05:53:04.387Z","avatar_url":"https://github.com/open-farms.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Inventory 📦\n\n\u003e An inventory service for managing farming vehicles, equipment, and resources.\n\n![logo](./logo.png)\n\n## What is this?\n\n- A REST API for managing farm inventory via HTTP requests\n- A gRPC Service for managing farm inventory via RPC requests\n- A CLI for managing farm inventory\n\nThe inventory service enables users to keep track of farm inventory across multiple IoT devices, servers, applications, or databases. This service provides a foundational interface for inventory management and interaction.\n\n## Structure\n\n```shell\n/cmd/inventory # http api server\n/cmd/inventoryctl # cli tool for service administration\n/ent # database models, migrations, and drivers\n/ent/schemas # editable database models\n/internal/settings # settings package to read in application configs\n```\n\n## Quickstart ⚡\n\n[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new/template?template=https%3A%2F%2Fgithub.com%2Fopen-farms%2Finventory\u0026plugins=postgresql\u0026envs=PORT%2CINVENTORY_HTTP_AUTH_ENABLED%2CINVENTORY_HTTP_AUTH_TOKEN\u0026PORTDesc=Exposed+application+port\u0026INVENTORY_HTTP_AUTH_ENABLEDDesc=Enable+basic+auth+for+api\u0026INVENTORY_HTTP_AUTH_TOKENDesc=Token+used+for+basic+authentication\u0026PORTDefault=8000\u0026INVENTORY_HTTP_AUTH_ENABLEDDefault=false\u0026referralCode=XwTg6R)\n\nYou can either install inventory directly with go, build the project from source, or [download a binary from the latest release](https://github.com/open-farms/inventory/releases)\n\n### Docker Compose\n\n```shell\n# Start the database and API via docker-compose\ndocker-compose up\n\n# List the vehicles\nhttp :8000/v1/vehicles\n```\n\nInstall with `go install`\n\n```shell\n# Install the server\ngo install github.com/open-farms/inventory/cmd/inventory@latest\n\n# Install the admin cli\ngo install github.com/open-farms/inventory/cmd/inventoryctl@latest\n```\n\n## Configuration ⚙️\n\nConfigure the application with the following environment variables\n\n```shell\n# HTTP Settings\nINVENTORY_HTTP_ADDR # default:\"0.0.0.0:8000\"\nINVENTORY_HTTP_TIMEOUT # default:\"5s\"\nINVENTORY_HTTP_AUTH_ENABLED # default:\"false\"\nINVENTORY_HTTP_AUTH_TOKEN # default:\"inventory\" - use \"token:inventory\" if basic auth enabled with default token\n\n# GRPC Settings\nINVENTORY_GRPC_ADDR # default:\"0.0.0.0:9000\"\nINVENTORY_GRPC_TIMEOUT # default:\"5s\"\n\n# Storage Settings\nINVENTORY_STORAGE_DRIVER # default:\"postgres\"\nINVENTORY_STORAGE_URI # default:\"\" - Automatically configured if deploying to railway\nINVENTORY_STORAGE_MIGRATE # default:true\nINVENTORY_STORAGE_DEBUG # default:true\n```\n\n## Start the service 🏃\n\nStart the service directly with the binary or run it containerized with Docker.\n\n```shell\n# Run the inventory service\ninventory\n```\n\n```shell\n# Build the docker image\ndocker build -t \u003cyour-docker-image-name\u003e .\n\n# Run the docker image, exposing the service\ndocker run --rm -v ./config:/data/config -p 8000:8000 \u003cyour-docker-image-name\u003e\n```\n\n## Manage the inventory database with the [inventoryctl](./cmd/inventoryctl) CLI\n\n```shell\n# Start the postgres database\ndocker-compose up\n\n# Run the inventoryctl cli to perform database migrations\ninventoryctl --help\ninventoryctl migrate\n```\n\n## Generate code and build from source 🏗️\n\nGenerate the service code, openapi spec, and build from source\n\n```\nmake init\nmake generate\nmake test\nmake build\n```\n\n## Services\n\n[View the openapi specification](./openapi.json)\n\n[View the protobuf schemas and services](./ent/proto/entpb/entpb.proto)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-farms%2Finventory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopen-farms%2Finventory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-farms%2Finventory/lists"}