Skip to content

Micah-Shallom/LogStreamHive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LogStreamHive

Screenshot from 2025-10-11 21-04-16 Screenshot from 2025-10-11 21-05-04

Features

  • 🚀 Real-time log streaming and visualization
  • 🔍 Advanced log filtering and search capabilities
  • 📊 Interactive dashboard with metrics
  • 🔐 Configurable logging levels and formats
  • 🐳 Docker-ready deployment
  • ⚡ Built with Next.js and Go for high performance

Architecture

The application is composed of a Go backend and a Next.js frontend. The backend consists of two services:

  • log-generator: A service that generates logs at a configurable rate and format.
  • log-collector: A service that collects logs from the log-generator and exposes them to the frontend.
  • centrifugo: A real-time messaging server that streams logs to the frontend.

The frontend is a Next.js application that provides a web interface for viewing and filtering logs.

Quick Start

Prerequisites

  • Node.js 18+
  • Go 1.21+
  • Docker (optional)

Running Locally

  1. Start the logger service:

    cd src/services/generator
    go run main.go
  2. Start the collector service:

    cd src/services/collector
    go run main.go
  3. Launch the web interface:

    cd client
    pnpm install
    pnpm run dev
  4. Access the web interface at http://localhost:3000

Docker Deployment

docker compose up -d

Configuration

log-generator

Environment Variable Description Default
LOG_RATE The number of logs to generate per second 10
CONSOLE_OUTPUT Whether to output logs to the console true
OUTPUT_FILE The file to output logs to /var/log/logger/service.log
LOG_FORMAT The format of the logs (json, text) json
ENABLE_BURSTS Whether to enable log bursts true
BURST_FREQUENCY The frequency of log bursts 0.1
BURST_MULTIPLIER The multiplier for the log rate during bursts 5
BURST_DURATION The duration of log bursts in seconds 3

log-collector

Environment Variable Description Default
CONFIG_PATH The path to the configuration file /app/config.yml

Web Interface

Environment Variable Description Default
NEXT_PUBLIC_GENERATOR_API_URL The URL of the log-generator service http://localhost:8080
NEXT_PUBLIC_COLLECTOR_API_URL The URL of the log-collector service http://localhost:8081
NEXT_PUBLIC_WS_URL The URL of the Centrifugo WebSocket server ws://localhost:8000/connection/websocket
PORT Web interface port 3000

API Documentation

log-generator

  • GET /config: Get the current configuration of the log-generator service.
  • POST /config: Update the configuration of the log-generator service.
  • GET /logs: Get the latest logs from the log-generator service.
  • GET /statistics: Get statistics about the logs generated by the log-generator service.

log-collector

  • GET /conn/:id: Authenticate a client to connect to the Centrifugo server.
  • GET /sub/:id: Authenticate a client to subscribe to a channel on the Centrifugo server.
collector-2025-10-11_20.32.49.mp4

About

a log processing and observability platform designed for large-scale, fault-tolerant, and real-time data systems. Built with principles of distributed consensus, horizontal scalability, and high availability

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors