project-nomad/admin/database/migrations
chriscrosstalk a7dbee55c4
feat(Content): custom ZIM library sources with pre-seeded mirrors (#593)
* feat(content): add custom ZIM library sources with pre-seeded mirrors

Users reported slow download speeds from the default Kiwix CDN. This adds
the ability to browse and download ZIM files from alternative Kiwix mirrors
or self-hosted repositories, all through the GUI.

- Add "Custom Libraries" button next to "Browse the Kiwix Library"
- Source dropdown to switch between Default (Kiwix) and custom libraries
- Browsable directory structure with breadcrumb navigation
- 5 pre-seeded official Kiwix mirrors (US, DE, DK, UK, Global CDN)
- Built-in mirrors protected from deletion
- Downloads use existing pipeline (progress, cancel, Kiwix restart)
- Source selection persists across page loads via localStorage
- Scrollable directory browser (600px max) with sticky header
- SSRF protection on all custom library URLs

Closes #576

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(content): recognize Wikipedia downloads from mirror sources

When Wikipedia is downloaded via a custom mirror instead of the default
Kiwix server, the completion callback now matches by filename instead
of exact URL. This ensures the Wikipedia selector correctly shows
"Installed" status and triggers old-version cleanup regardless of
which mirror was used.

Also handles the case where no Wikipedia selection exists yet (file
downloaded before visiting the selector), creating the record
automatically.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(ZIM): use cheerio for custom mirror directory parsing

* fix(ZIM): use URL constructor for more robust joining

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Jake Turner <jturner@cosmistack.com>
2026-05-04 11:30:59 -07:00
..
1751086751801_create_services_table.ts feat: openwebui+ollama and zim management 2025-07-09 09:08:21 -07:00
1763499145832_update_services_table.ts feat(Services): friendly names and descriptions 2025-11-18 14:02:22 -08:00
1764912210741_create_curated_collections_table.ts feat: curated zim collections 2025-12-05 15:47:22 -08:00
1764912270123_create_curated_collection_resources_table.ts feat: curated zim collections 2025-12-05 15:47:22 -08:00
1768170944482_update_services_add_installation_statuses_table.ts fix(admin): improve duplicate install request handling 2026-01-13 06:58:05 -08:00
1768453747522_update_services_add_icon.ts feat: improved app cards and custom icons 2026-01-15 15:54:59 -08:00
1769097600001_create_benchmark_results_table.ts feat: Add system benchmark feature with NOMAD Score 2026-01-22 21:48:12 -08:00
1769097600002_create_benchmark_settings_table.ts feat: Add system benchmark feature with NOMAD Score 2026-01-22 21:48:12 -08:00
1769300000001_add_powered_by_and_display_order_to_services.ts feat: Use friendly app names on Dashboard with open source attribution 2026-01-22 16:43:32 -08:00
1769300000002_update_services_friendly_names.ts fix: service name defs and ollama ui location 2026-02-01 05:46:23 +00:00
1769324448000_add_builder_tag_to_benchmark_results.ts fix(migrations): Fix timestamp ordering for builder_tag migration 2026-01-28 13:43:21 -08:00
1769400000001_create_installed_tiers_table.ts feat: Improve curated collections UX with persistent tier selection 2026-01-24 15:33:50 -08:00
1769400000002_create_kv_store_table.ts feat(RAG): [wip] RAG capabilities 2026-01-31 20:39:49 -08:00
1769500000001_create_wikipedia_selection_table.ts feat: Add dedicated Wikipedia Selector with smart package management 2026-01-31 21:00:51 -08:00
1769646771604_create_create_chat_sessions_table.ts feat: [wip] native AI chat interface 2026-01-31 20:39:49 -08:00
1769646798266_create_create_chat_messages_table.ts feat: [wip] native AI chat interface 2026-01-31 20:39:49 -08:00
1769700000001_create_zim_file_metadata_table.ts feat(ContentManager): Display friendly names instead of filenames 2026-02-03 23:14:28 -08:00
1770269324176_add_unique_constraint_to_curated_collection_resources_table.ts fix(Curated Collections): ensure resources are not duplicated on fetch-latest 2026-02-04 21:35:18 -08:00
1770273423670_drop_installed_tiers_table.ts fix: rework content tier system to dynamically determine install status 2026-02-04 22:58:21 -08:00
1770849108030_create_create_collection_manifests_table.ts feat: curated content system overhaul 2026-02-11 15:44:46 -08:00
1770849119787_create_create_installed_resources_table.ts feat: curated content system overhaul 2026-02-11 15:44:46 -08:00
1770850092871_create_drop_legacy_curated_tables_table.ts feat: curated content system overhaul 2026-02-11 15:44:46 -08:00
1771000000001_add_update_fields_to_services.ts feat: support for updating services 2026-03-11 14:08:09 -07:00
1771000000002_pin_latest_service_images.ts feat: support for updating services 2026-03-11 14:08:09 -07:00
1771100000001_migrate_kiwix_to_library_mode.ts feat(Kiwix): migrate to Kiwix library mode for improved stability (#622) 2026-04-03 14:26:50 -07:00
1771200000001_create_map_markers_table.ts feat(maps): add scale bar and location markers (#636) 2026-04-03 14:26:50 -07:00
1775100000001_create_custom_library_sources_table.ts feat(Content): custom ZIM library sources with pre-seeded mirrors (#593) 2026-05-04 11:30:59 -07:00