{"id":18411040,"url":"https://github.com/guyettinger/gle-roboflow-components","last_synced_at":"2026-05-17T11:33:17.755Z","repository":{"id":203578968,"uuid":"709950007","full_name":"guyettinger/gle-roboflow-components","owner":"guyettinger","description":"GLE Roboflow Component Library","archived":false,"fork":false,"pushed_at":"2023-12-01T00:47:34.000Z","size":11979,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-08T23:59:24.807Z","etag":null,"topics":["react","roboflow","typescript","webcam"],"latest_commit_sha":null,"homepage":"https://guyettinger.github.io/gle-roboflow-components/","language":"TypeScript","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/guyettinger.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}},"created_at":"2023-10-25T17:57:24.000Z","updated_at":"2023-10-25T19:56:40.000Z","dependencies_parsed_at":"2023-11-07T01:34:45.311Z","dependency_job_id":null,"html_url":"https://github.com/guyettinger/gle-roboflow-components","commit_stats":null,"previous_names":["guyettinger/gle-roboflow-components"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/guyettinger/gle-roboflow-components","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guyettinger%2Fgle-roboflow-components","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guyettinger%2Fgle-roboflow-components/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guyettinger%2Fgle-roboflow-components/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guyettinger%2Fgle-roboflow-components/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guyettinger","download_url":"https://codeload.github.com/guyettinger/gle-roboflow-components/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guyettinger%2Fgle-roboflow-components/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33136750,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["react","roboflow","typescript","webcam"],"created_at":"2024-11-06T03:35:01.245Z","updated_at":"2026-05-17T11:33:17.736Z","avatar_url":"https://github.com/guyettinger.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"/\"\u003e\n    \u003cimg alt=\"logo\" src=\"public/images/logo-flipped.png\" align=\"right\" width=\"120\" height=\"120\"/\u003e\n\u003c/a\u003e\n\n# GLE Roboflow Component Library\nA React Roboflow component library.\n\n[![Version](https://img.shields.io/npm/v/gle-roboflow-components?style=flat\u0026colorA=000000\u0026colorB=000000)](https://www.npmjs.com/package/gle-roboflow-components)\n[![Downloads](https://img.shields.io/npm/dt/gle-roboflow-components.svg?style=flat\u0026colorA=000000\u0026colorB=000000)](https://www.npmjs.com/package/gle-roboflow-components)\n\n## Documentation\n- [Storybook](https://guyettinger.github.io/gle-roboflow-components/)\n\n## Usage\n```tsx\nimport { useEffect, useRef, useState } from \"react\";\nimport Webcam from \"react-webcam\";\nimport styled from \"styled-components\";\nimport {\n    RoboflowApiProvider,\n    RoboflowAuthParams,\n    RoboflowClientProvider,\n    RoboflowLoadParams,\n    RoboflowModel,\n    RoboflowObjectDetection,\n    RoboflowObjectDetectionCanvas,\n    RoboflowWebcam,\n    useRoboflowClientContext,\n    waitForRoboflowModule\n} from \"gle-roboflow-components\"\n\n// Roboflow authorization\nconst PUBLISHABLE_ROBOFLOW_API_KEY = \"\u003cyour_roboflow_publishable_api_key\u003e\"\nconst roboflowAuthParams: RoboflowAuthParams = {\n    publishable_key: PUBLISHABLE_ROBOFLOW_API_KEY\n}\n\n// Detection model\nconst exampleDetectionModel = \"\u003croboflow_model_name\u003e\"\nconst exampleDetectionModelVersion = \"\u003croboflow_model_version\u003e\"\n\n// Example Component\nconst ExampleContainer = styled.div`\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  flex-direction: column;\n  margin: 1rem 0;\n`\n\nconst ExampleContent = styled.div`\n  position: relative;\n  padding: 1rem;\n  margin-bottom: 1rem;\n  background-color: #1D1E20;\n  border-radius: 4px;\n`\n\nconst ExampleVideoContent = styled.div`\n  position: relative;\n`\n\ninterface ExampleProps {\n    exampleDetectionModel: string,\n    exampleDetectionModelVersion: string\n}\n\nconst Example = ({exampleDetectionModel, exampleDetectionModelVersion}: ExampleProps) =\u003e {\n    const webcamRef = useRef\u003cWebcam\u003e(null)\n    const [objectDetections, setObjectDetections] = useState\u003cRoboflowObjectDetection[]\u003e([])\n    const [webcamInitialized, setWebcamInitialized] = useState\u003cboolean\u003e(false)\n    const [webcamWidth, setWebcamWidth] = useState(0)\n    const [webcamHeight, setWebcamHeight] = useState(0)\n    const roboflowClient = useRoboflowClientContext()\n    const isReadyForCanvas = (webcamInitialized \u0026\u0026 webcamWidth \u003e 0 \u0026\u0026 webcamHeight \u003e 0)\n\n    const detect = async (model: RoboflowModel) =\u003e {\n        if (!webcamInitialized) return\n\n        const webcam = webcamRef.current\n        if (!webcam) return\n\n        const video = webcam.video\n        if (!video) return\n\n        //  get detections\n        try {\n            const detections = await model.detect(video)\n            console.log('roboflow detected', detections)\n            setObjectDetections(detections)\n        } catch (e) {\n            const error = e as Error\n            if (!error) return\n            console.error(error.message)\n        }\n    }\n\n    useEffect(() =\u003e {\n        if (webcamInitialized) {\n            // load the model\n            const roboflowLoadParams: RoboflowLoadParams = {\n                model: exampleDetectionModel,\n                version: exampleDetectionModelVersion\n            }\n            roboflowClient.load(roboflowLoadParams).then(() =\u003e {\n                // start inference\n                roboflowClient.startInference(detect)\n            })\n        }\n    }, [webcamInitialized])\n\n    const handleRoboflowWebcamInitialized = () =\u003e {\n        setWebcamInitialized(true)\n        console.log('roboflow webcam initialized')\n    }\n\n    const handleRoboflowWebcamSizeChange = (width: number, height: number) =\u003e {\n        setWebcamWidth(width)\n        setWebcamHeight(height)\n        console.log('roboflow webcam size change', width, height)\n    }\n\n    return (\n        \u003cExampleContainer\u003e\n            \u003cExampleContent\u003e\n                \u003cExampleVideoContent\u003e\n                    \u003cRoboflowWebcam\n                        ref={webcamRef}\n                        onInitialized={handleRoboflowWebcamInitialized}\n                        onSizeChange={handleRoboflowWebcamSizeChange}\n                    \u003e\n                        {isReadyForCanvas \u0026\u0026\n                            \u003cRoboflowObjectDetectionCanvas\n                                width={webcamWidth}\n                                height={webcamHeight}\n                                objectDetections={objectDetections}\n                            /\u003e\n                        }\n                    \u003c/RoboflowWebcam\u003e\n                \u003c/ExampleVideoContent\u003e\n            \u003c/ExampleContent\u003e\n        \u003c/ExampleContainer\u003e\n    )\n}\n\n// Example App\nconst ExampleAppContent = styled.div`\n  display: flex;\n  flex-direction: column;\n  padding: 0 10%\n`\n\nconst ExampleApp = () =\u003e {\n    const [roboflowReady, setRoboflowReady] = useState(false)\n\n    useEffect(() =\u003e {\n        waitForRoboflowModule().then(() =\u003e {\n            setRoboflowReady(true)\n        })\n    }, []);\n\n    return (\n        \u003cExampleAppContent\u003e\n            {roboflowReady \u0026\u0026\n                \u003cRoboflowApiProvider roboflowAuthParams={roboflowAuthParams}\u003e\n                    \u003cRoboflowClientProvider\u003e\n                        \u003cExample exampleDetectionModel={exampleDetectionModel}\n                                 exampleDetectionModelVersion={exampleDetectionModelVersion}\n                        /\u003e\n                    \u003c/RoboflowClientProvider\u003e\n                \u003c/RoboflowApiProvider\u003e\n            }\n            {!roboflowReady \u0026\u0026\n                \u003cspan\u003eloading...\u003c/span\u003e\n            }\n        \u003c/ExampleAppContent\u003e\n    )\n}\n\n\n```\n\n## Installation\n```shell\nnpm install gle-roboflow-components@latest\n```\n\n## Development\nInstall\n```\nnpm install\n```\nBuild Library\n```\nnpm run build\n```\nRun Tests\n```\nnpm run test\n```\nRun Storybook\n```\nnpm run storybook\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguyettinger%2Fgle-roboflow-components","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguyettinger%2Fgle-roboflow-components","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguyettinger%2Fgle-roboflow-components/lists"}