feat: config portability with generic entity resolver framework

Full configuration export/import system for Homarr with excellent DX:
- Export/import boards, apps, integrations (with re-encrypted secrets),
  users (with bcrypt hashes), groups (with permissions and memberships),
  search engines, and server settings
- Homepage services.yaml import with widget-type mapping
- Generic resolveEntities() utility eliminates per-entity boilerplate
- Declarative entity-fields.ts: adding a new user preference requires
  only one line change (no export/import/schema edits needed)
- User schema uses .catchall(z.unknown()) for forward-compatible prefs
- groupByKey() utility replaces manual Map-building
- CONFIG_ENTITY_KEYS as single source of truth for entity metadata
- Reuse existing entities (apps by name+icon+href, integrations by
  kind+name+url, users by email, groups by name, boards by name)
- Skip duplicates with warnings rather than failing
- Onboarding flow skips user creation step when config includes users
- Reuse existing admin group during onboarding after config import
This commit is contained in:
Thomas Camlong committed 2026-06-06 16:22:59 +02:00
1 parent 1f7b7f0516
commit f6a598b774
48 files changed
+1869 -1435

No files matched your search

+11 -1
View File
@@ -19,7 +19,8 @@
"description": "Upload a Homarr full configuration export (.json) to restore boards, apps, integrations, and settings"
},
"configImport": {
"action": "Confirm import and continue"
"action": "Confirm import and continue",
"selectFile": "Select configuration file"
},
"dropzone": {
"title": "Drag the zip file here or click to browse",
@@ -3832,6 +3833,7 @@
"layouts": "{count} layouts",
"searchEngines": "{count} search engines",
"groups": "{count} groups",
"users": "{count} users",
"serverSettings": "{count} server settings"
},
"preview": {
@@ -3845,6 +3847,7 @@
"importWillUpdate": "Will update",
"reuseApps": "{count} apps",
"reuseIntegrations": "{count} integrations",
"reuseUsers": "{count} users",
"skipBoards": "{count} boards",
"skipGroups": "{count} groups",
"skipSearchEngines": "{count} search engines",
@@ -3886,6 +3889,13 @@
"title": "Import failed",
"message": "Failed to import configuration"
}
},
"result": {
"boardsImported": "{count} boards imported",
"appsCreated": "{count} apps created",
"integrationsCreated": "{count} integrations created",
"groupsCreated": "{count} groups created",
"usersCreated": "{count} users created"
}
},
"importHomepage": {