{"id":30321254,"url":"https://github.com/ricountzero/veggie_vision_web_server","last_synced_at":"2026-05-18T03:35:03.316Z","repository":{"id":310017567,"uuid":"1028915940","full_name":"ricountzero/veggie_vision_web_server","owner":"ricountzero","description":"A simple HTTP server for storing humidity sensor data.","archived":false,"fork":false,"pushed_at":"2025-08-04T23:56:02.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-11T11:44:52.497Z","etag":null,"topics":["elixir","erlang-otp","postgresql"],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/ricountzero.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,"zenodo":null}},"created_at":"2025-07-30T08:49:36.000Z","updated_at":"2025-08-05T00:02:31.000Z","dependencies_parsed_at":"2025-08-15T07:31:50.231Z","dependency_job_id":"498dbcf9-02b0-4543-9ecc-a3ca81886383","html_url":"https://github.com/ricountzero/veggie_vision_web_server","commit_stats":null,"previous_names":["ricountzero/veggie_vision_web_server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ricountzero/veggie_vision_web_server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricountzero%2Fveggie_vision_web_server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricountzero%2Fveggie_vision_web_server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricountzero%2Fveggie_vision_web_server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricountzero%2Fveggie_vision_web_server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ricountzero","download_url":"https://codeload.github.com/ricountzero/veggie_vision_web_server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricountzero%2Fveggie_vision_web_server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33163774,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"online","status_checked_at":"2026-05-18T02:00:06.436Z","response_time":71,"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":["elixir","erlang-otp","postgresql"],"created_at":"2025-08-17T21:46:32.981Z","updated_at":"2026-05-18T03:35:03.301Z","avatar_url":"https://github.com/ricountzero.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Veggie Vision HTTP Server\n\nA simple HTTP server built with Elixir, Plug, and Cowboy for storing humidity sensor data.\n\n## Prerequisites\n\n- Elixir 1.18 or later\n- Erlang/OTP\n- Mix (comes with Elixir)\n\n## Installation\n\n1. Clone the repository:\n   ```bash\n   git clone \u003crepository-url\u003e\n   cd veggie_vision_web_server\n   ```\n\n2. Install dependencies:\n   ```bash\n   mix deps.get\n   ```\n\n## Running the Server\n\n### Development Mode\n\nTo run the server in development mode:\n\n```bash\nmix run\n```\n\nThe server will start on `http://localhost:4000`\n\n### Production Mode\n\nTo run the server in production mode:\n\n```bash\nMIX_ENV=prod mix run\n```\n\n### Interactive Mode\n\nTo run the server in interactive mode (allows you to interact with the Elixir shell):\n\n```bash\niex -S mix\n```\n\n## API Endpoints\n\n### Store Humidity Data\n\n**Endpoint:** `GET /store`\n\n**Query Parameters:**\n- `hum` (required): Humidity value to store\n\n**Examples:**\n```bash\n# Store humidity value of 75.5\ncurl \"http://localhost:4000/store?hum=75.5\"\n\n# Store humidity value of 80\ncurl \"http://localhost:4000/store?hum=80\"\n```\n\n**Response:**\n- **200 OK**: `:ok` - Humidity value stored successfully\n- **400 Bad Request**: `Missing 'hum' parameter` - When hum parameter is missing\n- **400 Bad Request**: `Only 'hum' parameter is allowed` - When additional parameters are provided\n\n**Rules:**\n- Only the `hum` parameter is allowed\n- The `hum` parameter must be present\n- Additional query parameters are not permitted\n\n### Other Endpoints\n\nAny other endpoint returns **404 Not Found**.\n\n## Testing\n\nRun the test suite:\n\n```bash\nmix test\n```\n\nThe test suite includes comprehensive tests for:\n- Valid humidity data storage\n- Missing parameter handling\n- Multiple parameter validation\n- URL encoding scenarios\n- Various data types (integers, floats, special characters)\n\n## Project Structure\n\n- `lib/application.ex` - Application supervisor that starts the HTTP server\n- `lib/veggie_http_server.ex` - Main HTTP server module with humidity data storage routing\n- `mix.exs` - Project configuration and dependencies\n- `test/` - Test files with comprehensive endpoint testing\n\n## Dependencies\n\n- `plug_cowboy` - HTTP server framework for Elixir\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricountzero%2Fveggie_vision_web_server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fricountzero%2Fveggie_vision_web_server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricountzero%2Fveggie_vision_web_server/lists"}