Skip to content

Add support for third-party (Community) DNS App repositories#2063

Open
Hemsby wants to merge 9 commits into
TechnitiumSoftware:developfrom
Hemsby:feature/third-party-app-repositories
Open

Add support for third-party (Community) DNS App repositories#2063
Hemsby wants to merge 9 commits into
TechnitiumSoftware:developfrom
Hemsby:feature/third-party-app-repositories

Conversation

@Hemsby

@Hemsby Hemsby commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds support for community (third-party) DNS App repositories, so apps that the official DNS App Store can't accept get a distribution path of their own. See #2058, where a UniFi Insights Exporter submission was declined because it needs hardware the maintainer can't test against, with a note that proper multi-repository support is planned but not imminent.

  • New Community sub-tab under Apps: admins add any HTTPS URL serving a JSON manifest (same schema as the official store: array of {name, description, versions[]} entries, or a single bare object). Each repository is fetched and cached independently; one bad/unreachable repo doesn't affect the others.
  • New endpoints: apps/repositories/list, apps/repositories/add, apps/repositories/remove. Existing endpoints (apps/list, apps/install, apps/uninstall, apps/downloadAndInstall, apps/downloadAndUpdate) are untouched, community installs reuse them as-is.
  • Installed community apps get a "Community" badge in the shared Installed Apps list, computed client-side by cross-referencing apps/repositories/list's installed-state against apps/list. No backend changes needed for this.
  • New independent setting dnsAppsEnableAutomaticUpdateCommunity (default off) with its own daily timer, separate from the official store's dnsAppsEnableAutomaticUpdate. Toggling one has no effect on the other. Persisted in a new appRepositories.config file rather than the core dns.config.
  • Settings UI: the three related checkboxes (core server check-for-update, official app auto-update, community app auto-update) are now labeled explicitly (Core DNS Server / Official Apps / Community Apps) instead of the previous ambiguous shared wording.
  • New CommunityAppRepositories.md: documents the manifest schema, version-resolution rules, and trust model for both admins installing community apps and authors publishing them (nothing like this existed for the official store's schema either, so it's net-new documentation).
  • APIDOCS.md updated for all of the above.

Screenshots

Community tab, repository management and browsing:
Community tab

Community badge in the shared Installed Apps list:
Community badge

Settings, relabeled Software Update checkboxes:
Settings

Testing

Built and deployed to a private test server, exercised through the live API and web console rather than just compiling:

  • Added a real third-party repository (a published UniFi Insights Exporter app) and confirmed it appears in the Community tab with correct version/size/description.
  • Installed, updated, and uninstalled a community app through the UI end-to-end; confirmed config/APP-record/query-logger behavior matches official-store-installed apps (same install code path).
  • Confirmed the Community badge renders only on community-sourced rows in the Installed list, not on official-store or manually-sideloaded apps.
  • Confirmed dnsAppsEnableAutomaticUpdateCommunity is false by default, flips independently of dnsAppsEnableAutomaticUpdate, and persists correctly across a full service restart.
  • Confirmed the community automatic-update timer fires on its own schedule (separate log line) and correctly resolves the right version for the running server version.
  • Verified malformed/unreachable repository manifests are isolated (reported with an error, other repositories keep working) and don't crash the listing.

Notes for reviewer

  • No existing method in DnsApplicationManager.cs or WebServiceAppsApi.cs was modified. This is additive. The one exception is refreshApps()/getAppRowHtml() in apps.js, which needed a small, backward-compatible parameter addition to support the badge.
  • Rebased onto current develop (63ecf6f2) before opening this PR.

Hemsby added 8 commits July 22, 2026 11:40
Adds an opt-in "Third Party" sub-tab under Apps for browsing and
installing DNS apps from admin-added repository URLs, alongside the
existing official DNS App Store. A repository is a JSON manifest in
the same schema the official store already uses.

- DnsApplicationManager: persists repository URLs to a new
  appRepositories.config file, fetches/caches each repo independently
  with per-repo error isolation (one bad repo can't break the list)
- New endpoints: apps/repositories/list, apps/repositories/add,
  apps/repositories/remove
- Existing Apps tab, official store, and install/update/uninstall
  endpoints are unchanged
Matches Synology Package Center's pattern: a repository is now added
with a Name + URL pair (name optional, falls back to the URL) instead
of a bare URL, so the UI can show a friendly label. Bumped the repo
config file to format version 2, with a version-gated fallback to
read pre-existing v1 (URL-only) entries.

Renamed the "Third Party" tab/identifiers to "Community" throughout
the frontend to match the Synology terminology this feature is
modeled on.
A repository whose manifest is a single bare app object (as some
single-app repositories publish, e.g. the schema used in
TechnitiumSoftware#2058) previously crashed the entire
repositories/list call at EnumerateArray() on the object root, taking
down every other configured repository's listing along with it. The
per-repo try/catch around JsonDocument.Parse never caught this, since
Parse succeeds on a valid object and the failure happened later in a
separate, unguarded loop.

Now the root shape is checked right after parsing (array or object
both accepted; anything else is a per-repo error, same as invalid
JSON) and each individual app entry is processed in its own try/catch
so one malformed entry can't take down its siblings or the repo.
Confirmed with user: community/third-party repo apps deliberately do
not participate in the existing automatic update timer, which only
checks the official DNS App Store. Documented this as an intentional
scope decision rather than a silent gap.
Clicking the top-level Apps tab left whichever sub-tab (Installed or
Community) was last active, unlike other tabbed sections which reset
to their first pane. Now it always shows Installed apps first.
…repository manifests

Community-installed apps share the same Installed Apps table as official
store apps. Cross-references api/apps/repositories/list (already tracks
per-app installed state for the Community tab) against api/apps/list
purely client-side to flag matching rows, so official app rendering,
apps/list, and the install/update/uninstall endpoints are untouched.

Also adds CommunityAppRepositories.md documenting the manifest schema
for admins installing community apps and authors publishing them.
Community-installed apps previously required manual updates. Adds a
separate dnsAppsEnableAutomaticUpdateCommunity setting and daily
timer, independent of the official DNS App Store's
dnsAppsEnableAutomaticUpdate, so disabling one has no effect on the
other. Persisted in the existing appRepositories.config file (bumped
to v3) rather than the core dns.config.

Also relabels the three Software Update checkboxes in Settings to be
explicit about which update path each one controls (Core DNS Server,
Official Apps, Community Apps), and updates APIDOCS.md and
CommunityAppRepositories.md accordingly.
Community tab (repository management + browsing), the Community
badge in the shared Installed Apps list, and the relabeled Software
Update settings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant