How cloro-dev/geo-tracker works
geo-tracker is an agent-driven GEO/SEO tracker: clients configure prompts, schedule or trigger engine runs, and query stored answers and brand visibility. Runs are submitted asynchronously to cloro; results arrive by webhook or are recovered by polling, then derived source and brand data is refreshed. The graph includes the REST and MCP interfaces, scheduler, extraction, persistence, and documented Grafana use. Some route and integration links rely on README or SOURCE INDEX references because their implementation excerpts were not shown.
Main entry points: runner.ts Run scheduler · schema.ts Postgres tables · auth.ts Request auth · route.ts Brand API
Components 20
Agent interfaces
- MCP tools
app/api/mcp/route.ts - Prompt API
app/api/prompts/route.ts - Run endpoint
app/api/prompts/[id]/run/route.ts - Results API
app/api/results/route.ts - Brand API
app/api/brands/route.ts - Request auth
lib/auth.ts - Input validation
lib/validation.ts
Run orchestration
- Cron route
app/api/cron/route.ts - Run scheduler
lib/runner.ts - Engine mapping
lib/engines.ts - Webhook route
app/api/webhook/route.ts - Webhook security
lib/webhooks.ts
Answer analysis
- Response extraction
lib/extract.ts - Derived data refresh
lib/refresh.ts
Postgres data
- Postgres tables
lib/db/schema.ts
Reporting
- Grafana starter
grafana/dashboard.json
Other components
- Agent client
- HTTP client
- Vercel Cron
- cloro API
Connections 31
- Agent client → MCP tools: calls tools
README.md - HTTP client → Prompt API: configures prompts
README.md - HTTP client → Run endpoint: triggers runs
README.md - MCP tools → Request auth: checks access
app/api/mcp/route.ts - Prompt API → Request auth: checks access
app/api/prompts/route.ts - Run endpoint → Request auth: checks access
app/api/prompts/[id]/run/route.ts - Results API → Request auth: checks access
app/api/results/route.ts - Brand API → Request auth: checks access
app/api/brands/route.ts - Prompt API → Input validation: validates input
app/api/prompts/route.ts - Brand API → Input validation: validates input
app/api/brands/route.ts - MCP tools → Postgres tables: reads and writes
app/api/mcp/route.ts - Prompt API → Postgres tables: reads and writes
app/api/prompts/route.ts - Run endpoint → Run scheduler: submits prompt
app/api/prompts/[id]/run/route.ts - Run endpoint → Postgres tables: reads prompt
app/api/prompts/[id]/run/route.ts - Results API → Postgres tables: queries results
app/api/results/route.ts - Brand API → Postgres tables: reads and writes
app/api/brands/route.ts - Brand API → Derived data refresh: queues re-extraction
app/api/brands/route.ts - Vercel Cron → Cron route: ticks schedule
README.md - Cron route → Request auth: checks cron access
app/api/cron/route.ts - Cron route → Run scheduler: runs tick
app/api/cron/route.ts - Run scheduler → Postgres tables: claims and stores runs
lib/runner.ts - Run scheduler → Engine mapping: selects engine task
lib/runner.ts - Run scheduler → cloro API: submits and polls
lib/runner.ts - Run scheduler → Webhook security: builds callback URL
lib/runner.ts - cloro API → Webhook route: posts completion
README.md - Webhook route → Webhook security: verifies callback
app/api/webhook/route.ts - Webhook route → Run scheduler: completes task
app/api/webhook/route.ts - Run scheduler → Derived data refresh: refreshes derived data
lib/runner.ts - Derived data refresh → Response extraction: extracts response data
lib/refresh.ts - Derived data refresh → Postgres tables: writes derived rows
lib/refresh.ts - Postgres tables → Grafana starter: charts stored data
README.md