Commit Graph

17 Commits

Author SHA1 Message Date
1ed5012a95 fix: key melody binary storage on pid instead of uid, add migration script
melody.uid is never actually populated anywhere in MelodyForm.jsx, so keying
local .bsm storage on it (as the previous commit did) would silently break
for every existing melody. pid is the correct key anyway: it identifies the
underlying archetype binary, and multiple melodies legitimately share one
pid (each remaps the same note sequence to different bells/speed/duration
via its own settings). Deletion is now share-aware — a melody's binary is
only removed from disk once no other melody still references its pid.

Also adds backend/scripts/migrate_melody_binaries_to_local.py to backfill
existing melodies from their old Firebase URLs to local storage, with
--dry-run support and a warning list for pids whose melodies point at
different source files (a pre-existing data issue, flagged for manual
review via each melody's playback button rather than silently resolved).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-06 10:53:25 +03:00
72f7e00990 feat: serve melody .bsm binaries over plain HTTP instead of Firebase Storage
ESP32 devices can't spare the 40KB+ RAM a TLS client needs, so Firebase
Storage's HTTPS-only download URLs were blocking melody downloads. Binaries
are now written to local disk (./data/melody_binaries) and served through a
new unauthenticated /api/melodies/download/{pid} route, exposed publicly on
a separate melodies.bellsystems.net vhost (plain HTTP, no TLS) so the main
console domain can stay HTTPS-only with no exceptions. Preview audio still
uses Firebase Storage since it's only ever fetched by the HTTPS admin UI.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-06 09:41:24 +03:00
6a958a8d7d update: Add Global Search on Header, Add Global Audit log for all actions. 2026-04-19 15:41:29 +03:00
0a8a42d69b Initial Switch to V2. Completely Overhauled Backend, Frontend and General Structure. 2026-04-17 14:45:30 +03:00
d0ac4f1d91 update: overhauled firmware ui. Added public flash page. 2026-03-18 17:49:40 +02:00
6f9fd5cba3 fix: Bugs created after the overhaul, performance and layout fixes 2026-03-08 22:30:56 +02:00
04b2a0bcb8 CODEX - More changes to the binary files, listing and storing 2026-02-23 13:58:40 +02:00
d390bdac0d CODEX - Added Warning sign if Archetype is missing 2026-02-23 13:21:42 +02:00
ae4b31328f Fixes and Changes again 2026-02-22 17:28:27 +02:00
c5ef4406f6 improvemtns again, to the archetype builder, and playback 2026-02-22 15:03:23 +02:00
aad8942d65 Added Draft Melodies. Further improvements to the UI 2026-02-18 19:33:59 +02:00
dbd15c00f8 Added Roles and Permissions. Some minor UI fixes 2026-02-18 13:12:55 +02:00
bec0e606e6 Fixes to Add Melody Page, minor UI Tweaks 2026-02-17 18:11:04 +02:00
cb2c5c6aba Changed Localization to JSON String 2026-02-17 10:37:18 +02:00
59c5049305 Phase 2 UI Adjustments/Edits by bonamin 2026-02-17 09:56:07 +02:00
2b48426fe5 Phase 2 Complete by Claude Code 2026-02-17 00:10:37 +02:00
19c069949d Phase 0 Complete by ClaudeCode 2026-02-16 20:21:20 +02:00