Skip to content

Tlytics v0.1.0 - Analytics Microservice

Choose a tag to compare

@t0mk t0mk released this 25 Aug 15:44
· 6 commits to main since this release

Initial Release

Tlytics is a lightweight, real-time analytics microservice written in Go. This initial release provides a complete microservice architecture for centralized analytics collection.

πŸ—οΈ Architecture

  • Microservice Design: Standalone analytics server with HTTP client libraries
  • Remote Connectivity: Applications connect via IP:port configuration (e.g., http://192.168.1.100:8081)
  • Centralized Storage: Single SQLite database for all analytics data
  • Network Communication: All events sent over HTTP with batching

✨ Features

  • Remote Event Collection: HTTP client automatically sends events to remote server
  • Batch Processing: Efficient client-side batching with configurable flush periods
  • SQLite Storage: Persistent storage on the analytics server
  • HTTP API: REST endpoints for event submission and data retrieval
  • Gin Middleware: Ready-to-use middleware for automatic request tracking
  • Docker Support: Containerized deployment with health checks
  • Pagination: Built-in pagination support for event retrieval
  • Network Resilience: Graceful handling of network errors

πŸš€ Quick Start

Server (Analytics Microservice):

go run cmd/tlytics/main.go --port 8081

Client (Your Application):

config := tlytics.Config{
    ServerURL:   "http://192.168.1.100:8081",
    FlushPeriod: 5 * time.Second,
}

analytics, err := tlytics.NewClient(config)
analytics.Emit(tlytics.Event{
    Key: "user_action",
    Data: map[string]interface{}{"action": "signup"},
})

πŸ“š API Endpoints

  • POST /events - Submit analytics events
  • POST /batch - Submit batch of events
  • GET /view - Retrieve events with pagination
  • GET /health - Health check

🐳 Docker Deployment

docker-compose up --build

This follows semantic versioning (SemVer) - this is the first stable release with the core microservice architecture.