streamthing is a self-hosted streaming overlay and management platform that brings real-time Spotify integration, request moderation, dynamic themes, and secure user roles into a single dashboard. Each deployment is designed for a single creator so you can stay in control of your data and branding.
Deploy the full stack for free on Vercel (hosting and serverless functions) with Neon providing the managed PostgreSQL database.
- Real-time “now playing” overlays designed for OBS and browser sources
- Dynamic theme system powered by database-stored CSS
- Track history logging with a public API
- Viewer song requests with moderator approval flow
- Discord OAuth login with JWT-backed sessions
- Role-based control for streamers, moderators, and viewers
- Self-service logout and access revocation endpoints
- Tamper-resistant cookies and expiry handling
- Responsive dark UI built with Next.js App Router and Tailwind CSS
- Focused landing experience for new viewers
- Unified look and feel across dashboard, admin, and public pages
- Built-in overlay preview and theme editing workflow
- Drizzle ORM for type-safe queries and migrations
- PostgreSQL schema tuned for low-latency lookups
- HttpOnly cookie enforcement and rate-limited API routes
- Ready for single-tenant, self-hosted deployments
| Route | Audience | Purpose |
|---|---|---|
/ |
Authenticated users | Dashboard entry point with quick links, role badges, and version info |
/spotify |
OBS/browser source | Minimal "now playing" overlay with automatic marquee text |
/request-song |
Authenticated viewers | Submit Spotify links that feed the moderation queue |
/requests |
Moderators | Review, approve, and reject viewer song requests |
/admin/users |
Streamer or moderators | Promote, demote, and ban users with audit-friendly controls |
/admin/themes |
Streamer | Edit CSS themes and activate the overlay design you want |
Back-end routes under /api expose the same functionality for custom integrations.
The default landing page (app/components/LandingPage.tsx) is a simple temporary placeholder that shows a warning banner and two action buttons (Login with Discord, Request a Song).
Option 1: Replace with your own design
- Open
app/components/LandingPage.tsx - Replace the entire component with your custom landing page
- Keep the same component name and export:
export default function LandingPage()
Option 2: Remove it entirely and redirect
- Open
app/page.tsx - Remove the
<LandingPage />component - Add a redirect or alternative content for non-authenticated users
The landing page only appears when users are not logged in. Authenticated users see the dashboard automatically.
All route handlers are implemented with the Next.js App Router using TypeScript.
Spotify
GET /api/spotify/trackreturns the active trackGET /api/spotify/track-logssupports pagination and 7-day range filtersPOST /api/spotify/submit-linksubmits a new request (auth required)PATCH /api/spotify/requestsprocesses queue actions (moderators)GET /api/spotify/themesfetches themes;POST/PUTmanage them
Authentication and Users
GET /api/userreturns session detailsGET /api/discord/login|callback|logouthandle OAuth lifecycleGET /api/usersand nested routes manage roles and bans
Utility
GET /api/versionsurfaces the deployed git commit- Twitch placeholders are stubbed at
/api/twitch/*for upcoming work
Drizzle ORM models the core tables:
track_logscaptures historical playback detailssong_requestsstores incoming viewer submissionsspotify_themeshouses overlay CSS and activation stateuserRolesmaps Discord identities to permissions
Run migrations and schema updates with pnpm run db:push or pnpm migrate.
- Next.js 15 with the App Router and React Server Components
- React 19 with TypeScript strict mode
- Tailwind CSS 4 and PostCSS for styling
- Drizzle ORM on top of PostgreSQL (Neon or self-hosted)
- JWT for session integrity and Discord OAuth for identity
- pnpm for fast, deterministic installs
- Fork the repository.
- Import the repo into Vercel and deploy with the default Next.js settings.
- Provision a Neon PostgreSQL project and copy the connection string.
- Populate environment variables in the Vercel dashboard (see below).
- Create Discord and Spotify applications and configure redirect URIs.
git clone https://github.com/oyuh/streamthing.git
cd streamthing
pnpm install
cp .env.local.example .env.local
# fill in environment variables
pnpm run db:push
pnpm devCreate a production build with pnpm build and run it locally using pnpm start.
Copy .env.local.example to .env.local and provide the following values:
JWT_SECRET=long_random_string
NEXT_PUBLIC_SITE_URL=https://yourdomain.com
# Discord OAuth
DISCORD_CLIENT_ID=...
DISCORD_CLIENT_SECRET=...
DISCORD_REDIRECT_URI=https://yourdomain.com/api/discord/callback
# Spotify OAuth
SPOTIFY_CLIENT_ID=...
SPOTIFY_CLIENT_SECRET=...
SPOTIFY_REDIRECT_URI=https://yourdomain.com/api/spotify/auth/callback
# Database (Neon, Vercel Postgres, or self-hosted)
DATABASE_URL=postgres://user:pass@host:port/db?sslmode=require
# Optional Twitch placeholders
TWITCH_CLIENT_ID=...
TWITCH_CLIENT_SECRET=...
TWITCH_REDIRECT_URI=https://yourdomain.com/api/twitch/callback
TWITCH_SECRET=...
pnpm devlaunches the Next.js development server.pnpm lintandpnpm lint:fixrun ESLint.pnpm type-checkverifies the TypeScript project.pnpm run db:pushsynchronizes the Drizzle schema.
Current capabilities include live Spotify overlays, viewer song submissions, role-aware dashboards, and theme editing. Upcoming work focuses on Twitch event ingestion, richer analytics, and customizable widgets.
- Fork the repository.
- Create a feature branch:
git checkout -b feature/your-feature. - Commit with a concise message.
- Push and open a pull request.
Bug reports and feature ideas are welcome via GitHub issues.
Released under the MIT License. See LICENSE for the full text.
If streamthing improves your stream, consider starring the repo, filing issues, or sharing it with other creators.