🔗 Live Demo: https://lunar-reminder.tinglin.ovh/
自動轉換農曆日期為陽曆,整合 Google Calendar 提供智能提醒功能。
- 農曆轉陽曆自動轉換(支援閏月)
- Google 帳號登入(Firebase Auth)
- Google Calendar 整合與同步
- 多筆農曆日期管理(生日、紀念日、節日等)
- 初一、十五自動提醒
- 佛道教神明生日提醒
- 天赦日提醒(根據節氣與日柱干支自動計算)
- 可自訂提前提醒天數(1-30天)
- 每年/每月自動重複提醒
- 中文/英文語言切換
- 今日行程面板
| 層級 | 技術 |
|---|---|
| 前端 | React 19 + Vite 6 + Ant Design 5 |
| 認證 | Firebase Auth (Google OAuth) |
| 資料庫 | Cloud Firestore |
| 後端 | Firebase Cloud Functions v2 |
| 託管 | Firebase Hosting |
| 農曆轉換 | lunar-javascript(前端) |
- Node.js 20+
- Firebase CLI:
npm install -g firebase-tools - Firebase 專案(啟用 Firestore + Auth)
- 前往 Firebase Console 建立專案
- 啟用 Authentication > Google 登入
- 啟用 Cloud Firestore
- 在 Project Settings 取得 Web App 設定值
cp .env.example .env編輯 .env,填入 Firebase 設定:
VITE_FIREBASE_API_KEY=your_api_key
VITE_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your-project-id
VITE_FIREBASE_STORAGE_BUCKET=your-project.firebasestorage.app
VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
VITE_FIREBASE_APP_ID=your_app_id
編輯 .firebaserc,填入你的專案 ID:
{
"projects": {
"default": "your-firebase-project-id"
}
}npm run install-allnpm run dev瀏覽器開啟 http://localhost:5173
firebase login
npm run deploy如需 Google Calendar 同步功能:
- 在 Google Cloud Console 啟用 Calendar API
- 設定 Cloud Functions 環境變數:
firebase functions:config:set google.client_id="YOUR_CLIENT_ID" google.client_secret="YOUR_CLIENT_SECRET"- 部署 Cloud Functions:
npm run deploy:functionsusers/{uid}
├── email, name, photoURL
├── settings: { remindFirstDay, remindFifteenthDay, remindTianSheDay, defaultRemindDays, notificationEnabled }
└── reminders/{reminderId}
├── name, category, notes
├── lunarYear, lunarMonth, lunarDay
├── isLeapMonth, isRecurring, remindDaysBefore
├── googleCalendarEventId
└── isActive
npm run dev # 啟動開發伺服器
npm run build # 建置前端
npm run deploy # 建置並部署全部
npm run deploy:hosting # 只部署前端
npm run deploy:functions # 只部署 Cloud Functions
npm run deploy:rules # 只部署 Firestore 規則
npm run emulators # 啟動 Firebase 模擬器使用 Firebase Spark(免費)方案,包含:
- Firestore: 1GB 儲存 + 50K 讀/20K 寫/日
- Auth: 無限制
- Hosting: 10GB 儲存 + 360MB/日傳輸
- Cloud Functions: 2M 呼叫/月(需升級 Blaze 方案)
對於個人使用,免費額度綽綽有餘。