{"id":51477053,"url":"https://github.com/ljzd-pro/sub2api-upstream-status","last_synced_at":"2026-07-06T22:01:14.832Z","repository":{"id":367276349,"uuid":"1280069508","full_name":"Ljzd-PRO/sub2api-upstream-status","owner":"Ljzd-PRO","description":"Sub2API 上游账号用量面板 | Sub2API Upstream Account Usage Panel","archived":false,"fork":false,"pushed_at":"2026-07-06T03:39:49.000Z","size":841,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-06T05:14:08.312Z","etag":null,"topics":["ai","ai-router","llm","nextjs","sub2api","web"],"latest_commit_sha":null,"homepage":"","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/Ljzd-PRO.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-25T08:38:51.000Z","updated_at":"2026-07-06T03:39:53.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Ljzd-PRO/sub2api-upstream-status","commit_stats":null,"previous_names":["ljzd-pro/sub2api-upstream-status"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Ljzd-PRO/sub2api-upstream-status","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ljzd-PRO%2Fsub2api-upstream-status","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ljzd-PRO%2Fsub2api-upstream-status/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ljzd-PRO%2Fsub2api-upstream-status/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ljzd-PRO%2Fsub2api-upstream-status/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ljzd-PRO","download_url":"https://codeload.github.com/Ljzd-PRO/sub2api-upstream-status/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ljzd-PRO%2Fsub2api-upstream-status/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35206987,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-06T02:00:07.184Z","response_time":106,"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":["ai","ai-router","llm","nextjs","sub2api","web"],"created_at":"2026-07-06T22:01:13.366Z","updated_at":"2026-07-06T22:01:14.791Z","avatar_url":"https://github.com/Ljzd-PRO.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sub2api upstream status\n\n[English](README.md) | [简体中文](README.zh-CN.md)\n\nPublic read-only Next.js panel for selected sub2api upstream account usage windows.\n\n## Preview\n\n![sub2api upstream status dashboard preview](docs/images/dashboard-preview.png)\n\n## Features\n\n- Read-only public dashboard for selected upstream accounts\n- 5 hours and 7 days usage windows with reset time and countdown\n- 5 hours and 7 days request counts and token usage, both per account and in dashboard summary\n- Real-time concurrency capacity sync per account\n- Frontend auto refresh countdown with a per-browser pause switch\n- Automatic language detection with Simplified Chinese, English, and Traditional Chinese\n- Automatic time zone detection with a per-browser manual time zone selector\n- Optional account name masking in the public API and UI\n\n## Scriptable Widget\n\nAn iOS Scriptable widget is available at [`scriptable/sub2api-upstream-status-widget.js`](scriptable/sub2api-upstream-status-widget.js). It supports Home Screen and Lock Screen widget sizes. Set the Scriptable widget Parameter to your panel base URL; the script does not include a built-in URL.\n\n## ScriptWidget Widget\n\nA ScriptWidget package is available at [`scriptwidget/sub2api-upstream-status`](scriptwidget/sub2api-upstream-status). Import the package into ScriptWidget and set `widget-param` to your panel base URL. The package does not include a built-in URL.\n\n## Configuration\n\nCreate `.env` from `.env.example`.\n\n- `SUB2API_BASE_URL`: sub2api host, with or without `/api/v1`\n- `SUB2API_ADMIN_API_KEY`: admin API key sent server-side as `x-api-key`\n- `SUB2API_ACCOUNT_IDS`: comma or space separated upstream account IDs to show\n- `MASK_ACCOUNT_NAMES`: set to `true` to mask account names in the public API and UI\n- `REFRESH_INTERVAL_SECONDS`: browser polling interval, default `60`\n- `NEXT_PUBLIC_PANEL_TITLE`: dashboard title\n\nThe admin key is only read by the Next.js server route. It is not returned to the browser.\n\n## Local Development\n\n```bash\nnpm install\nnpm run dev\n```\n\nOpen `http://localhost:3000`.\n\n## Checks\n\n```bash\nnpm run typecheck\nnpm test\nnpm run build\n```\n\n## Docker\n\n```bash\ndocker compose up -d --build\n```\n\nThe container listens on port `3000`. If deployed on the same Docker network as sub2api, `SUB2API_BASE_URL` can point at the internal service URL.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fljzd-pro%2Fsub2api-upstream-status","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fljzd-pro%2Fsub2api-upstream-status","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fljzd-pro%2Fsub2api-upstream-status/lists"}