Skip to content

Commit ccaa191

Browse files
committed
docs: refresh README for Go API architecture and usage updates
- describe Go + Redis backend and Next.js dashboard split - update script URL to events.vercount.one and Busuanzi migration - add self-hosting and deployment notes for apps/api and apps/web - refine Chinese README copy and support section details
1 parent f07279a commit ccaa191

2 files changed

Lines changed: 96 additions & 60 deletions

File tree

README.en.md

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,24 @@
77

88
# Vercount Website Counter
99

10-
> Powered by: 🚀 NextJS + ✨ Redis + ▲ Vercel
10+
> Powered by: 🚀 Go + ✨ Redis + ▲ Next.js
1111
12-
Looking for a simple, easy-to-use website counter? Try Vercount! It's the ultimate solution for fast and reliable statistics.
12+
Looking for a simple, easy-to-use website counter? Try Vercount! It's a fast and reliable alternative for website analytics.
1313

14-
Vercount is an efficient website counter based on NextJS and Redis, featuring:
14+
Vercount is an efficient website counter built around a Go public events service and Redis, with Next.js serving as the dashboard, auth, and compatibility layer. It features:
1515

16-
- **Lightning Fast**: Server response time under 10ms.
17-
- **High Availability**: 99.99% uptime with global CDN support.
16+
- **Lightning Fast**: The public counting path is handled directly by the Go service for fast and stable responses.
17+
- **High Availability**: Public event traffic is separated from the management web app, reducing pressure on the main site runtime.
1818
- **Accurate Statistics**: Utilizes POST requests for precise data.
19-
- **Security**: JSON callback to eliminate CSRF attack risks; learn more: [JSONP](https://en.wikipedia.org/wiki/JSONP).
20-
- **Automatic Data Sync**: No manual operation needed; data auto-syncs.
21-
- **Seamless Compatibility**: Easy integration with existing HTML.
22-
- **Persistent Data Storage**: Regular Redis backups to prevent data loss.
23-
- **Serverless Architecture**: Back-end support via Vercel Serverless Functions.
19+
- **Security**: Keeps the compatibility surface while continuing to strengthen public endpoint safety and abuse protection.
20+
- **Automatic Data Sync**: No manual operation needed; counter data can initialize automatically from existing Busuanzi data.
21+
- **Seamless Compatibility**: Easy integration with existing HTML and Busuanzi-compatible spans.
22+
- **Persistent Data Storage**: Redis remains the shared counter storage layer.
23+
- **Clear Architecture**: Go + Redis power the core counting backend, while Next.js handles dashboard, auth, domain management, and compatibility flows.
2424

2525
## Why Choose Vercount?
2626

27-
Vercount is designed to be faster, more stable, and secure. Easy deployment requires only adding a script tag. Future updates will include customizable statistics.
27+
Vercount is designed to be faster, more stable, and more secure. From the user's perspective, it still takes only a script tag to get started. Under the hood, Vercount now centers on a Go + Redis counting backend, while the Next.js app handles dashboard, authentication, and compatibility workflows. Future updates will include more customizable statistics and management features.
2828

2929
## Project Website
3030

@@ -42,7 +42,7 @@ Vercount is designed to be faster, more stable, and secure. Easy deployment requ
4242
To get started, simply add this script to your site:
4343

4444
```html
45-
<script defer src="https://cn.vercount.one/js"></script>
45+
<script defer src="https://events.vercount.one/js"></script>
4646
```
4747

4848
After adding the script, use these tags to start counting:
@@ -75,9 +75,18 @@ We have implemented multiple layers of security measures to detect and block aut
7575

7676
## Self-Hosting Guide
7777

78-
Coming soon.
78+
Full self-hosting documentation is still being organized. At a high level, the current architecture consists of:
79+
80+
- `apps/api`: the Go public events service
81+
- `apps/web`: the Next.js dashboard and compatibility layer
82+
- Redis: the shared counter storage backend
83+
84+
More detailed deployment instructions will be added soon.
7985

8086
## Development and Deployment Notes
8187

82-
- The website app now lives in `apps/web/`
83-
- If you deploy this repository on Vercel, set the Project Root Directory to `apps/web`
88+
- The web dashboard app lives in `apps/web/`
89+
- The public events service lives in `apps/api/`
90+
- The main counting backend is now Go + Redis, while Next.js remains the dashboard, auth, and compatibility layer
91+
- If you deploy the web app on Vercel, set the Project Root Directory to `apps/web`
92+
- Public counter traffic such as `events.vercount.one` should be served by `apps/api`

README.md

Lines changed: 72 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@
77

88
# Vercount 网站计数器
99

10-
> Powered by: 🚀 NextJS + ✨ Redis + ▲ Vercel
10+
> Powered by: 🚀 Go + ✨ Redis + ▲ Next.js
1111
12-
不蒜子计数访问慢?总是遇到 502 错误?那就试试 Vercount!这是一个完美的不蒜子替代方案
12+
不蒜子计数访问慢?总是遇到 502 错误?那就试试 Vercount!这是一个更快、更稳定的不蒜子替代方案
1313

14-
Vercount 是一个基于 NextJS 和 Redis 的高效网站计数器,具有以下特点
14+
Vercount 以 Go 和 Redis 为核心驱动计数 API,用 Next.js 搭建管理后台和兼容层。它具备以下特点
1515

16-
- **极速响应**服务器响应时间在 100ms 以内
17-
- **高可用性**Vercel 全球 CDN,确保 99.99% 的可用性
18-
- **精准统计**使用 POST 请求,克服传统 Referrer 方法在移动端和某些浏览器上的不足
19-
- **安全防护**采用 JSON 回调方式,杜绝 CSRF 攻击风险,了解更多请查看:[JSONP](https://en.wikipedia.org/wiki/JSONP)
20-
- **自动数据初始化**:无需手动操作,`site_pv``site_uv``page_pv` 数据会自动从不蒜子迁移,无需担心数据丢失
21-
- **无缝兼容**支持不蒜子的 `span` 标签,轻松切换
22-
- **Serverless 架构**通过 Vercel Serverless Functions 提供后端支持,保证 99.99% 的可用性
23-
- **自托管**支持自托管,可以部署到任何支持 NextJS 的平台
24-
- **编辑访客数据**支持自定义网站的访客数据,前往 [vercount.one](https://vercount.one) 登录并验证域名后即可使用
16+
- **极速响应**计数请求由 Go 服务直接处理,响应快、够稳定
17+
- **高可用性**高频的公开事件流量与管理后台分离,减轻主站运行压力
18+
- **统计精准**采用 POST 请求,克服传统 Referrer 方式在移动端和部分浏览器上的统计缺陷
19+
- **安全可靠**保留兼容接口的同时,持续加强公开计数接口的安全与风控
20+
- **数据自动同步**:无需手动操作,site_pvsite_uvpage_pv 可自动从不蒜子迁移,数据不丢
21+
- **无缝兼容**直接支持不蒜子的 span 标签,切换毫无负担
22+
- **架构清晰**Go + Redis 负责计数后端,Next.js 负责后台、鉴权、域名管理和兼容层
23+
- **支持自托管**你可以分别部署公共事件服务与 Web 管理后台
24+
- **访客数据可编辑**登录 [vercount.one](https://vercount.one) 验证域名后,即可自定义网站访客数据
2525

2626
## 为什么要做这个项目?
2727

@@ -31,46 +31,48 @@ Vercount 是一个基于 NextJS 和 Redis 的高效网站计数器,具有以
3131
- 使用过时的 Referrer 方法,导致在移动端和某些浏览器上统计不准确。
3232
- JSONP 回调存在安全隐患,易受 CSRF 攻击,了解更多请查看:[JSONP](https://en.wikipedia.org/wiki/JSONP)
3333

34-
Vercount 旨在解决这些问题,让网站计数器更快、更稳定、更安全。无需复杂部署,只需添加一个 script 标签即可使用。未来我还会增加更多功能,比如自定义统计数据等
34+
Vercount 正是为了解决这些问题而生——更快、更稳、更安全。对使用者来说,依然只需一行 script 标签就能接入;而在底层,Vercount 以 Go + Redis 作为计数核心,Next.js 负责后台、鉴权和兼容能力。现已支持自定义统计数据,请前往 [vercount.one](https://vercount.one) 登录并验证域名后即可使用
3535

3636
## 项目官网
3737

3838
- [vercount.one](https://vercount.one)
3939

40-
## 快速使用
40+
## 快速上手
4141

42-
**如果你需要在 React 项目中使用 Vercount,可以使用 `@vercount/react`源码现在和网站主应用一起维护在这个仓库的 `packages/react` 目录中**
42+
**如果你用的是 React 项目,可以直接使用 `@vercount/react`它的源码就在本仓库的 `packages/react` 目录下,与主站应用一起维护**
4343

44-
> `vercount-react` 已更名为 `@vercount/react`
44+
> 注意:`vercount-react` 已更名为 `@vercount/react`
4545
46-
- Monorepo: https://github.com/EvanNotFound/vercount
47-
- Package path: https://github.com/EvanNotFound/vercount/tree/main/packages/react
46+
- Monorepo 地址:https://github.com/EvanNotFound/vercount
47+
- 包路径:https://github.com/EvanNotFound/vercount/tree/main/packages/react
4848

49-
将以下代码添加到你的网站中
49+
在你的网站中添加下面这段代码即可
5050

5151
```html
5252
<script defer src="https://events.vercount.one/js"></script>
5353
```
5454

55-
添加 script 后,使用以下标签开始统计
55+
添加 script 后,用这些标签来展示统计数据
5656

5757
```html
58-
本文总阅读量 <span id="vercount_value_page_pv">Loading</span> 次 本站总访问量
59-
<span id="vercount_value_site_pv">Loading</span> 次 本站总访客数
60-
<span id="vercount_value_site_uv">Loading</span> 人
58+
本文总阅读量 <span id="vercount_value_page_pv">Loading</span> 次
59+
60+
本站总访问量 <span id="vercount_value_site_pv">Loading</span> 次
61+
62+
本站总访客数 <span id="vercount_value_site_uv">Loading</span> 人
6163
```
6264

6365
## 从不蒜子切换到 Vercount
6466

65-
只需替换不蒜子的 script 标签,其他保持不变,Vercount 兼容 Busuanzi 的 span 标签。数据会在首次访问时自动同步
67+
只需替换原来的不蒜子 script 标签,其它完全不用动。Vercount 会兼容不蒜子的 span 标签,数据在第一次访问时会自动同步
6668

67-
替换为
69+
替换成
6870

6971
```html
7072
<script defer src="https://events.vercount.one/js"></script>
7173
```
7274

73-
**Vercount 支持不蒜子的 span 标签,你可以继续使用原有的标签**或者推荐切换到 Vercount 的专属 ID 标签,以便后续功能扩展
75+
**Vercount 既支持原有的不蒜子标签,也推荐使用专属 ID 标签**方便后续功能扩展
7476

7577
```html
7678
<span id="vercount_value_page_pv">Loading</span> 次
@@ -89,47 +91,72 @@ Vercount 旨在解决这些问题,让网站计数器更快、更稳定、更
8991

9092
## 开发与部署说明
9193

92-
- 网站主应用现在位于 `apps/web/`
93-
- 如果你在 Vercel 上部署这个仓库,请将 Project Root Directory 设置为 `apps/web`
94+
- Web 管理后台位于 `apps/web/`
95+
- API 服务位于 `apps/api/`
96+
- 当前架构以 Go + Redis 作为主要计数后端,Next.js 处理后台、鉴权和兼容层
97+
- 如果你在 Vercel 上部署这个仓库的 Web 应用,请将 Project Root Directory 设置为 `apps/web`
98+
-`events.vercount.one` 这样的公共计数入口,应由 `apps/api` 提供服务
9499

95100
## 💗 支持我
96101

97-
这是一个公益项目,诚挚请求您的支持。即使是小额捐助,也能帮助我维持项目的长期运转
102+
Vercount 是一个公益项目,诚挚希望能得到你的支持。哪怕是小额捐助,也能帮助我维持它的长期运行
98103

99104
<details><summary>📝 支出明细</summary>
100-
目前Vercount 项目的运营费用由我个人承担,包括 Vercel 的费用和数据库服务器的费用。每月和每年的支出明细如下:
105+
目前 Vercount 的运营费用由我个人承担,主要包括 Vercel、云服务器和 CDN 的开销。每月和每年的支出明细如下:
101106

102107
每月支出:
103108

104-
- Vercel Pro 订阅费用:$20 USD
105-
- Vercel Function Invocations 费用:$1 USD
106-
- Edge Middleware Invocations 费用:$1 USD
107-
- 总计:约 ¥154 CNY
109+
- Vercel Pro 订阅:$20 USD
110+
- CDN 服务:$5 USD
111+
- Vercel 函数调用(Function Invocations):$1 USD
112+
- Edge 中间件调用(Edge Middleware Invocations):$1 USD
113+
- 合计:约 ¥190 CNY
108114

109115
每年支出:
110116

111-
- Redis 数据库服务器费用:$40 USD
112-
- 域名费用:$15 USD
113-
- 总计:约 ¥390 CNY
117+
- Redis 数据库服务器:$40 USD
118+
- 域名:$15 USD
119+
- 合计:约 ¥390 CNY
114120

115-
随着项目规模扩大,我希望能得到您的支持。
121+
随着项目规模扩大,希望能得到你的支持。
122+
</details>
116123

117124
</details>
118125

119-
您可以支持我其他的项目,加入我的 [GPT Plus Share](https://gptplus.ca) GPT Plus 共享站,ChatGPT Plus 随心用。
126+
你也可以支持我的其他项目:
127+
128+
🎉 **ChatGPT Plus 会员,每月仅需 23.9 元!省下官网 20 美元/月**\
129+
👉 [立即体验 GPT Plus 共享站](https://www.gptplus.ca/home)
120130

121-
- ✅ 支持 OpenAI 最新所有模型,包括 `GPT-5`, `o3` 系列模型,支持高级图片生成
122-
-后台大量官方正版账号号池,随心使用
123-
-每月仅需低至 23.99 人民币,支持一天免费试用
124-
-无需梯子,国内免翻访问!
125-
-由 Evan 本人运营,售后保证,已稳定运行超过一年
131+
-**官方正版账号池**支持 GPT-5.2 / GPT-5.2 Pro 等最新模型,Sora 2 视频/图片生成
132+
-**国内直接访问**,无需梯子,即开即用
133+
-**免费试用一天**,满意再付款,零风险体验
134+
-高级语音对话 + 超高对话上限,随便问不心疼
135+
-运营两年老站,售后有保障,Evan 亲自维护
126136

127137
[![gpt-billboard](https://github.com/user-attachments/assets/e4b142ad-b48f-4ea1-828e-57a743f54d90)](https://www.gptplus.ca/home)
128138

139+
👨‍💻 **AI 编程助手,让效率翻倍!Arc Codex 一站式编程平台**\
140+
💰 注册即送 $5 美元额度,首月套餐仅 ¥35.9 起!\
141+
👉 [立即体验 Arc Codex](https://www.arccodex.com)
142+
143+
- ✅ 支持 GPT-5.3-codex 等最新编程模型,代码生成更精准
144+
- ✅ 每日 \$40 美元额度自动重置,月总额高达 \$1200,随便用不封顶
145+
- ✅ 标准版首月仅 15.9 元,远低于官网价,同时使用优惠码 `REDEFINE`,续费享 **8折** 优惠!
146+
- ✅ Evan 运营保障,不满意包退,无后顾之忧
147+
148+
[![arccodex-billboard](https://github.com/user-attachments/assets/6b1f49c9-9791-4466-8d1f-211b0c712633)](https://www.arccodex.com)
149+
129150
## Disclaimer
130151

131152
最终解释权归 EvanNotFound 所有。
132153

133154
## 自托管
134155

135-
Coming soon...
156+
完整文档整理中。当前仓库的自托管架构主要由以下部分组成:
157+
158+
- `apps/api`:Go 公共事件服务
159+
- `apps/web`:Next.js 管理后台与兼容层
160+
- Redis:核心计数存储
161+
162+
后续会补充更完整的部署说明。

0 commit comments

Comments
 (0)