SmileQWQ d70705b4ae fix: align lite remaining value and locale defaults
## 中文

- 将 lite 的订阅剩余价值计算改为按当前周期已付金额、原始购买周期天数与实际剩余天数计算,并统一按业务时区排除当天,避免未来已预付周期抬高当前周期详情值。
- 为 Worker 运行时接入 DEFAULT_APP_LOCALE 读取链路,在 wrangler 默认变量、runtime config 与回归测试中补齐 locale 默认值传递。
- 修复相关 API / Web 回归测试与脆弱断言,确保 shared、api、web 全量测试和类型检查在 lite 分支重新通过。

## English

- Rework lite remaining value calculation to use the current-cycle paid amount, original package days, and actual remaining days while consistently excluding today in the business timezone and preventing future prepaid cycles from inflating current-cycle detail values.
- Wire DEFAULT_APP_LOCALE into the Worker runtime path by adding the wrangler default var, runtime config propagation, and regression coverage for locale defaults.
- Update the related API and web regression coverage and relax brittle assertions so shared, api, and web full validation passes again on lite.
2026-06-02 11:11:36 +08:00
2026-05-16 19:33:21 +08:00

SubTracker Lite

SubTracker Lite

A self-hosted subscription manager for multi-currency subscriptions, renewal reminders, budget overviews, logo assets, and Wallos migrations on Cloudflare Workers.

GitHub release GitHub stars License: GPL v3

简体中文 · Local development · Deployment · Deployment guide · Releases

The current lite branch targets Cloudflare Workers only. If you need Docker / Docker Compose deployment, use the main branch, where the Node/SQLite runtime, workflows, and deployment notes are maintained.

Screenshots

Dashboard

Dashboard

More views

Subscriptions Spending
Subscriptions Spending
AI recognition Wallos import
AI recognition Wallos import

Features

  • Subscription management: create, edit, renew, pause, disable, review records, and reorder subscriptions.
  • Reminder rules: define flexible days&time; rules for upcoming, due-today, and overdue reminders, with minute-level scans.
  • Tags: classify subscriptions with multiple tags, filter by tags, and manage tag ordering.
  • Budgets: track global monthly and yearly budgets from the dashboard.
  • Statistics: review spending overview, status distribution, currency distribution, top subscriptions, and AI summaries.
  • Multi-currency support: maintain exchange-rate snapshots, normalize into a base currency, and use the built-in currency converter.
  • Notifications: send reminders through Webhook, SMTP / Resend email, PushPlus, Telegram Bot, ServerChan, Gotify, Bark, NotifyX, and Apprise.
  • Logo handling: upload logos to R2, reuse remote references, and search for logos online.
  • AI recognition: extract subscription details from text or images and fill the form automatically.
  • Wallos import: import Wallos JSON, SQLite, and ZIP backups; SQLite / ZIP files are parsed in the browser before being persisted by the Worker.
  • Login experience: support remember-me sessions, configurable session retention, default-password change reminders, and login rate limiting.

Lite Branch Notes

This branch is optimized for Cloudflare Worker Free, so a few features are intentionally trimmed or adapted:

  • Hot statistics and calendar endpoints use D1-backed caching to reduce Worker CPU time.
  • KV is not used.
  • Email notifications support SMTP / Resend, but SMTP port 25 is not supported.
  • Tag-level monthly budgets and the dedicated budgets page are removed.
  • The dashboard keeps lightweight overview metrics, global budgets, and upcoming renewals.
  • Spending statistics keep overview charts, status distribution, currency distribution, TOP 10 subscriptions, and AI summaries.
  • Wallos / SubTracker backup import, logo search, cron jobs, and auto-renew flows are adapted for the Worker runtime.
  • When the free Worker tier hits 503 or CPU limits, the UI shows an explicit warning instead of a silent failure.

See DEPLOYMENT.md for deployment details, feature boundaries, and runtime notes.

Tech Stack

  • Frontend: Vue 3, Vite, TypeScript, Naive UI, Pinia, TanStack Query, ECharts
  • Backend: Cloudflare Worker, Hono, Prisma D1 Adapter, D1, optional R2

Local Development

1. Install dependencies

npm install

2. Start the local Worker

npm run dev:worker

Default address:

  • http://127.0.0.1:8787

Default credentials:

  • Username: admin
  • Password: admin

After the first login, changing the default password is strongly recommended. Repeated login failures trigger rate limiting.

Useful Commands

npm run dev:worker
npm run build
npm run lint
npm test

Deployment

The recommended path is GitHub Actions + Cloudflare.

The full deployment flow is documented in:

In short:

  1. Fork this repository.
  2. Configure the required Cloudflare Secrets / Variables.
  3. When forking, do not enable Copy the main branch only, or the lite branch will be missing.
  4. Run Lite CI and Deploy in GitHub Actions, and set Use workflow from to lite.
  5. Keep your fork updated with Sync fork.

Common repository Variables:

  • WORKER_NAME_PREFIX
  • ENABLE_R2 (disabled by default; enable it if you want ZIP-imported logos to be persisted)

Workflow

  • Lite CI and Deploy: runs lint / test / build first, then deploys to Cloudflare only if verification succeeds.

License

This project is released under the GNU General Public License v3.0 (GPLv3).

Acknowledgements

Thanks to the following projects and ecosystems:

Star History

Star History Chart

Description
一个现代化的自托管订阅管理器,支持标签分类、预算洞察、续费提醒、Wallos 导入、AI 辅助录入和多币种管理。
Readme GPL-3.0 4.8 MiB
Languages
TypeScript 72.1%
Vue 26%
Shell 1.6%
JavaScript 0.1%
Dockerfile 0.1%
Other 0.1%