Skip to content

Real-time craft brewery discovery stream using Go, Server-Sent Events (SSE), and OpenBreweryDB API. Explore 8,000+ breweries worldwide! 🍺 Live streaming with Tailwind CSS UI.

Notifications You must be signed in to change notification settings

smart-developer1791/go-brewery-stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

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

Repository files navigation

🍺 Brewery Stream

Go Version SSE Tailwind CSS API Render

Real-time craft brewery discovery stream using Go, Server-Sent Events (SSE), and OpenBreweryDB API. Explore 8,000+ breweries worldwide with live streaming and beautiful Tailwind CSS UI!

✨ Features

  • 🌊 Real-time SSE streaming - Continuous brewery discovery
  • 🍻 8,000+ breweries - From micro to large, worldwide coverage
  • πŸ—ΊοΈ Google Maps integration - View brewery locations
  • πŸ“Š Live statistics - Track discoveries, countries, types
  • πŸ“œ Discovery history - Recent breweries at a glance
  • 🎨 Beautiful UI - Glass morphism with Tailwind CSS
  • πŸ“± Fully responsive - Works on all devices
  • ⚑ Chi router - Fast and lightweight

πŸš€ Quick Start

Clone the repository:

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

Initialize dependencies and run:

go mod tidy
go run .

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

πŸ—οΈ Tech Stack

Technology Purpose
Go 1.21+ Backend server
Chi Router HTTP routing & middleware
SSE Real-time streaming
OpenBreweryDB Brewery data API
Tailwind CSS Styling

πŸ“‘ API Endpoints

Endpoint Description
GET / Main UI page
GET /stream SSE brewery stream
GET /health Health check

🍺 Brewery Types

Type Description
🏭 Micro < 15,000 barrels/year
πŸ§ͺ Nano < 200 barrels/year
🏒 Regional 15,000-6M barrels/year
🍽️ Brewpub Restaurant-brewery
πŸ—οΈ Large > 6M barrels/year
πŸ“‹ Contract Contract brewing

πŸ“ Project Structure

go-brewery-stream/
β”œβ”€β”€ main.go          # Application entry point
β”œβ”€β”€ go.mod           # Go module file
β”œβ”€β”€ render.yaml      # Render deployment config
β”œβ”€β”€ .gitignore       # Git ignore rules
└── README.md        # Documentation

πŸ”§ Environment Variables

Variable Default Description
PORT 8080 Server port

🌐 How SSE Works

Client                    Server
  |                          |
  |------- GET /stream ----->|
  |                          |
  |<---- data: {...} --------|  (brewery 1)
  |<---- data: {...} --------|  (brewery 2)
  |<---- data: {...} --------|  (brewery 3)
  |         ...              |

πŸ“Š Data Source

This project uses the free OpenBreweryDB API:

  • 🌍 8,000+ breweries worldwide
  • πŸ†“ Free and open source
  • πŸ”„ Regularly updated
  • πŸ“ Location coordinates included

Deploy in 10 seconds

Deploy to Render

About

Real-time craft brewery discovery stream using Go, Server-Sent Events (SSE), and OpenBreweryDB API. Explore 8,000+ breweries worldwide! 🍺 Live streaming with Tailwind CSS UI.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages