The Zero-Click Content Pipeline for Twitch Streamers.
Prism is a hybrid application designed to completely automate the clip-to-Shorts pipeline. It removes the friction of video editing by combining a secure cloud dashboard with a lightweight, local desktop application that handles hardware-intensive AI tasks without lagging the user's stream.
🔗 Live Site: https://prism.thomaspercival.dev
🔗 Desktop Worker Repo: https://github.com/tpercival01/Prism-Desktop
Prism operates on a "Middle Ground" SaaS architecture. It is split into two distinct parts:
-
The Web Hub (This Repository): A Next.js application hosted on the edge. This serves as the public marketing site and the secure user dashboard. Streamers authenticate here via Twitch, manage their settings, and receive a secure, unique App Key.
-
The Desktop Worker (Python/.exe): A compiled local application that the streamer downloads. It runs quietly in the system tray, listens for audio triggers ("clip that") or Twitch chat spikes, and hooks into local OBS Websockets to extract gameplay footage. It uses the user's local GPU to run AI models (faster-whisper) and FFmpeg to auto-crop and caption the video.
-
Frictionless Authentication: Users log in exclusively via Twitch OAuth. No passwords required.
-
Automated Key Generation: Upon first login, the database automatically assigns a unique, secure App Key to the streamer.
-
REST API Validation: Exposes a secure /api/desktop/verify endpoint for the local Python worker to validate the user's identity and fetch their clipping preferences before executing scripts.
-
Dark Mode UI: A clean, professional interface built with Tailwind CSS, designed to match the native OBS / Twitch aesthetic.
-
Framework: Next.js (App Router)
-
Styling: Tailwind CSS + Lucide Icons
-
Authentication: NextAuth (Auth.js) with Twitch Provider
-
Database: Neon (Serverless Postgres)
-
ORM: Drizzle ORM
-
Clone the repository.
-
Install dependencies:
npm install
-
Set up your .env.local file:
TWITCH_CLIENT_ID=your_twitch_client_id TWITCH_CLIENT_SECRET=your_twitch_client_secret NEXTAUTH_URL=http://localhost:3000 NEXTAUTH_SECRET=your_random_secret_string DATABASE_URL=your_neon_postgres_connection_string
-
Push the database schema to Neon:
npx drizzle-kit push
-
Run the development server:
npm run dev
-
Streamer authenticates via Twitch on the Next.js web app.
-
Drizzle creates a user row in Neon Postgres and generates an ac_live_... App Key.
-
Streamer copies the key from the web dashboard and pastes it into the Prism Desktop App.
-
The Desktop App sends a POST request to /api/desktop/verify on the Next.js site to ensure the key is valid and the user is authorized.
-
Once verified, the Desktop App begins silently monitoring OBS and the local microphone.