How bangnk2000/flinters-recruitment works
Ad Performance Aggregator is a Go CLI that reads an advertising CSV once, validates and parses rows in parallel, aggregates metrics by campaign, and emits top-10 CTR and CPA reports plus a malformed-row log. The graph follows the CLI-owned orchestration and distinguishes parsing, aggregation, ranking, and serialization. README documents bounded chunking and ordered malformed-row reporting; the sampled source confirms these paths. No external runtime services or persistent input store are involved.
Main entry points: cli.go CLI orchestration · pipeline.go Chunk pipeline · malformed_log.go Malformed log writer · main.go Aggregator command
Components 12
Command interface
- Aggregator command
cmd/aggregator/main.go - CLI orchestration
internal/cli/cli.go
CSV ingestion
- Chunk pipeline
internal/ingest/pipeline.go - Row validation
internal/ingest/parse.go - Malformed log writer
internal/ingest/malformed_log.go
Campaign metrics
- Worker aggregation
internal/agg/agg.go
Reports and logs
- Campaign ranking
internal/report/rank.go - Report CSV writer
internal/report/csv.go
Other components
- CLI user
- Input CSV
- Malformed rows CSV
- Top-10 CSV reports
Connections 13
- CLI user → Aggregator command: invokes
README.md - Aggregator command → CLI orchestration: delegates to
cmd/aggregator/main.go - CLI orchestration → Input CSV: opens
internal/cli/cli.go - CLI orchestration → Malformed log writer: creates and passes
internal/cli/cli.go - CLI orchestration → Chunk pipeline: parses with
internal/cli/cli.go - Chunk pipeline → Row validation: validates rows
internal/ingest/pipeline.go - Chunk pipeline → Worker aggregation: adds valid records
internal/ingest/pipeline.go - Chunk pipeline → Malformed log writer: reports rejected rows
- Malformed log writer → Malformed rows CSV: writes
internal/ingest/malformed_log.go - CLI orchestration → Worker aggregation: creates and merges
internal/cli/cli.go - CLI orchestration → Campaign ranking: ranks campaigns
internal/cli/cli.go - CLI orchestration → Report CSV writer: writes ranked data
internal/cli/cli.go - Report CSV writer → Top-10 CSV reports: serializes
internal/report/csv.go