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!
- π΄ 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
Clone the repository:
git clone https://github.com/smart-developer1791/go-tvshow-stream
cd go-tvshow-streamInitialize dependencies and run:
go mod tidy
go run .Open http://localhost:8080 in your browser.
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
| Package | Purpose |
|---|---|
| chi | Lightweight HTTP router |
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)
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"
}| Variable | Default | Description |
|---|---|---|
PORT |
8080 |
Server port |
| Status | Color | Description |
|---|---|---|
| Running | π’ Green | Currently airing |
| Ended | π΄ Red | Series concluded |
| To Be Determined | π‘ Yellow | Awaiting renewal |
| In Development | π΅ Blue | Not yet aired |
- Backend: Go 1.23+
- Router: Chi v5
- Frontend: Tailwind CSS (CDN)
- Streaming: Server-Sent Events
- API: TV Maze (REST)
- Shows Discovered β Total unique shows streamed
- Average Rating β Mean rating of all shows
- Countries β Unique countries represented