個人投資組合追蹤工具,支援台股、美股與加密貨幣的即時價格追蹤與歷史走勢分析。
- 📊 即時價格追蹤 - 自動更新台股、美股與比特幣價格
- 📈 歷史曲線圖 - 查看過去 30 天的價格走勢
- 💰 資產總覽 - 一目了然的投資組合價值與報酬率
- 📱 響應式設計 - 完美支援手機、平板與桌面
- ⚡ 快速載入 - Next.js 16 + SSR,< 1 秒載入
- 🎨 現代化 UI - Tailwind CSS + shadcn/ui
npm install複製 .env.example 為 .env.local:
cp .env.example .env.local注意: 本專案主要使用免費的 Yahoo Finance API,不需要 API Key 即可運行!
編輯 lib/config.ts,修改你的持股:
export const PORTFOLIO_CONFIG: PortfolioConfig = {
holdings: [
{
symbol: '2330',
name: '台積電',
shares: 46,
exchange: 'TPE',
currency: 'TWD',
market: 'TAIWAN'
},
// ... 新增你的持股
],
totalCostTWD: 200000 // 總成本(台幣)
};npm run dev開啟瀏覽器訪問 http://localhost:3000
etf-tracker/
├── app/ # Next.js App Router
│ ├── api/ # API 路由
│ ├── charts/ # 圖表頁面
│ ├── page.tsx # 首頁儀表板
│ └── layout.tsx # 全域 Layout
├── components/ # React 元件
│ └── ui/ # UI 元件 (shadcn/ui)
├── lib/ # 核心邏輯
│ ├── config.ts # 投資組合設定
│ ├── api-client.ts # API 客戶端
│ └── utils/ # 工具函數
└── public/ # 靜態資源
- 框架: Next.js 16 (App Router)
- 語言: TypeScript
- 樣式: Tailwind CSS
- UI 元件: shadcn/ui
- 圖表: TradingView Lightweight Charts
- 部署: Vercel
| 資料類型 | API 來源 | 免費額度 | 需要 API Key |
|---|---|---|---|
| 美股即時價格 | Yahoo Finance | 無限制 | ❌ 不需要 |
| 台股即時價格 | Yahoo Finance | 無限制 | ❌ 不需要 |
| BTC 價格 | Kraken / Coinbase / Blockchain.info | 無限制 | ❌ 不需要 |
| USD/TWD 匯率 | ExchangeRate-API | 1500 次/月 | ❌ 不需要 |
✨ 完全免費,無需註冊任何 API Key!
- 推送程式碼到 GitHub
- 前往 Vercel Dashboard
- 點擊 "Import Project"
- 選擇你的 GitHub 儲存庫
- 無需設定任何環境變數
- 點擊 Deploy!
npm install -g vercel
vercel login
vercel編輯 tailwind.config.ts 的顏色設定:
theme: {
extend: {
colors: {
primary: {
DEFAULT: "hsl(242 79% 69%)", // 主色調
// ...
},
},
},
},編輯 lib/config.ts:
export const CACHE_CONFIG = {
prices: {
revalidate: 60, // 秒
},
// ...
};- ✅ 完全不需要 API Key - 使用公開免費的 Yahoo Finance API
- ✅ 無個人資料收集 - 所有持股資訊僅存於本地設定檔
- ✅ 開源透明 - 所有程式碼公開可查
- ✅ 隱私優先 -
.env.local和個人設定不會被提交到 Git
MIT License - 自由使用與修改
Made with 🦔 by Stan Shih
- Email: stan@stan-shih.com
- Dcard: @stantheman
- Instagram: @shijin.store