• Aryan Noshirvani's avatar
    Replace stock Swagger UI with a custom API console · 4da132d2
    Aryan Noshirvani authored
    The generic Swagger UI has no concept of "upload audio, get audio back" -
    every response was just a raw JSON blob with a download_url string you'd
    have to copy elsewhere to actually listen to. Built a small self-contained
    console (single HTML file, dark/neon theme matching the Flutter app's
    AppTheme) instead:
    
    - AI Remix panel: drag-and-drop up to 5 files, a prompt box, a live
      per-stage progress bar (queued -> planning -> separating -> mixing ->
      mastering -> tagging -> done) that polls GET /remix/{job_id}, and an
      inline <audio> player for the result plus the AI's actual plan
      (target BPM, which stems came from which song).
    - Tag & Identify panel: same idea for the single-file /music/upload flow.
    - A generic endpoint explorer below both, built dynamically from the
      live /openapi.json (grouped by router tag, expandable "try it" forms
      for path/query params and JSON bodies) so every other route - auth,
      discovery, library, social - is still reachable without hand-writing
      bespoke UI for each.
    
    Same HTTP Basic auth gate as before (verify_docs_auth on the /docs
    route); the console's own fetch() calls ride on the browser's cached
    Basic Auth for the origin, no extra plumbing needed.
    Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01BCxXmJVvDFJVHTUi4QgNzi
    4da132d2
console.html 20.3 KB