Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Ί TV Show Stream

Go SSE Tailwind TV Maze Render

Real-time TV show discovery stream using Go, Server-Sent Events (SSE), and TV Maze API. Explore 60,000+ TV shows from worldwide networks with live streaming updates!

✨ Features

  • πŸ”΄ Real-time Streaming β€” New TV shows every 4 seconds via SSE
  • πŸ“Š Live Statistics β€” Track shows discovered, average ratings, countries
  • 🎭 Rich Show Data β€” Genres, networks, ratings, runtime, and more
  • πŸ–ΌοΈ Visual Cards β€” Show posters with responsive design
  • 🌍 Worldwide Coverage β€” Shows from all networks and countries
  • πŸ“± Responsive UI β€” Beautiful Tailwind CSS interface

πŸš€ Quick Start

Clone the repository:

git clone https://github.com/smart-developer1791/go-tvshow-stream
cd go-tvshow-stream

Initialize dependencies and run:

go mod tidy
go run .

Open http://localhost:8080 in your browser.

πŸ—οΈ Project Structure

go-tvshow-stream/
β”œβ”€β”€ main.go          # Server, SSE handler, API integration
β”œβ”€β”€ go.mod           # Go module definition
β”œβ”€β”€ render.yaml      # Render deployment config
β”œβ”€β”€ .gitignore       # Git ignore rules
└── README.md        # Documentation

πŸ”§ Dependencies

Package Purpose
chi Lightweight HTTP router

πŸ“‘ API Reference

This project uses the TV Maze API:

  • Endpoint: https://api.tvmaze.com/shows/:id
  • Rate Limit: 20 calls per 10 seconds
  • Auth: None required (public API)

🎯 SSE Endpoint

GET /events
Content-Type: text/event-stream

Event Data:

{
  "id": 82,
  "name": "Game of Thrones",
  "language": "English",
  "genres": ["Drama", "Adventure", "Fantasy"],
  "status": "Ended",
  "runtime": 60,
  "premiered": "2011-04-17",
  "rating": 9.0,
  "network": "HBO",
  "country": "United States",
  "image": "https://static.tvmaze.com/uploads/images/...",
  "summary": "Based on the bestselling book series...",
  "url": "https://www.tvmaze.com/shows/82/game-of-thrones",
  "timestamp": "14:32:15"
}

🌐 Environment Variables

Variable Default Description
PORT 8080 Server port

πŸ“Š Show Status Types

Status Color Description
Running 🟒 Green Currently airing
Ended πŸ”΄ Red Series concluded
To Be Determined 🟑 Yellow Awaiting renewal
In Development πŸ”΅ Blue Not yet aired

🎨 Tech Stack

  • Backend: Go 1.23+
  • Router: Chi v5
  • Frontend: Tailwind CSS (CDN)
  • Streaming: Server-Sent Events
  • API: TV Maze (REST)

πŸ“ˆ Live Stats Tracked

  • Shows Discovered β€” Total unique shows streamed
  • Average Rating β€” Mean rating of all shows
  • Countries β€” Unique countries represented

Deploy in 10 seconds

Deploy to Render

About

πŸ“Ί Real-time TV show discovery stream using Go, Server-Sent Events (SSE), and TV Maze API. Explore 60,000+ TV shows from worldwide networks! Live streaming with Tailwind CSS UI.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages