chore: Remove unused secret/ scaffolding
The project has no runtime or compile-time secrets (offline desktop tool, no DB/API keys), so the secret/ folder held only example launch scripts that were never used. Remove it and the related .gitignore rules; trim references in ARCHITECTURE.md and CLAUDE.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -5,12 +5,6 @@ publish/
|
||||
*.user
|
||||
.vs/
|
||||
|
||||
# secret/ 全部忽略,但保留 README 與範本
|
||||
secret/*
|
||||
!secret/README.md
|
||||
!secret/*.example
|
||||
!secret/.gitkeep
|
||||
|
||||
# AI 協作素材不入 git
|
||||
For_AI/
|
||||
|
||||
|
||||
+4
-12
@@ -78,17 +78,12 @@ STPViewer/
|
||||
├── CLAUDE.md # 專案記憶 & 給 Claude 的指令
|
||||
├── README.md # 快速上手
|
||||
├── ARCHITECTURE.md # 本文件
|
||||
├── .gitignore # 含 secret/ 與 For_AI/ 規則
|
||||
├── .gitignore # For_AI/ + *.stp/*.step(客戶料號)規則
|
||||
│
|
||||
├── docs/
|
||||
│ ├── decisions/ # 技術決策紀錄(ADR)
|
||||
│ └── runbooks/ # 操作手冊
|
||||
│
|
||||
├── secret/ # 🚫 gitignored(README.md / *.example 除外)
|
||||
│ ├── README.md
|
||||
│ ├── run-STPViewer.ps1.example
|
||||
│ └── run-STPViewer.sh.example
|
||||
│
|
||||
├── For_AI/ # 🚫 gitignored — AI 協作素材 + 測試模型 *.stp(客戶料號不入 git)
|
||||
│
|
||||
├── STPViewer.sln
|
||||
@@ -203,12 +198,9 @@ class MeasurementResult
|
||||
|
||||
## Security Considerations
|
||||
|
||||
- 純離線桌面工具,無網路、無帳號、無資料庫
|
||||
- 本專案目前無任何 runtime secret;`secret/` 仍依專案慣例建立:
|
||||
- `secret/*` 全部 gitignore,僅 `README.md`、`*.example` 進 git
|
||||
- `run-STPViewer.*.example` 為啟動腳本範本(本專案無 DB/ApiKey,腳本僅做 build+run)
|
||||
- 無 compile-time secret → 不需 `publish-*.example` 腳本
|
||||
- `For_AI/` 收 AI 協作素材(截圖、筆記),整夾 gitignore
|
||||
- 純離線桌面工具,無網路、無帳號、無資料庫、無任何 runtime / compile-time secret(故未建 `secret/` 資料夾)
|
||||
- `For_AI/` 收 AI 協作素材(截圖、筆記)+ 測試模型 `*.stp`(客戶料號),整夾 gitignore
|
||||
- `*.stp` / `*.step` 全域 gitignore:客戶 CAD 料號檔不入 git,避免外流
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -82,8 +82,7 @@ dotnet publish src/STPViewer -c Release -o publish/STPViewer
|
||||
`--align-test`(三點對齊剛體變換 + ModOp↔Matrix3D 一致性)、`--make-dxf`(產測試檔)
|
||||
- **絕不要用 PowerShell regex/Set-Content 改 .cs 檔** — Windows PowerShell 5.1 預設編碼會把 UTF-8 中文弄成亂碼(已踩過,靠反編譯 DLL 救回)。文字取代一律用 Edit 工具
|
||||
|
||||
## secret/ 與 For_AI/
|
||||
## For_AI/
|
||||
|
||||
- `secret/`:本機敏感資料集中地,`secret/*` gitignored(`README.md`、`*.example` 除外)。
|
||||
本專案無 runtime secret,僅有啟動腳本範本。
|
||||
- `For_AI/`:AI 協作素材(截圖、草稿),整夾 gitignored。
|
||||
- `For_AI/`:AI 協作素材(截圖、草稿)+ 測試模型 `*.stp`(客戶料號),整夾 gitignored。
|
||||
- 本專案無 runtime secret(離線桌面工具,無 DB/ApiKey),故未保留 `secret/` 資料夾。
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
# secret/ — 本機敏感資料集中地
|
||||
|
||||
本資料夾除 `README.md` 與 `*.example` 外全部 gitignored(規則見根目錄 `.gitignore`)。
|
||||
|
||||
## 內含物件
|
||||
|
||||
| 檔案 | git | 用途 |
|
||||
|---|---|---|
|
||||
| `README.md` | ✅ committed | 本說明 |
|
||||
| `run-STPViewer.ps1.example` | ✅ committed | Windows 啟動腳本範本 |
|
||||
| `run-STPViewer.sh.example` | ✅ committed | Git Bash 啟動腳本範本 |
|
||||
| `run-STPViewer.ps1` / `.sh` | 🚫 ignored | 從範本複製後的本機實值版 |
|
||||
|
||||
> STPViewer 為離線桌面工具,目前**沒有任何 DB 密碼 / ApiKey**;
|
||||
> 腳本僅做 build + run。未來若加入需要 secret 的功能(雲端授權、回報伺服器等),
|
||||
> 依範本內註解加上 env var 注入。
|
||||
|
||||
## 第一次使用
|
||||
|
||||
```powershell
|
||||
cd secret
|
||||
Copy-Item run-STPViewer.ps1.example run-STPViewer.ps1
|
||||
.\run-STPViewer.ps1
|
||||
```
|
||||
@@ -1,31 +0,0 @@
|
||||
# ══════════════════════════════════════════════════════════════════
|
||||
# run-STPViewer.ps1 範本
|
||||
#
|
||||
# 第一次 clone 下來:
|
||||
# cd secret
|
||||
# Copy-Item run-STPViewer.ps1.example run-STPViewer.ps1
|
||||
# .\run-STPViewer.ps1
|
||||
#
|
||||
# 若 PowerShell 擋執行 script,執行一次:
|
||||
# Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
|
||||
#
|
||||
# secret/ 下除 README.md 和 .example 外皆已 gitignore。
|
||||
# ══════════════════════════════════════════════════════════════════
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
# ─── secret(本專案目前無 DB / ApiKey;未來需要時在此加 env var) ──
|
||||
# $env:SomeService__ApiKey = '__CHANGE_ME__'
|
||||
|
||||
# ══════════════════════════════════════════════════════════════════
|
||||
|
||||
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
$RepoRoot = Resolve-Path (Join-Path $ScriptDir '..')
|
||||
|
||||
Push-Location $RepoRoot
|
||||
try {
|
||||
dotnet run --project src/STPViewer
|
||||
}
|
||||
finally {
|
||||
Pop-Location
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# ══════════════════════════════════════════════════════════════════
|
||||
# run-STPViewer.sh 範本(Git Bash on Windows)
|
||||
#
|
||||
# 第一次 clone 下來:
|
||||
# cd secret
|
||||
# cp run-STPViewer.sh.example run-STPViewer.sh
|
||||
# chmod +x run-STPViewer.sh
|
||||
# ./run-STPViewer.sh
|
||||
#
|
||||
# secret/ 下除 README.md 和 .example 外皆已 gitignore。
|
||||
# ══════════════════════════════════════════════════════════════════
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# ─── secret(本專案目前無 DB / ApiKey;未來需要時在此 export) ────
|
||||
# export SomeService__ApiKey="__CHANGE_ME__"
|
||||
|
||||
# ══════════════════════════════════════════════════════════════════
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
REPO_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
|
||||
|
||||
cd "${REPO_ROOT}"
|
||||
exec dotnet run --project src/STPViewer
|
||||
Reference in New Issue
Block a user