Files
twitchChatOverlayServer/DOCUMENTATION.md

2.3 KiB

OpenChat Overlay Documentation

Overview

OpenChat Overlay is a lightweight, open-source Twitch chat overlay solution designed to be hosted on minimal hardware (like a Proxmox LXC container). It provides a user-friendly dashboard for customization and a highly optimized, client-side rendered overlay URL.

Getting Started

Prerequisites

  • Node.js (v18+)
  • Supabase Account
  • Twitch Developer Application (Client ID & Secret)

Installation

  1. Clone the repository.

  2. Install dependencies:

    npm install
    
  3. Configure environment variables in .env.local:

    NEXT_PUBLIC_SUPABASE_URL=...
    NEXT_PUBLIC_SUPABASE_ANON_KEY=...
    NEXTAUTH_SECRET=...
    TWITCH_CLIENT_ID=...
    TWITCH_CLIENT_SECRET=...
    

    Note: TWITCH_CLIENT_ID and TWITCH_CLIENT_SECRET are required for both User Authentication (NextAuth) and the Support Module (Stream Status).

  4. Run the development server:

    npm run dev
    

Architecture Notes

  • The application uses Next.js App Router.
  • Dashboard: Located in src/app/(dashboard). Protected by authentication.
  • Overlay: Located in src/app/overlay/[token]. Publicly accessible but requires a valid token. Renders with a transparent background.
  • API:
    • /api/auth/*: Handles user login via Twitch.
    • /api/twitch/status: Public endpoint to check if the developer (ramforth) is live, used by the dashboard support module.

Features

  • Style Creator: Customise font, size, colors, opacity, and toggle badges/emotes.
  • Resolution Support: Toggle between 720p and 1080p base resolutions.
  • Live Preview: Real-time visual feedback of chat settings.
  • Support Module: Sidebar widget showing developer status and social links.

Deployment

Infrastructure Overview

  • Development: Conducted on local desktop (CachyOS).
  • Version Control: Synced to gitea.ramforth.net under the RamTech organization.
  • Production Host: Standalone Proxmox LXC container or VM.
  • Service URL: Production will NOT be hosted on localhost. All external callbacks (Twitch Auth) must point to the production domain/IP.

Deployment Workflow

  1. Push changes from local development machine to Gitea.
  2. Pull changes on the production LXC/VM.
  3. Build and run using Docker or as a systemd service.