Real-time Hacker News story stream built with Go, Server-Sent Events, and Tailwind CSS.
- 🔴 Live streaming of Hacker News stories via SSE
- 📂 Multiple categories: Top, New, Best, Ask HN, Show HN, Jobs
- 📊 Real-time stats: story count, total points, average score
- 🎨 Beautiful dark UI with HN orange accents
- ⚡ Lightweight single binary deployment
- 🔗 Direct links to articles and HN discussions
| Component | Technology |
|---|---|
| Backend | Go + Chi Router |
| Streaming | Server-Sent Events |
| Frontend | Tailwind CSS |
| API | Hacker News Firebase API |
Clone the repository:
git clone https://github.com/smart-developer1791/go-hn-live
cd go-hn-liveInitialize dependencies and run:
go mod tidy
go run .Open your browser:
http://localhost:8080
go-hn-live/
├── main.go # Application entry point
├── go.mod # Go module file
├── render.yaml # Render deployment config
├── .gitignore # Git ignore rules
└── README.md # Documentation
| Endpoint | Description |
|---|---|
GET / |
Main web interface |
GET /stream?category=top |
SSE story stream |
GET /health |
Health check endpoint |
top- Top stories (default)new- Newest storiesbest- Best storiesask- Ask HN postsshow- Show HN postsjob- Job postings
| Variable | Default | Description |
|---|---|---|
PORT |
8080 |
Server port |
{
"ID": 12345678,
"Title": "Show HN: My new project",
"URL": "https://example.com",
"Domain": "example.com",
"By": "username",
"Score": 142,
"Comments": 53,
"TimeAgo": "2 hours ago",
"HNLink": "https://news.ycombinator.com/item?id=12345678"
}github.com/go-chi/chi/v5 - Lightweight HTTP router