{"id":13713977,"url":"https://github.com/crabbymonkey/nerf-controller","last_synced_at":"2025-06-16T04:04:58.341Z","repository":{"id":64304969,"uuid":"148246334","full_name":"crabbymonkey/nerf-controller","owner":"crabbymonkey","description":"Designed to run on a Raspberry Pi Zero W connected to a nerf gun or other method of firing projectiles with a user interface via a web app, the program interfaces with StreamLabs to record donations that will add rounds to the hopper to be fired.","archived":false,"fork":false,"pushed_at":"2021-09-09T02:33:19.000Z","size":8528,"stargazers_count":4,"open_issues_count":4,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-09T12:36:02.833Z","etag":null,"topics":["donations","go","golang","live-streaming","nerf","nerf-contorller","nerf-gun","raspberry-pi","streaming","streamlabs","streamlabs-api","twitch","webapp"],"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/crabbymonkey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-11T02:06:49.000Z","updated_at":"2022-12-05T14:49:35.000Z","dependencies_parsed_at":"2023-01-15T10:30:18.024Z","dependency_job_id":null,"html_url":"https://github.com/crabbymonkey/nerf-controller","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crabbymonkey%2Fnerf-controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crabbymonkey%2Fnerf-controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crabbymonkey%2Fnerf-controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crabbymonkey%2Fnerf-controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crabbymonkey","download_url":"https://codeload.github.com/crabbymonkey/nerf-controller/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250461932,"owners_count":21434504,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["donations","go","golang","live-streaming","nerf","nerf-contorller","nerf-gun","raspberry-pi","streaming","streamlabs","streamlabs-api","twitch","webapp"],"created_at":"2024-08-02T23:01:49.136Z","updated_at":"2025-04-23T15:41:06.574Z","avatar_url":"https://github.com/crabbymonkey.png","language":"Go","readme":"# Nerf-Controller\nThis code interfaces and run the web app GUI for an automated nerf gun that makes live stream donations into shots at the streamer. Designed to run on a Raspberry Pi Zero W connected to a nerf gun or other method of firing projectiles with a user interface via a web app, the program interfaces with StreamLabs to record donations that will add rounds to the hopper to be fired. The only projectiles to be used are safe to fire at humans such as the Nerf Rival Rounds or similar. Future iterations may have a 3D printable mechanism that can be used to fire the rounds, see the deployment section for more information.\n\n## Getting Started\n\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.\n\n### Prerequisites\n\n* [Golang v1.11.x or higher](https://golang.org/doc/install \"Golang\")\n* [StreamLabs account](https://streamlabs.com/ \"StreamLabs\")\n* make\n\n### Installing\n\nA step by step series of examples that explains how to get a development environment running. To build the system that will fire rounds see the Deployment section below.\n\n1. Create a [StreamLabs API App](https://streamlabs.com/dashboard#/apisettings \"StreamLabs API App\")\n\t1. Click the \"Register An App\" button.\n\t2. Fill out the information, most of the information dosen't matter except for **Whitelist Users should be your StreamLabs username and Redirect URI should be http://localhost:8080/live** (*Note: replace the 8080 with whatever port you would like to use*)\n2. Create a StreamLabsAPI.json file in the project home directory to have the correct information for the application you created.\n\t1. Example StreamLabsAPI.json:\n\t\t```json\n\t\t{\n  \t\t\"ClientID\": \"7FDyzIU5NPbDLJ0kvB5C5CYSay6VYxNoNmza0RW1\",\n  \t\t\"ClientSecret\": \"wleRBri2UFhUFYBCdnDhOASgBm2uQ7H60vkC34hB\",\n  \t\t\"RedirectURI\": \"http://localhost:8080/live\"\n\t\t}\n\t\t```\n3. (Optional) If you would like to change what port is used you can set the PORT environment veriable. by default the port used is 8080.\n\t1. Example of setting the port to 3000 instead of 8080 using a bash comand\n\t\t```\n\t\tPORT=\"3000\"\n\t\t```\n4. The setup should now be complete the program can be tested and run with the following make command from the project home directory.\n\t```\n\tmake all run\n\t```\n\nIf correctly setup you should see the following in the console.\n```\ngo fmt\ngo test -v ./...\n=== RUN   TestGetPort\n--- PASS: TestGetPort (0.00s)\n=== RUN   TestHomeHandler\n--- PASS: TestHomeHandler (0.00s)\n=== RUN   TestFireHandler\n{Fri, 21 Dec 2018 22:54:35 EST} FIRE!!!\n--- PASS: TestFireHandler (0.00s)\n=== RUN   TestTokenHandler\n{Fri, 21 Dec 2018 22:54:35 EST} https://streamlabs.com/api/v1.0/authorize?client_id=7FDyzIU5NPbDLJ0kvB5C5CYSay6VYxNoNmza0RW1\u0026redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Flive\u0026response_type=code\u0026scope=donations.read\n{Fri, 21 Dec 2018 22:54:35 EST} https://streamlabs.com/api/v1.0/authorize?client_id=7FDyzIU5NPbDLJ0kvB5C5CYSay6VYxNoNmza0RW1\u0026redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Flive\u0026response_type=code\u0026scope=donations.read\n--- PASS: TestTokenHandler (0.00s)\n=== RUN   TestRandomPageHandler\nSorry but it seems this page does not exist...\nSorry but it seems this page does not exist...\nSorry but it seems this page does not exist...\n--- PASS: TestRandomPageHandler (0.00s)\n=== RUN   TestFire\n{Fri, 21 Dec 2018 22:54:35 EST} FIRE!!!\n--- PASS: TestFire (0.00s)\n=== RUN   TestRandomValue\n6\n14\n8\n7\n9\n12\n11\n5\n15\n10\n13\n--- PASS: TestRandomValue (0.00s)\nPASS\nok  \t_/Users/rdufrene/work/nerf-contorller\t(cached)\ngo build -o nerf-controller -v \n_/Users/rdufrene/work/nerf-contorller\ngo build -o nerf-controller -v ./...\n./nerf-controller\nNow listening to port :8080\n```\nNow visiting http://localhost:8080/ should display the user interface.\n\n## Running the tests\n\nThe tests are run using the make command `make test` in the project home directory.\n\n## Deployment\n\n*TODO: Development is still in progress so development on a live system is not ready yet.*\n\nHow to use the application can be found [here](https://github.com/crabbymonkey/nerf-controller/wiki/How-to-Use).\n\n## Built With\n\n* [Golang](https://golang.org/) - Code Backend and Framework\n* [StreamLabs](https://streamlabs.com/) - Donations Management\n* make - Code and Compilation Rules Management\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](https://github.com/crabbymonkey/nerf-contorller/blob/master/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.\n\n## Versioning\n\nWe use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/crabbymonkey/nerf-contorller/tags). \n\n## Authors\n\n* **Ryan Dufrene** - *Initial work* - [crabbymonkey](https://github.com/crabbymonkey)\n\nSee also the list of [contributors](https://github.com/crabbymonkey/nerf-contorller/contributors) who participated in this project.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details\n\n## Acknowledgments\n\n* *Billie Thompson* ([PurpleBooth](https://github.com/PurpleBooth)) - README.md and CONTRIBUTING.md templates used\n","funding_links":[],"categories":["Repositories","Libraries"],"sub_categories":["Golang"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrabbymonkey%2Fnerf-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrabbymonkey%2Fnerf-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrabbymonkey%2Fnerf-controller/lists"}