From 074ac71b209808442d25085547a4d75d1c95d194 Mon Sep 17 00:00:00 2001 From: lintsinghua Date: Tue, 11 Nov 2025 17:22:50 +0800 Subject: [PATCH] docs(readme): Update deployment and database mode documentation - Clarify database mode details in both README.md and README_EN.md - Highlight default local database mode (IndexedDB) usage - Remove redundant recommendation for local database configuration - Add explanation of Supabase cloud database option - Update notes about Vercel deployment and backend API - Modify vercel.json to set default local database environment variable --- README.md | 6 +++++- README_EN.md | 6 +++++- vercel.json | 5 +++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 426f158..02d69ea 100644 --- a/README.md +++ b/README.md @@ -124,9 +124,13 @@ vercel --prod - ✅ 支持自定义域名 - ✅ 自动部署(Git 推送后自动更新) +**✨ 数据库模式**: +- 默认自动使用**本地数据库模式**(IndexedDB),数据存储在浏览器中 +- 无需配置任何数据库,开箱即用 +- 如需使用 Supabase 云端数据库,可在环境变量中配置 + **⚠️ 注意事项**: - Vercel 主要用于前端部署,后端 API 需单独部署 -- 推荐使用本地数据库模式(`VITE_USE_LOCAL_DB=true`) - 部署后可在 `/admin` 页面进行运行时配置 --- diff --git a/README_EN.md b/README_EN.md index abd0d1a..8fd235d 100644 --- a/README_EN.md +++ b/README_EN.md @@ -124,9 +124,13 @@ vercel --prod - ✅ Custom domain support - ✅ Automatic deployment (auto-update on Git push) +**✨ Database Mode**: +- Automatically uses **local database mode** (IndexedDB) by default, data stored in browser +- No database configuration needed, ready to use out of the box +- To use Supabase cloud database, configure environment variables + **⚠️ Important Notes**: - Vercel is primarily for frontend deployment; backend APIs need separate deployment -- Recommended to use local database mode (`VITE_USE_LOCAL_DB=true`) - After deployment, configure runtime settings at `/admin` page --- diff --git a/vercel.json b/vercel.json index 7fc1909..f514bd5 100644 --- a/vercel.json +++ b/vercel.json @@ -3,6 +3,11 @@ "buildCommand": "npm run build", "outputDirectory": "dist", "framework": "vite", + "build": { + "env": { + "VITE_USE_LOCAL_DB": "true" + } + }, "rewrites": [ { "source": "/(.*)",