一個整合國際運動禁藥案例的互動式知識平台,提供案例搜尋、數據視覺化和教育功能。
- 案例資料庫:完整的運動禁藥案例資料,包含運動員資訊、禁用物質、處罰結果等
- 智慧搜尋:支援多條件篩選和全文搜尋
- 數據視覺化:年度趨勢、運動項目分布、禁藥類型統計等圖表
- 教育專區:禁藥知識介紹、互動測驗、延伸閱讀
- 案例比較:選擇兩個案例進行詳細對比分析
- React 19 + Vite
- React Router v6
- Tailwind CSS
- Chart.js
- Axios
- Node.js + Express
- MongoDB + Mongoose
- RESTful API
- Node.js 16+
- MongoDB
- npm 或 yarn
git clone [repository-url]
cd sports-doping-platform# 安裝根目錄套件
npm install
# 安裝前後端套件
npm run install-all在 backend 目錄下創建 .env 檔案(如果尚未存在):
PORT=5000
MONGODB_URI=mongodb://localhost:27017/sports-doping-db
JWT_SECRET=your-secret-key-change-this-in-production確保 MongoDB 正在運行:
# macOS/Linux
mongod
# 或使用 MongoDB as a Servicenpm run seed開發模式(同時啟動前後端):
npm run dev前端將在 http://localhost:5173 運行 後端 API 將在 http://localhost:5000 運行
GET /api/cases- 獲取案例列表(支援篩選和分頁)GET /api/cases/:id- 獲取單一案例詳情POST /api/cases- 新增案例PUT /api/cases/:id- 更新案例DELETE /api/cases/:id- 刪除案例GET /api/cases/filters/options- 獲取篩選選項POST /api/cases/compare- 比較兩個案例
GET /api/stats/yearly-trends- 年度趨勢GET /api/stats/sport-distribution- 運動項目分布GET /api/stats/substance-distribution- 禁藥類型分布GET /api/stats/nationality-distribution- 國家分布GET /api/stats/punishment-stats- 處罰統計GET /api/stats/overview- 總覽統計
GET /api/education/substances- 禁藥物質資訊GET /api/education/quizzes- 互動測驗題目POST /api/education/quizzes/:id/answer- 提交測驗答案GET /api/education/articles- 教育文章列表
sports-doping-platform/
├── backend/ # 後端服務
│ ├── models/ # 資料模型
│ ├── routes/ # API 路由
│ ├── server.js # 主伺服器檔案
│ └── seedData.js # 資料導入腳本
├── frontend/ # 前端應用
│ ├── src/
│ │ ├── components/ # React 元件
│ │ ├── pages/ # 頁面元件
│ │ ├── services/ # API 服務
│ │ └── App.jsx # 主應用元件
│ └── package.json
└── package.json # 根目錄套件設定
# 安裝所有套件
npm run install-all
# 開發模式
npm run dev
# 生產模式
npm run start
# 建置前端
npm run build
# 導入範例資料
npm run seed- Chrome (最新版)
- Firefox (最新版)
- Safari (最新版)
- Edge (最新版)
MIT License