commit 272d0973bd0120d0f9bb7f38abdefe3e944d8d2a Author: Timmy Date: Tue Apr 21 13:49:12 2026 +0800 Initial commit diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..f0cc618 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,44 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## 專案性質 + +單檔靜態 HTML landing page 示範專案(虛構產品 `dotlog`),用於演繹 `DESIGN.md` 的設計規範。**無 build 系統、無 npm 依賴、無測試框架、非 git 倉庫**。文案、統計數字、GitHub 連結皆為假資料,不要當成真實產品資訊處理。 + +## 常用指令 + +```bash +# 本地預覽(推薦,避開 file:// 的字體 CORS) +python3 -m http.server 8000 +# 或直接開檔 +open index.html +``` + +重新產生 `screenshot-light.png` / `screenshot-dark.png`:README 有完整 Playwright (Python) 腳本。**關鍵陷阱**:全頁截圖前必須手動把所有 `.fade-up` 元素加上 `visible` class,否則下半部區塊會因 IntersectionObserver 尚未觸發而呈空白。 + +## 架構 + +只有三個檔案要理解: + +- **`DESIGN.md`** — 設計權威來源。色彩 token、字體、間距、圓角、各區塊版面、組件樣式(Button/Card/Badge/Code)、動態規範、可及性要求都在這裡。**改 `index.html` 樣式前先查這份**;設計決策衝突時以 `DESIGN.md` 為準,除非使用者明確要求偏離。 +- **`index.html`** — 全部 HTML + CSS + JS 都在單檔內,無外部 `.css` / `.js`。內部結構固定順序: + 1. ` + + + + + + +
+ + +
+
+

+ 把所有日誌管線
+ 串成一行 +

+

+ dotlog 是為工程師而生的 CLI 工具。一條指令完成擷取、過濾、聚合、輸出,取代雜亂的 shell pipeline 與多套 daemon。 +

+
+ ⭐ 1.2k Stars + · + 98% 測試通過 + · + MIT 授權 +
+ +
+
+ + +
+
+
+
Why dotlog
+

為什麼選擇 dotlog

+

不需要 YAML、不需要 daemon、不需要額外的容器。一支二進位檔,裝了就能用。

+
+
+
+ +

零配置啟動

+

裝了就跑,不需要設定檔。dotlog tap nginx 一行搞定。

+
+
+ +

全格式支援

+

JSON、syslog、Apache、Nginx、K8s events 自動偵測並結構化。

+
+
+ +

低資源佔用

+

Rust 撰寫,單一二進位檔 6MB,常駐記憶體不到 15MB。

+
+
+ +

原生輸出整合

+

直接送進 S3、Loki、OpenTelemetry、Kafka,無須轉接器。

+
+
+
+
+ + +
+
+
+
Quick Start
+

5 分鐘上手

+

四個指令,把你的伺服器日誌送到雲端。

+
+
+
+
01
+

安裝

+ brew install dotlog +
+
+
02
+

初始化

+ dotlog init +
+
+
03
+

指定來源

+ dotlog tap nginx +
+
+
04
+

串接輸出

+ dotlog pipe → s3 +
+
+
+
+ + +
+
+
+
Integrations
+

你正在用的工具,它都支援

+

開箱即用 60+ 種資料來源與 20+ 種輸出目標。

+
+
+
+

Web 伺服器

+
+ nginxapachecaddytraefik +
+
+
+

容器

+
+ dockerkubernetescontainerdpodman +
+
+
+

資料庫

+
+ postgresmysqlredismongo +
+
+
+

雲端服務

+
+ aws-s3gcscloudwatchazure-logs +
+
+
+

訊息佇列

+
+ kafkanatsrabbitmqsqs +
+
+
+

監控

+
+ lokidatadogotelprometheus +
+
+
+
+
+ + +
+
+
+
Core Pipeline
+

七個階段的完整流水線

+

每一階段都能被單獨替換、停用或擴充。

+
+
+
+
+ +
+ 01 + 擷取 +
+
+
+ +
+ 02 + 解析 +
+
+
+ +
+ 03 + 正規化 +
+
+
+ +
+ 04 + 路由 +
+
+
+ +
+ 05 + 過濾 +
+
+
+ +
+ 06 + 聚合 +
+
+
+ +
+ 07 + 輸出 +
+
+
+
+
+
+ + +
+
+
+
FAQ
+

常見問題

+
+
+
+ dotlog 的授權是什麼? +
採用 MIT 授權,商用、修改、再散布都沒有限制,無需付費。
+
+
+ 效能表現如何? +
在單一 vCPU 上可處理約 120k events/秒,約為 Fluentd 的 4 倍,記憶體佔用不到 1/5。
+
+
+ 與 Fluentd / Vector / Filebeat 有什麼差異? +
dotlog 強調 CLI 優先與零配置:用熟悉的 shell 就能組裝管線,無需學習自訂 DSL,也不需要部署守護程序。適合需要快速串接或臨時任務的場景。
+
+
+ 支援哪些部署方式? +
單一靜態二進位檔,直接在 macOS、Linux、Windows 執行;也提供官方 Docker image 與 Helm chart。
+
+
+ 資料會經過你們的伺服器嗎? +
完全不會。dotlog 是純本地執行的工具,所有日誌只在你指定的來源與輸出之間傳遞,專案本身不收集任何遙測資料(可用 --telemetry=off 再次關閉驗證)。
+
+
+
+
+ +
+ + + + + + + + diff --git a/screenshot-dark.png b/screenshot-dark.png new file mode 100644 index 0000000..3604423 Binary files /dev/null and b/screenshot-dark.png differ diff --git a/screenshot-light.png b/screenshot-light.png new file mode 100644 index 0000000..98e6728 Binary files /dev/null and b/screenshot-light.png differ