Analytics Service

High-performance event collection service with HTTP API ingestion, batch writes for efficiency, and structured event schema for categorized analytics.

// tech stack


Go 1.25FiberPostgreSQLGORM

// features


  • HTTP API for event ingestion
  • Batch writes: 200 events or 500ms flush interval
  • Structured event schema with metadata
  • Health check and metrics endpoints

// architecture


Modular Go structure: cmd/api (entry), internal/ (ingest, routes, models, handlers, services). Fiber HTTP server receives events via POST /api/analytics/track. Batch writer accumulates events and flushes on count or timer threshold.