finds.dev

YunYouJun/ai-sfc

AI 春联 / Spring Festival Couplets

View on GitHubHomepage ↗

★ 300TypeScriptMPL-2.0updated Aug 2026

// the take

A Nuxt 3 app that generates Chinese Spring Festival couplets (对联) with an LLM, built for the yunle.fun ecosystem. It has two generation paths: bring-your-own OpenAI-compatible key (fully client-side, nothing touches the server) or sign in via a custom SSO and pay per-generation from a wallet balance. Mainly useful to Chinese-speaking users around Lunar New Year, or as a reference for the dual free/paid LLM-generation pattern.

The two-path design is a genuinely good call: anonymous users keep their token local and never hit the server, while paid users go through a reserve-then-confirm billing flow (packages/server/billing.ts) so a failed generation doesn't charge the wallet. The SSO is real PKCE (S256) with no iframe/popup hacks, and it explicitly handles the 'user cancelled' case instead of silently falling back to a lesser auth state. packages/ai is split out as a standalone library with its own CLI, so the couplet-generation logic isn't trapped inside the Nuxt app. For a 300-star hobby project, test coverage is unusually deliberate — billing, both SSO flows, and the local generation path all have dedicated test files.

The paid path is hard-wired to one vendor's stack (yunle.fun accounts, CloudBase, EdgeOne Pages SSO registry) — you can't stand this up yourself without replicating that whole backend, so it's really only reusable for the free/BYO-key mode. Production runs on EdgeOne's V8 edge functions with no Nitro, so the billing/runtime code has to be duplicated or shared awkwardly between `server/api/*` (local dev) and `functions/api/*` (prod) — that's a real place for dev/prod behavior to drift undetected. Documentation and UI are Chinese-only with no i18n, which is fine for the target audience but limits it to that. It's also a seasonal tool by nature (couplets matter once a year around Lunar New Year), and the FAQ already lists China-specific browser quirks (QQ browser, ofetch issues) that suggest ongoing environment-specific maintenance burden rather than a set-and-forget utility.

We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →

search the same ground:

// at a glance

Stars
300
Forks
43
Language
TypeScript
License
MPL-2.0
Last commit
20 Aug 2026

// nearby

If ai-sfc isn't quite it.

All repos →