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
This commit is contained in:
lintsinghua 2025-11-11 17:22:50 +08:00
parent 67e050f0e0
commit 074ac71b20
3 changed files with 15 additions and 2 deletions

View File

@ -124,9 +124,13 @@ vercel --prod
- ✅ 支持自定义域名
- ✅ 自动部署Git 推送后自动更新)
**✨ 数据库模式**
- 默认自动使用**本地数据库模式**IndexedDB数据存储在浏览器中
- 无需配置任何数据库,开箱即用
- 如需使用 Supabase 云端数据库,可在环境变量中配置
**⚠️ 注意事项**
- Vercel 主要用于前端部署,后端 API 需单独部署
- 推荐使用本地数据库模式(`VITE_USE_LOCAL_DB=true`
- 部署后可在 `/admin` 页面进行运行时配置
---

View File

@ -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
---

View File

@ -3,6 +3,11 @@
"buildCommand": "npm run build",
"outputDirectory": "dist",
"framework": "vite",
"build": {
"env": {
"VITE_USE_LOCAL_DB": "true"
}
},
"rewrites": [
{
"source": "/(.*)",