Skip to content

feat: add custom apps - #122

Open
Joly0 wants to merge 1 commit into
Notifiarr:developfrom
Joly0:feat/custom-apps
Open

Joly0 wants to merge 1 commit into
Notifiarr:developfrom
Joly0:feat/custom-apps

Conversation

@Joly0

@Joly0 Joly0 commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

I have been running this feature on my own instance since March and only now got around to filing it upstream. For this PR it was rebased onto current develop and partly reworked; the reworked version is what is tested below.

Problem

Only the six built-in starr apps can be proxied. Forks and newer *arr-style apps (Chaptarr and similar) speak the same API but cannot be added.

Change

  • Custom apps have a name, label, API version, OpenAPI URL (for endpoint discovery in the access dialog) and optional icon. They then work like a built-in app: instances, 3rd party apps, templates folder, nav entry.
  • Custom app IDs are the row id + 100 (StarrApps::CUSTOM_ID_OFFSET) so they never collide with built-in IDs; getAllAppsList(), getStarrInterfaceIdFromName() and friends include them.
  • Connection test for custom apps uses /api/{version}/system/status, since config/host is not guaranteed outside the core apps.
  • Migration 009_custom_apps adds the custom_apps table.
  • The access form shows an error toast when it fails to load.

Hardening in this feature:

  • All custom app queries use SQLite3 bound parameters.
  • Icons: PNG, JPEG or WebP only, detected from the image content (not the filename), max 256 KB, stored in the database as a data URI. No SVG.
  • Name: ^[a-z][a-z0-9]{1,31}$, cannot be a built-in app or a page name (?app= is routed before ?page=).
  • OpenAPI URL must be http(s); checked on save and again before it is fetched.
  • Names, labels and the endpoint names from OpenAPI files are escaped in the nav, settings, starr page and access dialog.

Testing

Built from this branch with an existing database (migration 007 to 009 ran).

Check Result
Name Bad Name / settings / radarr rejected with a message
API version 3, OpenAPI URL file:///etc/passwd rejected
Label Te'st"); DROP TABLE settings;-- stored literally, settings intact
SVG renamed to .png, PHP renamed to .png rejected
Real PNG stored, served as image/png
Delete app removed; refused while instances exist
Custom app page, settings list, nav render, no PHP errors

Add app workflow

Reworked after the maintainer feedback on Discord:

  • The header shows an app only when it has at least one instance. The per-app show/hide toggles in Settings are gone (Notifications and Help stay). An app that has instances but was hidden before is now shown again.
  • + Add app in the header opens a dialog. Pick a built-in app, an existing custom app, or + New custom app... to define one in the same step, then enter the URL and API key.
  • Add only saves when the connection test passes (requireTest on saveStarr; the existing callers are unchanged). If a new definition is saved but the instance test fails, the definition is kept and preselected for the retry.
  • New custom apps are created through this dialog; Settings > Custom Apps is for editing and deleting them.
  • The OpenAPI URL is now required, and icons are stored in the database as a data URI, so they survive image updates.

Current limitation: if a custom app's name later becomes a built-in app, the built-in one wins in the lookups and the custom app loses its nav entry and page. A follow-up PR will let users submit custom app definitions to starrproxy so they ship as built-in apps, and will handle these name clashes and the move from a user's own definition to the shipped one.

Check Result
Fresh install header shows only + Add app
Upgrade from migration 008 apps with instances shown, the others hidden
Add with an unreachable URL rejected, nothing saved
Add a real Lidarr saved, appears in the header
New custom app, failed test, close and reopen definition kept and listed, no duplicate on retry
Custom app pointed at Prowlarr test passes, instance saved
Delete the last instance app disappears from the header

@austinwbest

austinwbest commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Thanks for taking the time to build it out. The current workflow:

You can already have local templates and assign those and build those out. The idea is when adding a new app that would be used and once the endpoints are sorted out for required permissions, PR the template and then anyone can use it as it would be part of the app.

Edit: Feel free to join the discord server, there is a #starrproxy channel there and we can discuss things a little faster as well. Just ping me if you do.

@austinwbest

Copy link
Copy Markdown
Member

Sorry, i responded to this before looking further into what you where doing. My brain registered as something other than adding more top level app support.

Let me think on this as ideally it would be better to do this in a way that benefits everyone and every user doesnt have to create custom app support.

