这个网站采用一个偏轻量、但可以长期扩展的架构:
The site uses a lightweight but extensible architecture:
- Cloudflare 负责 DNS。
- Cloudflare handles DNS.
- Vercel 负责托管 Astro 主站和
/api/* 接口。
- Vercel hosts the Astro site and /api/* endpoints.
- Supabase 负责订阅、留言、评论和访问统计。
- Supabase handles subscriptions, messages, comments, and visit tracking.
- GitHub Actions 负责每日同步数据并触发重新部署。
- GitHub Actions runs daily data syncs and triggers redeployment.
- 阿里云 OSS 负责图片、PDF、封面图和其他附件。
- Alibaba Cloud OSS stores images, PDFs, cover art, and attachments.
第一版刻意让大部分页面保持静态,这样访问速度快,部署模型也清楚。只有订阅、留言、评论、访问统计这些真正需要服务器的功能,才通过 Astro API route 按需执行。
Most pages are intentionally kept static for fast load times and a clean deployment model. Only features that genuinely need a server — subscriptions, messages, comments, visit tracking — run through Astro API routes on demand.
这个分工的好处是:内容更新走 Git,互动数据走数据库,静态资源走 OSS。每一层都相对独立,不会因为一个功能还没成熟就拖慢整个网站上线。
The benefit of this separation: content updates go through Git, interaction data through the database, and static assets through OSS. Each layer is relatively independent — no single immature feature can delay the entire site from going live.