surf-hub/README.md
georgew 035cbf3561
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Update README.md
2026-01-27 18:24:30 +00:00

2.5 KiB

🌊 Surf-Hub

A self-hosted observability stack built to monitor and visualize real-time surf conditions.

Surf-Hub demonstrates a "DevOps approach" to a personal hobby. Instead of checking manual forecasts, this project automates data collection and visualization using industry-standard tools like Grafana, InfluxDB, and Node.js.


🚀 Overview

The goal of this project is to create a persistent, historical record of local surf conditions (swell height, period, and wind) and display them in a high-visibility dashboard.

🛠️ The Tech Stack

  • Backend: Node.js (Service-oriented architecture)
  • Database: InfluxDB 2.x (Time-series data storage)
  • Visualization: Grafana
  • Deployment: Docker / Docker Compose
  • Architecture: Multi-platform builds via docker buildx for linux/amd64 compatibility.

📊 Dashboard Preview

(Tip: Replace this with a screenshot of your Grafana dashboard once it's live!)

Dashboard Screenshot


⚙️ How It Works

  1. Data Ingestion: A Node.js service polls a weather/surf API (e.g., Open-Meteo) every hour.
  2. Time-Series Storage: The data is normalized and pushed to InfluxDB, allowing for historical trend analysis.
  3. Visualization: Grafana queries InfluxDB to render "Live Condition" tiles and time-series graphs.
  4. Containerization: The entire stack is orchestrated via Docker Compose for easy deployment to any server.

🛠️ Setup & Installation

Prerequisites

  • Docker & Docker Compose
  • An API key from your chosen surf/weather data provider

Quick Start

  1. Clone the repo:
    git clone https://git.georgew.dev/<YOUR_USERNAME>/surf-hub.git
    cd surf-hub
    
  2. Configure environment: Create a .env file with your API credentials and InfluxDB tokens.
  3. Deploy the stack: Create a .env file with your API credentials and InfluxDB tokens.
    docker compose up -d
    
  4. Build the Fetcher (Cross-Platform): Create a .env file with your API credentials and InfluxDB tokens.
    docker buildx build --platform linux/amd64 -t surf-fetcher:latest ./fetcher --load
    

🚀 Lessons Learned

  • Implementing time-series data structures for fluctuating environmental data.
  • Managing containerized environments and cross-architecture builds using buildx.
  • Designing intuitive dashboards that provide "glanceable" information.