Lightweight REST API server built in Go as a high-performance alternative to a PHP/Laravel backend.
Serves aggregated advertising data to 400+ publisher clients via three endpoints, with Redis caching to minimize database load.
- Go — API server
- Redis — response caching (5 min TTL)
- MySQL — data storage via stored procedures
- Vue.js + ChartJS — frontend (separate repo)
GET /getDataByDomain— revenue and metrics grouped by domainGET /getDataByDate— revenue and metrics grouped by dateGET /getDataBySSP— revenue grouped by SSP per day
Copy .env.example to .env and set your credentials:
DB_DSN=user:password@tcp(host:port)/dbname
REDIS_ADDR=localhost:6379
go run main.go