{"id":2700,"date":"2026-06-15T23:29:07","date_gmt":"2026-06-15T23:29:07","guid":{"rendered":"https:\/\/localwp.com\/?p=2700&#038;post_type=help&#038;preview_id=2700"},"modified":"2026-06-15T23:29:09","modified_gmt":"2026-06-15T23:29:09","slug":"add-on-structure","status":"publish","type":"help","link":"https:\/\/localwp.com\/help-docs\/building-your-add-on\/add-on-structure\/","title":{"rendered":"Add-on structure"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Add-ons extend Local in one of two ways:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Events that are registered with the Local UI are added to the &#8220;Renderer&#8221; entry point.<\/li>\n\n\n\n<li>Events that don&#8217;t register with the Local UI are added to the &#8220;Main&#8221; entry point.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u200bRenderer entry point\u200b <a href=\"#renderer-process-entry-point\" id=\"renderer-process-entry-point\"><\/a><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The renderer process is what runs inside Local&#8217;s main window. This is where you&#8217;ll add buttons, forms, and any other user interface elements.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Most Add-ons will exclusively use the renderer process entry point for the sake of simplicity.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To use this entry point, ensure that a <code>renderer<\/code> property is defined within the <code>package.json<\/code> file, which points to the compiled Javascript file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Local passes a <a href=\"\/building\/context-api.md\"><code>context<\/code><\/a> object to the exported function, which allows you to leverage existing tools that are already shipped with Local.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1630\" height=\"796\" src=\"https:\/\/localwp.com\/wp-content\/uploads\/2026\/06\/render-entry-point.png\" alt=\"\" class=\"wp-image-2702\" srcset=\"https:\/\/localwp.com\/wp-content\/uploads\/2026\/06\/render-entry-point.png 1630w, https:\/\/localwp.com\/wp-content\/uploads\/2026\/06\/render-entry-point-300x147.png 300w, https:\/\/localwp.com\/wp-content\/uploads\/2026\/06\/render-entry-point-1024x500.png 1024w, https:\/\/localwp.com\/wp-content\/uploads\/2026\/06\/render-entry-point-768x375.png 768w, https:\/\/localwp.com\/wp-content\/uploads\/2026\/06\/render-entry-point-1536x750.png 1536w\" sizes=\"(max-width: 1630px) 100vw, 1630px\" \/><\/figure>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u200bMain entry point\u200b <a href=\"#main-process-entry-point\" id=\"main-process-entry-point\"><\/a><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The main process allows you to register and hook into Local functionality that doesn&#8217;t rely on the Local UI. By tapping into the main process, you can run processes even when the window is closed but Local is still running.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To use this entry point, ensure that a <code>main<\/code> property is defined within the <code>package.json<\/code> file, which points to the compiled Javascript file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Local passes a <a href=\"\/building\/context-api.md\"><code>context<\/code><\/a> object to the exported function, which allows you to leverage existing tools that are already shipped with Local.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1536\" height=\"750\" src=\"https:\/\/localwp.com\/wp-content\/uploads\/2026\/06\/main-entry-point.avif\" alt=\"\" class=\"wp-image-2703\" srcset=\"https:\/\/localwp.com\/wp-content\/uploads\/2026\/06\/main-entry-point.avif 1536w, https:\/\/localwp.com\/wp-content\/uploads\/2026\/06\/main-entry-point-300x146.avif 300w, https:\/\/localwp.com\/wp-content\/uploads\/2026\/06\/main-entry-point-1024x500.avif 1024w, https:\/\/localwp.com\/wp-content\/uploads\/2026\/06\/main-entry-point-768x375.avif 768w\" sizes=\"(max-width: 1536px) 100vw, 1536px\" \/><\/figure>\n\n\n\n<div style=\"height:89px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Add-ons extend Local in one of two ways: \u200bRenderer entry point\u200b The renderer process is what runs inside Local&#8217;s main window. This is where you&#8217;ll add buttons, forms, and any other user interface elements. Most Add-ons will exclusively use the renderer process entry point for the sake of simplicity. To use this entry point, ensure&#8230;<\/p>\n","protected":false},"author":78,"parent":2696,"menu_order":1,"template":"","tags":[],"helpcategories":[69],"class_list":["post-2700","help","type-help","status-publish","hentry","helpcategories-building-your-add-on"],"acf":{"help_keywords":""},"_links":{"self":[{"href":"https:\/\/localwp.com\/wp-json\/wp\/v2\/help-doc\/2700","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/localwp.com\/wp-json\/wp\/v2\/help-doc"}],"about":[{"href":"https:\/\/localwp.com\/wp-json\/wp\/v2\/types\/help"}],"author":[{"embeddable":true,"href":"https:\/\/localwp.com\/wp-json\/wp\/v2\/users\/78"}],"version-history":[{"count":0,"href":"https:\/\/localwp.com\/wp-json\/wp\/v2\/help-doc\/2700\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/localwp.com\/wp-json\/wp\/v2\/help-doc\/2696"}],"wp:attachment":[{"href":"https:\/\/localwp.com\/wp-json\/wp\/v2\/media?parent=2700"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/localwp.com\/wp-json\/wp\/v2\/tags?post=2700"},{"taxonomy":"helpcategories","embeddable":true,"href":"https:\/\/localwp.com\/wp-json\/wp\/v2\/helpcategories?post=2700"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}