First commit of the Next.js community site that powers deepseek-tui.com, deployed via Cloudflare Workers / OpenNext. This commit lands the scaffold and applies the visual + correctness pass requested by community feedback: - Palette: drop the cream/Anthropic-feel paper (#F4F1E8) for a DeepSeek-aligned cool white + soft gray (#FFFFFF / #F4F6FB), with indigo accents kept. Soften default hairlines so a pure-white background reads clean instead of harsh. - Mobile: add a hamburger menu (mobile-menu.tsx) so phones can reach Install / Docs / Activity / Roadmap / Contribute — previously the link list was hidden on phones with no replacement. Tighter hero, flexible button row, viewport-safe code blocks, columnar grids collapse cleanly under 768px, and the printed-almanac center rule is desktop-only now (it sliced through narrow viewports). - "How it works" diagram: replace the hand-rolled ASCII art (which misaligned under CJK monospace because Han characters take 2 columns vs Latin's 1, per dhh's note in WeChat) with a real mermaid diagram rendered client-side via dynamic import. Uses the mermaid.live standard syntax 庄表伟 recommended. - Issue #1104: the docs listed a `deepseek-cn` provider that the v0.8.16 binary doesn't accept (`ProviderArg` in crates/cli only has 9 variants; the 10th lives only in the legacy tui/config.rs). derive-facts.mjs now omits `deepseek-cn` until that variant is wired through the shared ProviderKind, and the install page's China-network recipe uses `base_url` / `DEEPSEEK_BASE_URL` (which actually works on v0.8.16) instead of the unsupported provider. Auto-deploys via .github/workflows/deploy-web.yml on push to main. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4.9 KiB
deepseek-tui-web
Community site for deepseek-tui — lives at deepseek-tui.com.
Next.js 15 (App Router) + Tailwind, deployed to Cloudflare Workers via @opennextjs/cloudflare. Curated "Today's Dispatch" content is regenerated every 6 hours by a Cloudflare Cron Trigger that calls deepseek-v4-flash to summarise recent repo activity, and stored in Workers KV.
Local dev
cd web
npm install
cp .env.example .env.local # fill in the keys you have
npm run dev # http://localhost:3000
Required env (only for the curator + private-repo rate limits):
| Variable | What | Required? |
|---|---|---|
DEEPSEEK_API_KEY |
DeepSeek platform key (sk-...) |
only for /api/cron?task=curate |
GITHUB_TOKEN |
Fine-grained PAT, public-repo read scope | optional (raises rate limit) |
GITHUB_REPO |
Defaults to Hmbown/deepseek-tui |
optional |
CRON_SECRET |
Shared secret for manual cron invocation | optional |
The site renders fine without any of them — Today's Dispatch falls back to a static editorial; the GitHub feed shows "feed not yet loaded".
Deploy to Cloudflare
You already own deepseek-tui.com on Cloudflare and have a Workers Paid plan. The deploy is two steps:
-
Provision KV namespaces once:
npx wrangler kv namespace create CURATED_KV npx wrangler kv namespace create NEXT_INC_CACHE_KVCopy the printed
idvalues into the matchingwrangler.jsoncbindings (replace eachREPLACE_WITH_KV_ID). -
Set secrets and deploy:
npx wrangler secret put DEEPSEEK_API_KEY npx wrangler secret put GITHUB_TOKEN # optional npx wrangler secret put CRON_SECRET # optional, for manual /api/cron?task=curate hits npm run deploy # builds with OpenNext + uploads -
Point the domain: in the Cloudflare dashboard, add a Worker route for
deepseek-tui.com/*→deepseek-tui-web(the deploy command will offer this if the zone is already on your account).
The first cron run happens within 6 hours; you can also kick it manually:
curl -H "x-cron-secret: $CRON_SECRET" "https://deepseek-tui.com/api/cron?task=curate"
What's where
web/
├── app/
│ ├── layout.tsx root layout, font loading
│ ├── page.tsx home — hero, dispatch, stats, how-it-works, join
│ ├── globals.css design system: paper grain, hairlines, type, seal
│ ├── install/page.tsx per-OS install with auto-detection
│ ├── docs/page.tsx modes / tools / approval / config / mcp / providers
│ ├── feed/page.tsx live mirror of issues + PRs
│ ├── roadmap/page.tsx shipped / underway / considered / ruled out
│ ├── contribute/page.tsx how to PR + house rules + dev loop
│ └── api/
│ ├── cron/route.ts manual cron trigger: GitHub → DeepSeek → KV
│ └── github/feed/route.ts cached JSON endpoint
├── components/
│ ├── nav.tsx sticky header w/ date strip + CJK accents
│ ├── footer.tsx dense 5-column footer
│ ├── seal.tsx red Chinese-seal mark used as section anchor
│ ├── ticker.tsx animated live activity strip
│ ├── stat-grid.tsx tabular repo stats row
│ ├── feed-card.tsx one issue/PR card
│ └── install-tabs.tsx client component, OS auto-detect + copy
├── lib/
│ ├── types.ts shared types
│ ├── github.ts REST client + relative-time formatter
│ ├── deepseek.ts v4-flash chat client + curate() prompt
│ └── kv.ts Cloudflare KV access via OpenNext bindings
├── wrangler.jsonc CF Worker config + cron + KV binding
├── open-next.config.ts OpenNext adapter config
└── tailwind.config.ts design tokens
Aesthetic
"Yamen tech": Qing memorial document × WeChat news feed × Bloomberg terminal.
- Palette: cream paper
#FAF6EE, ink#0A2540, cinnabar red#C8102E, aged gold, jade green, cobalt blue. - Type: Fraunces (display), IBM Plex Sans (body), JetBrains Mono (UI/code), Noto Serif SC (decorative CJK anchors).
- Structure: hairline 1px dividers, multi-column grids, big tabular numbers, surgical use of red for "hot" markers, decorative Chinese-seal squares as section anchors.
If you want to retune the palette, edit :root in app/globals.css and the colors block in tailwind.config.ts.