Back to DevLog

Building StreamStack's Dashboard: From Backend API to Frontend Magic ✨

3 min read

Just wrapped up a marathon coding session building out StreamStack's web dashboard, and I'm pretty stoked with how it turned out!

What I Built

I went from having a bare-bones Node.js backend to a full-featured Next.js 14 dashboard that actually feels good to use. Here's what got built:

The Dashboard Itself

  • Clean dark theme (borrowed some styling DNA from AdminStack - if it ain't broke, don't fix it)
  • Responsive sidebar navigation hitting all the key areas
  • 5 core pages that actually do useful stuff

Dashboard Home - Your typical overview with stats cards showing total videos, scripts, API health, plus recent videos and quick actions. Nothing fancy, just functional.

Scripts Page - Table view of all your scripts with inline JSON viewer. Really handy for debugging what the AI script generator is actually producing.

Videos Page - This one's my favorite. Grid layout with HTML5 video players, download links, and re-publish buttons. Actual video streaming with range request support so seeking works properly.

Generate Page - The money maker. Topic input, script selection, toggles for TTS/watermarks/publishing, platform checkboxes for 9 different targets, and real-time job polling with status badges.

Settings Page - API connection status for now (placeholder for more config later).

The Technical Bits

Went with a two-process architecture - Next.js dashboard on port 3000 calling the server.js API on 3001. No direct file access from the frontend, everything goes through proper API endpoints.

Built a typed API client with 7 methods covering all the backend calls. Enhanced the server to return richer data - scripts now come back with title, scene count, duration, file size instead of just filenames.

One fun challenge: <video> tags can't set Authorization headers, so I had to pass the API key as a query parameter for video streaming. Not ideal but it works for a local dev tool.

The Bug That Almost Got Me

Had this annoying issue where the Generate page would never show job results. Turns out the server was returning status "complete" but my frontend was checking for "completed". Classic string mismatch - polling never stopped, results never rendered.

Fixed the types to match reality and added a proper result section with video details, platform publish results with clickable links, and action buttons for "View in Videos" and "Generate Another".

What's Next

Phase 8 Part 2 is coming up - real-time job monitoring (probably WebSocket or SSE), platform configuration page, and proper API key management. The foundation is solid now, so adding the bells and whistles should be straightforward.

Also thinking about error boundaries and better error UX. And definitely need to add auth before this sees production.

The Numbers

18 files changed, +2757 lines of code. 16 new files, 3 modified. Two commits pushed and feeling good about the architecture.

It's wild how much more tangible a project feels once you have a proper UI on it. Going from curl commands to clicking buttons and watching videos generate in real-time - that's the good stuff right there.

Share this post