{"id":2797,"date":"2024-12-20T22:59:58","date_gmt":"2024-12-21T03:59:58","guid":{"rendered":"https:\/\/techministry.blog\/?p=2797"},"modified":"2024-12-20T22:59:58","modified_gmt":"2024-12-21T03:59:58","slug":"streamlining-electron-app-development-with-ai-building-a-virtual-stream-deck-for-bitfocus-companion-using-the-satellite-api","status":"publish","type":"post","link":"https:\/\/techministry.blog\/?p=2797","title":{"rendered":"Streamlining Electron App Development with AI: Building a Virtual Stream Deck for Bitfocus Companion using the Satellite API"},"content":{"rendered":"\n<p>On the side from my full time job in ministry, I do <a href=\"http:\/\/josephadams.dev\">coding-work-for-hire<\/a>. It&#8217;s one of the ways I provide for my family. I&#8217;ve had opportunities to create custom dashboard panels, modules for Bitfocus companion, and lots of other bespoke solutions for whatever people need. (<a href=\"http:\/\/josephadams.dev\">Hit me up<\/a> if you ever need anything!)<\/p>\n\n\n\n<p>One of the tools in my tool belt that I use regularly when coding is <a href=\"https:\/\/github.com\/features\/copilot\">Github Copilot<\/a>. It&#8217;s $10 a month and saves me so much time. Never heard of it?<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>GitHub Copilot is an AI-powered coding assistant developed by GitHub and OpenAI, designed to help developers write code faster and more efficiently. Integrated directly into popular code editors like Visual Studio Code, Copilot suggests code snippets, functions, and even entire blocks of code in real time as you type, based on the context of your project. It supports multiple programming languages and leverages a vast amount of open-source code to provide relevant suggestions, making it a valuable tool for both beginners and experienced developers looking to speed up their workflow, reduce errors, and explore new coding approaches.<\/p>\n<\/blockquote>\n\n\n\n<p>It seriously saves me a lot of time by providing suggestions and workflows that I may never have thought of, while not necessarily doing things that I would not have done. After using it for a year and a half, I have it trained well on the ways I like to code.<\/p>\n\n\n\n<p>Recently, I also signed up for <a href=\"http:\/\/chatgpt.com\">OpenAI&#8217;s ChatGPT<\/a> Plus plan. It&#8217;s $20 a month. I may not keep subscribing long term, but I&#8217;m trying it out. It gives me access to GPT 4o and DALL-E and all of their other tools. I used it to help me decipher a protocol for some paid work I was doing and it helped me save time. These tools are not at a point where I can just hand it the whole job and get a perfect response &#8211; but guiding it through the process in steps? I can get helpful responses that way.<\/p>\n\n\n\n<p>After I was done with my protocol project, I simply asked ChatGPT, &#8220;give me a boilerplate typescript Electron app using my example&#8221;. I&#8217;ve shared <a href=\"https:\/\/techministry.blog\/2023\/06\/07\/notify-production-team-members-remotely-using-open-source-software-and-low-cost-usb-busy-lights\/\">several<\/a> <a href=\"https:\/\/techministry.blog\/2023\/05\/07\/midi-relay-v3-0-is-here-as-an-electron-app-for-mac-and-windows\/\">of<\/a> <a href=\"https:\/\/techministry.blog\/2022\/07\/26\/using-node-js-electron-and-applescripts-to-remotely-control-spotify-over-the-network-from-a-stream-deck-via-a-rest-api-and-socket-io\/\">my<\/a> <a href=\"https:\/\/techministry.blog\/2018\/07\/12\/on-screen-tally-light-for-propresenter-using-software\/\">electron<\/a> <a href=\"https:\/\/techministry.blog\/2021\/07\/29\/tally-arbiter-2-0-now-available\/\">apps<\/a> before. It&#8217;s my preferred method for cross platform apps (meaning they can run on MacOS, Windows, and Linux desktops). I wanted to see if I could guide ChatGPT through the process of giving me a new template to help take some projects further and implement standards and practices that I might not be aware of.<\/p>\n\n\n\n<p>One particular project I&#8217;ve wanted to work on for awhile now is something I&#8217;m calling <em>ScreenDeck. <\/em>It&#8217;s essentially a screen based stream deck for Bitfocus Companion that uses the built in Satellite API to create virtual surfaces.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/techministry.blog\/wp-content\/uploads\/2024\/12\/tray-icon.png?w=512\" alt=\"\" class=\"wp-image-3077\" style=\"width:130px;height:auto\" \/><figcaption class=\"wp-element-caption\">Every good project needs a logo, right?<\/figcaption><\/figure>\n<\/div>\n\n\n<p>I know the browser based emulator exists, but I wanted something that ran a little more &#8220;native looking&#8221; on the OS and could always sit on top of other windows so it&#8217;s immediately accessible.<\/p>\n\n\n\n<p> I had started on it over a year ago, but the small nuances and things to code just felt overwhelming to implement in my &#8220;spare time&#8221;. However, together with my AI tools, I was able to quickly craft a new boilerplate template and apply it to the ScreenDeck project I had started a long time ago, and come up with a working solution in just a few days. It was a lot of back and forth with the chat, prompting it to craft more and more refined responses.<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" data-id=\"3092\" src=\"https:\/\/techministry.blog\/wp-content\/uploads\/2024\/12\/screenshot-2024-12-06-at-7.17.44e280afam.png?w=789\" alt=\"\" class=\"wp-image-3092\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" data-id=\"3095\" src=\"https:\/\/techministry.blog\/wp-content\/uploads\/2024\/12\/screenshot-2024-12-06-at-7.18.48e280afam.png?w=806\" alt=\"\" class=\"wp-image-3095\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" data-id=\"3094\" src=\"https:\/\/techministry.blog\/wp-content\/uploads\/2024\/12\/screenshot-2024-12-06-at-7.19.30e280afam.png?w=731\" alt=\"\" class=\"wp-image-3094\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" data-id=\"3093\" src=\"https:\/\/techministry.blog\/wp-content\/uploads\/2024\/12\/screenshot-2024-12-06-at-7.19.50e280afam.png?w=793\" alt=\"\" class=\"wp-image-3093\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" data-id=\"3091\" src=\"https:\/\/techministry.blog\/wp-content\/uploads\/2024\/12\/screenshot-2024-12-06-at-7.20.19e280afam.png?w=790\" alt=\"\" class=\"wp-image-3091\" \/><\/figure>\n<\/figure>\n\n\n\n<p>Like many of my other projects, I&#8217;m releasing ScreenDeck open source with the hopes that it will help the community &#8211; especially churches.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\"><div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/techministry.blog\/wp-content\/uploads\/2024\/12\/screenshot-2024-12-06-at-7.34.21e280afam.png?w=167\" alt=\"\" class=\"wp-image-3097\" \/><figcaption class=\"wp-element-caption\">Here&#8217;s a simple 4 button, 1 per row, deck.<\/figcaption><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/techministry.blog\/wp-content\/uploads\/2024\/12\/screenshot-2024-12-06-at-7.34.40e280afam.png?w=400\" alt=\"\" class=\"wp-image-3098\" \/><figcaption class=\"wp-element-caption\">The settings allow you to configure how it looks, how many buttons, whether it&#8217;s always on top, etc. You can even change the bitmap size to create HUGE buttons!<\/figcaption><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/techministry.blog\/wp-content\/uploads\/2024\/12\/screenshot-2024-12-06-at-7.34.54e280afam.png?w=706\" alt=\"\" class=\"wp-image-3099\" \/><figcaption class=\"wp-element-caption\">Here&#8217;s a standard &#8220;Stream Deck XL&#8221; layout.<\/figcaption><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/techministry.blog\/wp-content\/uploads\/2024\/12\/screenshot-2024-12-06-at-7.35.13e280afam.png?w=335\" alt=\"\" class=\"wp-image-3101\" \/><figcaption class=\"wp-element-caption\">Some of the context menu options.<\/figcaption><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/techministry.blog\/wp-content\/uploads\/2024\/12\/screenshot-2024-12-06-at-7.35.47e280afam.png?w=1024\" alt=\"\" class=\"wp-image-3100\" \/><figcaption class=\"wp-element-caption\">Because it uses the Satellite API in Companion, it shows up as a physical surface in Companion!<\/figcaption><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/techministry.blog\/wp-content\/uploads\/2024\/12\/screenshot-2024-12-06-at-7.35.58e280afam.png?w=805\" alt=\"\" class=\"wp-image-3102\" \/><figcaption class=\"wp-element-caption\">Because Companion sees it as a surface, this means you can do anything with it that you&#8217;d do to any physical surface.<\/figcaption><\/figure>\n<\/div><\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<p>You can download it here: <a href=\"http:\/\/github.com\/josephdadams\/screendeck\">http:\/\/github.com\/josephdadams\/screendeck<\/a><\/p>\n\n\n\n<p>It&#8217;s available for MacOS, Windows, and Linux desktops!<\/p>\n\n\n\n<p>Here&#8217;s a video showing it in action!<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-rich is-provider-embed-handler wp-block-embed-embed-handler wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<div class=\"jetpack-video-wrapper\"><span class=\"embed-youtube\" style=\"text-align:center; display: block;\"><iframe loading=\"lazy\" class=\"youtube-player\" width=\"840\" height=\"473\" src=\"https:\/\/www.youtube.com\/embed\/ywezAgcdYLI?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en&#038;autohide=2&#038;wmode=transparent\" allowfullscreen=\"true\" style=\"border:0;\" sandbox=\"allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox\"><\/iframe><\/span><\/div>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>On the side from my full time job in ministry, I do coding-work-for-hire. It&#8217;s one of the ways I provide for my family. I&#8217;ve had opportunities to create custom dashboard panels, modules for Bitfocus companion, and lots of other bespoke solutions for whatever people need. (Hit me up if you ever need anything!) One of &hellip; <a href=\"https:\/\/techministry.blog\/?p=2797\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Streamlining Electron App Development with AI: Building a Virtual Stream Deck for Bitfocus Companion using the Satellite API&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[2,9,16,19,20,29,50,51,68],"class_list":["post-2797","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-ai","tag-artificial-intelligence","tag-chatgpt","tag-companion","tag-copilot","tag-javascript","tag-production","tag-programming","tag-technology"],"_links":{"self":[{"href":"https:\/\/techministry.blog\/index.php?rest_route=\/wp\/v2\/posts\/2797","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techministry.blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techministry.blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techministry.blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techministry.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2797"}],"version-history":[{"count":0,"href":"https:\/\/techministry.blog\/index.php?rest_route=\/wp\/v2\/posts\/2797\/revisions"}],"wp:attachment":[{"href":"https:\/\/techministry.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2797"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techministry.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2797"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techministry.blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2797"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}