Might require a little UI changing but possibly a group of the "parent" starr apps (current ones) and then a group of "children" apps. they would be added internally like the parent apps with their own ids and what not and can start at 100 like you did. to avoid cluttering the header we would need to think on a UI change to handle it. maybe a different flow for adding external apps that has a different screen where you pick the starr (parent or child) and link it up that way. then the header just shows what you have proxied..

@Joly0

Joly0 commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator Author

Sorry, i responded to this before looking further into what you where doing. My brain registered as something other than adding more top level app support.

Let me think on this as ideally it would be better to do this in a way that benefits everyone and every user doesnt have to create custom app support.

Might require a little UI changing but possibly a group of the "parent" starr apps (current ones) and then a group of "children" apps. they would be added internally like the parent apps with their own ids and what not and can start at 100 like you did. to avoid cluttering the header we would need to think on a UI change to handle it. maybe a different flow for adding external apps that has a different screen where you pick the starr (parent or child) and link it up that way. then the header just shows what you have proxied..

No worries, and thanks for taking a closer look. That approach sounds better to me too: built-in child apps mean everyone gets support without setting anything up, and showing only proxied apps in the header solves the clutter problem.

Much of this PR could carry over: the ID offset at 100, fetching and caching the OpenAPI spec, the icon handling, and the per-app nav setting. Though i think an approach that everyone can benefit from would need a central storage for people to contribute more easily, and not through manual github PRs, or what did you have in mind here? Once you've decided how you want the UI and the add flow to look, let me know and I'll try to rework it in that direction.

@austinwbest

Copy link
Copy Markdown
Member

My initial thought is a blank header with an [+ Add app] button kind of thing, that opens a simple dialig with the starr information (the fields in the table basically) and then it becomes a header icon for that app. from there the current process kids in with the tabs and adding 3rd party apps.

For sure a lot of the logic you already had carries over so that will save some time

I'll think on a better way to get user edits from the app to github vs manually creating PRs.. maybe a way to pipe it through the notifiarr API which allows the bot to then automatically create GH stuff (this can come later)

@nzxl101 nzxl101 added the enhancement New feature or request label Nov 5, 2026
Lets users add *arr-like apps that are not built in (for example Chaptarr) with their own API version, OpenAPI URL and icon, and proxy them like the built-in starr apps. All apps are added through a new Add app dialog that requires a passing connection test, and the header shows an app only when it has an instance, replacing the per-app nav toggles. Queries use bound parameters, icons are checked by image content (PNG, JPEG, WebP) and stored in the database, URLs must be http(s) and app names cannot shadow built-in apps or pages.
@Joly0

Joly0 commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator Author

Pushed the rework we discussed on Discord:

  • All apps, built-in and custom, are added through a new + Add app button in the header; the hardcoded per-app nav toggles are gone.
  • The header tabs are based on the instances you added: an app shows once it has an instance.
  • Add requires a passing connection test.
  • No separate hide option, and no automatic link between a custom app and a later shipped one. Submitting custom app definitions so they ship with starrproxy will come in a follow-up PR.
  • The OpenAPI URL is now required.

Details are in the new "Add app workflow" section of the description.

@austinwbest

Copy link
Copy Markdown
Member

Pushed the rework we discussed on Discord:

  • All apps, built-in and custom, are added through a new + Add app button in the header; the hardcoded per-app nav toggles are gone.
  • The header tabs are based on the instances you added: an app shows once it has an instance.
  • Add requires a passing connection test.
  • No separate hide option, and no automatic link between a custom app and a later shipped one. Submitting custom app definitions so they ship with starrproxy will come in a follow-up PR.
  • The OpenAPI URL is now required.

Details are in the new "Add app workflow" section of the description.

Want to create a custom-apps branch and push it on develop? I'll take a look when you're ready

@Joly0

Joly0 commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator Author

Pushed the rework we discussed on Discord:

  • All apps, built-in and custom, are added through a new + Add app button in the header; the hardcoded per-app nav toggles are gone.
  • The header tabs are based on the instances you added: an app shows once it has an instance.
  • Add requires a passing connection test.
  • No separate hide option, and no automatic link between a custom app and a later shipped one. Submitting custom app definitions so they ship with starrproxy will come in a follow-up PR.
  • The OpenAPI URL is now required.

Details are in the new "Add app workflow" section of the description.

Want to create a custom-apps branch and push it on develop? I'll take a look when you're ready

Done, custom-apps is on the repo, based on develop with the commit from this PR on top. From my side this is ready for now. The rest which we discussed on discord and here probably comes later (mainly the contributing part for users to contribute new apps)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants