Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# 貢獻指南

感謝你有興趣參與 Zipkit 的開發!以下說明如何開始。

## 環境需求

- [Node.js](https://nodejs.org/) 20+
- [pnpm](https://pnpm.io/) 10+

## 開始開發

```bash
# Fork 並 clone 專案
git clone https://github.com/<your-username>/zipkit.git
cd zipkit

# 安裝依賴
pnpm install

# 啟動開發伺服器
pnpm dev
```

## 開發流程

1. 從 `main` 分支建立新分支,分支名稱應簡潔描述變更內容
2. 進行修改
3. 確認通過檢查:
```bash
pnpm lint
pnpm format:check
pnpm build
```
4. 提交變更並推送至你的 fork
5. 建立 Pull Request

## Commit 規範

本專案使用 [Conventional Commits](https://www.conventionalcommits.org/) 格式:

```
<type>(<scope>): <description>
```

常用 type:

| Type | 說明 |
| ---------- | ---------------------- |
| `feat` | 新功能 |
| `fix` | 修復問題 |
| `refactor` | 重構(不影響功能) |
| `style` | 格式調整(不影響邏輯) |
| `build` | 建置系統或依賴變更 |
| `ci` | CI 設定變更 |
| `docs` | 文件更新 |

## Pull Request 規範

- 標題簡潔明確,使用 Conventional Commits 格式
- 說明變更的目的與做法
- 確保 CI 檢查全部通過

## 程式碼風格

- TypeScript strict mode
- ESLint + Prettier 自動格式化
- 提交前請執行 `pnpm lint` 和 `pnpm format:check`

## 回報問題

如果發現 bug 或有功能建議,歡迎透過 [Issues](https://github.com/ronload/zipkit/issues) 回報。
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 LUO YONG NENG

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
72 changes: 72 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Zipkit

台灣地址英譯與 3+3 郵遞區號查詢工具。

輸入中文地址,即時取得 UPU 格式英譯地址與六碼郵遞區號。純前端運作,所有資料皆為預先產生的靜態 JSON,無需後端 API。

## 功能

- 縣市、鄉鎮市區、路街逐級選擇
- 巷、弄、號、樓、室明細輸入
- 即時產出英譯地址(UPU 格式)
- 六碼郵遞區號(3+3)查詢
- 一鍵複製結果

## 技術棧

- [Next.js](https://nextjs.org/) 16 (App Router)
- [React](https://react.dev/) 19
- [Tailwind CSS](https://tailwindcss.com/) 4
- [shadcn/ui](https://ui.shadcn.com/)
- [TypeScript](https://www.typescriptlang.org/) 5
- [pnpm](https://pnpm.io/) 套件管理

## 快速開始

```bash
# 安裝依賴
pnpm install

# 啟動開發伺服器
pnpm dev
```

瀏覽器開啟 `http://localhost:3000` 即可使用。

## 指令

| 指令 | 說明 |
| ------------- | --------------------------- |
| `pnpm dev` | 啟動開發伺服器 |
| `pnpm build` | 正式環境建置 |
| `pnpm lint` | 執行 ESLint 檢查 |
| `pnpm format` | 格式化程式碼 |
| `pnpm etl` | 從原始資料重新產生靜態 JSON |

## 專案結構

```
src/
app/ # Next.js App Router 頁面
components/ # UI 元件
hooks/ # React hooks(地址狀態管理)
lib/ # 工具函式(郵遞區號比對、資料載入)
scripts/
etl.ts # ETL 資料轉換腳本
raw/ # 原始郵政資料(不納入版本控制)
public/
data/ # 預先產生的靜態 JSON
```

## 資料來源

本專案使用以下第三方開源資料:

- **地址中英對照** -- [donma/TaiwanAddressCityAreaRoadChineseEnglishJSON](https://github.com/donma/TaiwanAddressCityAreaRoadChineseEnglishJSON)
提供台灣縣市、鄉鎮市區、路街的中英文對照資料(`CityCountyData.json`、`AllData.json`)。
- **3+3 郵遞區號範圍** -- [中華郵政 3+3 郵遞區號查詢](https://www.post.gov.tw/post/internet/Download/index.jsp?ID=2292)
提供各地址區段對應的六碼郵遞區號範圍資料(`rall1.txt`)。

## 授權

本專案採用 [MIT License](LICENSE) 授權。
Loading