diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 8bcd0f7..b870aca 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -25,7 +25,17 @@ "Bash(python add_dept_relation.py:*)", "Bash(cat:*)", "Bash(python add_random_positions.py:*)", - "Bash(timeout /t 3 /nobreak)" + "Bash(timeout /t 3 /nobreak)", + "Bash(python -m json.tool:*)", + "Bash(python app.py:*)", + "Bash(tasklist:*)", + "Bash(findstr:*)", + "Bash(netstat:*)", + "Bash(powershell -Command \"Stop-Process -Id 44816,14404,45900 -Force\")", + "Bash(powershell -Command \"Get-Process python | Stop-Process -Force\")", + "Bash(python llm_config.py:*)", + "Bash(python:*)", + "Bash(mkdir:*)" ], "deny": [], "ask": [] diff --git a/.env.example b/.env.example index 6a01f91..aaec6b8 100644 --- a/.env.example +++ b/.env.example @@ -17,8 +17,8 @@ GITEA_TOKEN=your_gitea_access_token # ==================== LLM API Keys ==================== # Google Gemini API -GEMINI_API_KEY=your_gemini_api_key_here -GEMINI_MODEL=gemini-1.5-flash +GEMINI_API_KEY=AIzaSyDWD6TdXgtYyKvmGLF0RiN8AkbSF8eDnHY +GEMINI_MODEL=gemini-2.5-flash # DeepSeek API DEEPSEEK_API_KEY=your_deepseek_api_key_here @@ -28,6 +28,10 @@ DEEPSEEK_API_URL=https://api.deepseek.com/v1 OPENAI_API_KEY=your_openai_api_key_here OPENAI_API_URL=https://api.openai.com/v1 +# Ollama API +OLLAMA_API_URL=https://ollama_pjapi.theaken.com +OLLAMA_MODEL=deepseek-reasoner + # ==================== Flask Configuration ==================== FLASK_APP=start_server.py FLASK_ENV=development diff --git a/SDD_代碼分離優化.md b/SDD_代碼分離優化.md new file mode 100644 index 0000000..877d774 --- /dev/null +++ b/SDD_代碼分離優化.md @@ -0,0 +1,1120 @@ +# 軟體設計文件 (SDD) - 代碼分離優化 + +> **文件版本**: v1.0 +> **建立日期**: 2024-12-04 +> **專案名稱**: HR Position Management System +> **優化目標**: 將 CSS 和 JavaScript 從 index.html 分離 +> **狀態**: 📋 待決策階段 + +--- + +## 📋 目錄 + +1. [專案現況分析](#專案現況分析) +2. [優化目標與效益](#優化目標與效益) +3. [需要決策的事項](#需要決策的事項) +4. [建議的架構方案](#建議的架構方案) +5. [分離策略](#分離策略) +6. [風險評估](#風險評估) +7. [執行計畫](#執行計畫) +8. [驗收標準](#驗收標準) + +--- + +## 專案現況分析 + +### 📊 當前檔案結構 + +``` +d:\00001_Vibe_coding\1204剛為\ +├── index.html (約 4,700 行) ⚠️ 包含 HTML + CSS + JavaScript +├── login.html (約 470 行) ⚠️ 包含 HTML + CSS + JavaScript +├── hierarchical_data.js (已分離) ✅ 組織架構資料 +├── dropdown_data.js (已分離) ✅ 下拉選單資料 +├── app.py (Flask 後端) +├── .env (環境設定) +└── prompt.md (AI Prompt 文件) +``` + +### 📈 當前 index.html 組成分析 + +| 內容類型 | 預估行數 | 佔比 | 說明 | +|---------|---------|------|------| +| **HTML 結構** | ~1,500 行 | 32% | 5 個主要頁籤的表單結構 | +| **CSS 樣式** | ~700 行 | 15% | 內嵌於 ` + +
+| 事業體 | +處級單位 | +部級單位 | +崗位名稱 | +
|---|---|---|---|
| {row['事業體']} | +{row['處級單位'] if row['處級單位'] else ''} | +{row['部級單位'] if row['部級單位'] else ''} | +{row['崗位名稱']} | +