feat: support better-auth (#10215)

This commit is contained in:
YuTengjing
2025-11-27 20:10:40 +08:00
committed by GitHub
parent ef6809461b
commit dc62cc969d
116 changed files with 14959 additions and 1271 deletions
+16 -1
View File
@@ -5,7 +5,22 @@ alwaysApply: false
# Database Migrations Guide
## Defensive Programming - Use Idempotent Clauses
## Step1: Generate migrations:
```bash
bun run db:generate
```
this step will generate or update the following files:
- packages/database/migrations/0046_xxx.sql
- packages/database/migrations/meta/\_journal.json
## Step2: optimize the migration sql fileName
the migration sql file name is randomly generated, we need to optimize the file name to make it more readable and meaningful. For example, `0046_xxx.sql` -> `0046_better_auth.sql`
## Step3: Defensive Programming - Use Idempotent Clauses
Always use defensive clauses to make migrations idempotent:
+1 -1
View File
@@ -16,7 +16,7 @@ logo emoji: 🤯
## Project Technologies Stack
- Next.js 15
- Next.js 16
- react 19
- TypeScript
- `@lobehub/ui`, antd for component framework
+20 -2
View File
@@ -16,17 +16,28 @@ lobe-chat/
├── apps/
│ └── desktop/
├── docs/
│ ├── changelog/
│ ├── development/
│ ├── self-hosting/
│ └── usage/
├── locales/
│ ├── en-US/
│ └── zh-CN/
├── packages/
│ ├── agent-runtime/
│ ├── const/
│ ├── context-engine/
│ ├── conversation-flow/
│ ├── database/
│ │ ├── src/
│ │ │ ├── models/
│ │ │ ├── schemas/
│ │ │ └── repositories/
│ ├── electron-client-ipc/
│ ├── electron-server-ipc/
│ ├── fetch-sse/
│ ├── file-loaders/
│ ├── memory-extract/
│ ├── model-bank/
│ │ └── src/
│ │ └── aiModels/
@@ -34,11 +45,16 @@ lobe-chat/
│ │ └── src/
│ │ ├── core/
│ │ └── providers/
│ ├── obervability-otel/
│ ├── prompts/
│ ├── python-interpreter/
│ ├── ssrf-safe-fetch/
│ ├── types/
│ │ └── src/
│ │ ├── message/
│ │ └── user/
── utils/
── utils/
│ └── web-crawler/
├── public/
├── scripts/
├── src/
@@ -68,7 +84,9 @@ lobe-chat/
│ │ ├── AuthProvider/
│ │ └── GlobalProvider/
│ ├── libs/
│ │ ── oidc-provider/
│ │ ── better-auth/
│ │ ├── oidc-provider/
│ │ └── trpc/
│ ├── locales/
│ │ └── default/
│ ├── server/