cursortab-api

March 22, 2026 ยท View on GitHub

Community data collection API for training an improved completion gating model. Built with Hono on Cloudflare Workers with Turso (LibSQL) for storage.

Local Development

bun install
cp .dev.vars.example .dev.vars  # add your Turso credentials
turso dev --port 8080            # local LibSQL server
bun run dev                      # http://localhost:8787

Deploy

Deploys automatically on push to main via GitHub Actions.

First-time setup

  1. Set Cloudflare API token in GitHub repo secrets as CLOUDFLARE_API_TOKEN
  2. Set Turso secrets on Cloudflare:
    wrangler secret put TURSO_URL
    wrangler secret put TURSO_AUTH_TOKEN
    

Database migrations run automatically on first request.

Live

The production API is at https://api.cursortab.com.

Endpoints

MethodPathRate limitDescription
POST/events200/10s/IPIngest a completion event
GET/events60/min/IPPaginated read (?limit=&offset=&device_id=&outcome=)
GET/stats60/min/IPAggregate statistics

See docs/community-data-schema.md for the full schema.