{"id":51804283,"url":"https://github.com/hamflx/codex-dashboard","last_synced_at":"2026-07-21T12:05:24.871Z","repository":{"id":363390666,"uuid":"1263105966","full_name":"hamflx/codex-dashboard","owner":"hamflx","description":null,"archived":false,"fork":false,"pushed_at":"2026-06-08T17:39:14.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-08T19:10:54.753Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://codex-dashboard-gamma.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hamflx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-08T16:17:40.000Z","updated_at":"2026-06-08T17:39:19.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/hamflx/codex-dashboard","commit_stats":null,"previous_names":["hamflx/codex-dashboard"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/hamflx/codex-dashboard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamflx%2Fcodex-dashboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamflx%2Fcodex-dashboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamflx%2Fcodex-dashboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamflx%2Fcodex-dashboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hamflx","download_url":"https://codeload.github.com/hamflx/codex-dashboard/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamflx%2Fcodex-dashboard/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35722818,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-21T02:00:06.728Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-07-21T12:05:23.784Z","updated_at":"2026-07-21T12:05:24.867Z","avatar_url":"https://github.com/hamflx.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Codex TTFT Dashboard\n\nRealtime Vercel dashboard scaffold for monitoring Codex TTFT by region.\n\n## What is included\n\n- Next.js App Router dashboard UI.\n- Cloudflare Worker Cron trigger for `/api/cron/ttft` every 10 minutes.\n- `/api/metrics` aggregation endpoint for current regional TTFT and hourly medians.\n- Redis REST storage support for Vercel KV or Upstash Redis.\n- Local JSON storage for development.\n- Mock probe mode so the deployment and UI can be tested before proxy and OpenAI credentials are ready.\n- Redis writes are stored by probe run to stay comfortably inside low Upstash command quotas.\n- Official OpenAI Codex OAuth probing through `https://chatgpt.com/backend-api/codex` with `gpt-5.5` by default.\n\n## Local development\n\n```bash\nnpm install\nnpm run dev\n```\n\nOpen `http://localhost:3000`.\n\nRun one manual probe:\n\n```bash\ncurl http://localhost:3000/api/cron/ttft\n```\n\n## Vercel deployment flow\n\n```bash\nnpx vercel@latest login\nnpx vercel@latest link\nnpx vercel@latest env add CODEX_OAUTH_ACCESS_TOKEN production\nnpx vercel@latest env add CODEX_OAUTH_REFRESH_TOKEN production\nnpx vercel@latest env add CODEX_OAUTH_ACCOUNT_ID production\nnpx vercel@latest env add CODEX_MODEL production\nnpx vercel@latest env add CRON_SECRET production\nnpx vercel@latest env add KV_REST_API_URL production\nnpx vercel@latest env add KV_REST_API_TOKEN production\nnpx vercel@latest env add TTFT_PROXY_JSON production\nnpx vercel@latest deploy --prod\n```\n\nUse Vercel KV or Upstash Redis for durable history. Without Redis REST env vars, Vercel can render demo data, but Cron samples are not durable across serverless invocations.\n\nOAuth probes use the official ChatGPT Codex backend by default. Do not set `CODEX_OAUTH_BASE_URL` unless you are intentionally overriding it; API-key probes use `OPENAI_API_BASE_URL` and default to `https://api.openai.com/v1`.\n\nAt a 10-minute cadence, Redis writes are about 8,640 commands per month because each run is stored as one list item plus one trim. Dashboard reads are cached for 60 seconds by default through `TTFT_METRICS_CACHE_SECONDS`.\n\n## Cloudflare Cron deployment\n\nVercel Hobby only supports daily Cron, so the 10-minute schedule is handled by the Cloudflare Worker in `cloudflare/cron-worker.js`.\n\n```bash\nnpx wrangler login\nnpx wrangler secret put APP_URL\nnpx wrangler secret put CRON_SECRET\nnpm run cf:deploy\n```\n\nSet `APP_URL` to the production Vercel URL, for example `https://codex-dashboard.vercel.app`. Set `CRON_SECRET` to the same value used in Vercel.\n\nAfter deployment, trigger once manually:\n\n```bash\ncurl https://codex-dashboard-cron.\u003cyour-subdomain\u003e.workers.dev\n```\n\nCheck live Worker logs:\n\n```bash\nnpm run cf:tail\n```\n\n## Proxy notes\n\nThe local `clash.config.yaml` is ignored on purpose because it may contain credentials. Vercel functions cannot directly run Clash trojan/vmess nodes from that file. For production probes, expose each region as an HTTP(S) proxy endpoint and configure `TTFT_PROXY_JSON` or `TTFT_PROXY_\u003cREGION_ID\u003e` env vars.\n\nExample:\n\n```json\n{\n  \"hong-kong\": \"http://user:pass@hk-proxy.example.com:8080\",\n  \"japan\": \"http://user:pass@jp-proxy.example.com:8080\",\n  \"united-states\": \"http://user:pass@us-proxy.example.com:8080\"\n}\n```\n\n## Cron frequency\n\nThe Cloudflare Worker uses `*/10 * * * *` in `wrangler.toml`. `vercel.json` intentionally does not define Vercel Cron so Hobby deployments are not rejected.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamflx%2Fcodex-dashboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhamflx%2Fcodex-dashboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamflx%2Fcodex-dashboard/lists"}