project-overview
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLobeChat Project Overview
LobeChat 项目概览
Project Description
项目描述
Open-source, modern-design AI Agent Workspace: LobeHub (previously LobeChat).
Supported platforms:
- Web desktop/mobile
- Desktop (Electron)
- Mobile app (React Native) - coming soon
Logo emoji: 🤯
开源、现代设计的AI Agent工作区:LobeHub(前身为LobeChat)。
支持平台:
- Web端桌面/移动设备
- 桌面端(Electron)
- 移动端应用(React Native)- 即将推出
Logo表情: 🤯
Complete Tech Stack
完整技术栈
| Category | Technology |
|---|---|
| Framework | Next.js 16 + React 19 |
| Routing | SPA inside Next.js with |
| Language | TypeScript |
| UI Components | |
| CSS-in-JS | antd-style |
| Icons | lucide-react, |
| i18n | react-i18next |
| State | zustand |
| URL Params | nuqs |
| Data Fetching | SWR |
| React Hooks | aHooks |
| Date/Time | dayjs |
| Utilities | es-toolkit |
| API | TRPC (type-safe) |
| Database | Neon PostgreSQL + Drizzle ORM |
| Testing | Vitest |
| 分类 | 技术 |
|---|---|
| 框架 | Next.js 16 + React 19 |
| 路由 | Next.js 内置SPA,使用 |
| 语言 | TypeScript |
| UI组件 | |
| CSS-in-JS | antd-style |
| 图标 | lucide-react, |
| 国际化 | react-i18next |
| 状态管理 | zustand |
| URL参数 | nuqs |
| 数据获取 | SWR |
| React Hooks | aHooks |
| 日期/时间 | dayjs |
| 工具库 | es-toolkit |
| API | TRPC(类型安全) |
| 数据库 | Neon PostgreSQL + Drizzle ORM |
| 测试 | Vitest |
Complete Project Structure
完整项目结构
Monorepo using namespace for workspace packages.
@lobechat/lobe-chat/
├── apps/
│ └── desktop/ # Electron desktop app
├── docs/
│ ├── changelog/
│ ├── development/
│ ├── self-hosting/
│ └── usage/
├── locales/
│ ├── en-US/
│ └── zh-CN/
├── packages/
│ ├── agent-runtime/ # Agent runtime
│ ├── builtin-agents/
│ ├── builtin-tool-*/ # Builtin tool packages
│ ├── business/ # Cloud-only business logic
│ │ ├── config/
│ │ ├── const/
│ │ └── model-runtime/
│ ├── config/
│ ├── const/
│ ├── context-engine/
│ ├── conversation-flow/
│ ├── database/
│ │ └── src/
│ │ ├── models/
│ │ ├── schemas/
│ │ └── repositories/
│ ├── desktop-bridge/
│ ├── edge-config/
│ ├── editor-runtime/
│ ├── electron-client-ipc/
│ ├── electron-server-ipc/
│ ├── fetch-sse/
│ ├── file-loaders/
│ ├── memory-user-memory/
│ ├── model-bank/
│ ├── model-runtime/
│ │ └── src/
│ │ ├── core/
│ │ └── providers/
│ ├── observability-otel/
│ ├── prompts/
│ ├── python-interpreter/
│ ├── ssrf-safe-fetch/
│ ├── types/
│ ├── utils/
│ └── web-crawler/
├── src/
│ ├── app/
│ │ ├── (backend)/
│ │ │ ├── api/
│ │ │ ├── f/
│ │ │ ├── market/
│ │ │ ├── middleware/
│ │ │ ├── oidc/
│ │ │ ├── trpc/
│ │ │ └── webapi/
│ │ ├── [variants]/
│ │ │ ├── (auth)/
│ │ │ ├── (main)/
│ │ │ ├── (mobile)/
│ │ │ ├── onboarding/
│ │ │ └── router/
│ │ └── desktop/
│ ├── business/ # Cloud-only (client/server)
│ │ ├── client/
│ │ ├── locales/
│ │ └── server/
│ ├── components/
│ ├── config/
│ ├── const/
│ ├── envs/
│ ├── features/
│ ├── helpers/
│ ├── hooks/
│ ├── layout/
│ │ ├── AuthProvider/
│ │ └── GlobalProvider/
│ ├── libs/
│ │ ├── better-auth/
│ │ ├── oidc-provider/
│ │ └── trpc/
│ ├── locales/
│ │ └── default/
│ ├── server/
│ │ ├── featureFlags/
│ │ ├── globalConfig/
│ │ ├── modules/
│ │ ├── routers/
│ │ │ ├── async/
│ │ │ ├── lambda/
│ │ │ ├── mobile/
│ │ │ └── tools/
│ │ └── services/
│ ├── services/
│ ├── store/
│ │ ├── agent/
│ │ ├── chat/
│ │ └── user/
│ ├── styles/
│ ├── tools/
│ ├── types/
│ └── utils/
└── e2e/ # E2E tests (Cucumber + Playwright)使用命名空间的单仓库(Monorepo)工作区包。
@lobechat/lobe-chat/
├── apps/
│ └── desktop/ # Electron桌面应用
├── docs/
│ ├── changelog/
│ ├── development/
│ ├── self-hosting/
│ └── usage/
├── locales/
│ ├── en-US/
│ └── zh-CN/
├── packages/
│ ├── agent-runtime/ # Agent运行时
│ ├── builtin-agents/
│ ├── builtin-tool-*/ # 内置工具包
│ ├── business/ # 仅云端业务逻辑
│ │ ├── config/
│ │ ├── const/
│ │ └── model-runtime/
│ ├── config/
│ ├── const/
│ ├── context-engine/
│ ├── conversation-flow/
│ ├── database/
│ │ └── src/
│ │ ├── models/
│ │ ├── schemas/
│ │ └── repositories/
│ ├── desktop-bridge/
│ ├── edge-config/
│ ├── editor-runtime/
│ ├── electron-client-ipc/
│ ├── electron-server-ipc/
│ ├── fetch-sse/
│ ├── file-loaders/
│ ├── memory-user-memory/
│ ├── model-bank/
│ ├── model-runtime/
│ │ └── src/
│ │ ├── core/
│ │ └── providers/
│ ├── observability-otel/
│ ├── prompts/
│ ├── python-interpreter/
│ ├── ssrf-safe-fetch/
│ ├── types/
│ ├── utils/
│ └── web-crawler/
├── src/
│ ├── app/
│ │ ├── (backend)/
│ │ │ ├── api/
│ │ │ ├── f/
│ │ │ ├── market/
│ │ │ ├── middleware/
│ │ │ ├── oidc/
│ │ │ ├── trpc/
│ │ │ └── webapi/
│ │ ├── [variants]/
│ │ │ ├── (auth)/
│ │ │ ├── (main)/
│ │ │ ├── (mobile)/
│ │ │ ├── onboarding/
│ │ │ └── router/
│ │ └── desktop/
│ ├── business/ # 仅云端(客户端/服务端)
│ ├── components/
│ ├── config/
│ ├── const/
│ ├── envs/
│ ├── features/
│ ├── helpers/
│ ├── hooks/
│ ├── layout/
│ │ ├── AuthProvider/
│ │ └── GlobalProvider/
│ ├── libs/
│ │ ├── better-auth/
│ │ ├── oidc-provider/
│ │ └── trpc/
│ ├── locales/
│ │ └── default/
│ ├── server/
│ │ ├── featureFlags/
│ │ ├── globalConfig/
│ │ ├── modules/
│ │ ├── routers/
│ │ │ ├── async/
│ │ │ ├── lambda/
│ │ │ ├── mobile/
│ │ │ └── tools/
│ │ └── services/
│ ├── services/
│ ├── store/
│ │ ├── agent/
│ │ ├── chat/
│ │ └── user/
│ ├── styles/
│ ├── tools/
│ ├── types/
│ └── utils/
└── e2e/ # 端到端测试(Cucumber + Playwright)Architecture Map
架构映射
| Layer | Location |
|---|---|
| UI Components | |
| Global Providers | |
| Zustand Stores | |
| Client Services | |
| REST API | |
| tRPC Routers | |
| Server Services | |
| Server Modules | |
| Feature Flags | |
| Global Config | |
| DB Schema | |
| DB Model | |
| DB Repository | |
| Third-party | |
| Builtin Tools | |
| Cloud-only | |
| 层级 | 位置 |
|---|---|
| UI组件 | |
| 全局提供者 | |
| Zustand状态存储 | |
| 客户端服务 | |
| REST API | |
| tRPC路由 | |
| 服务端服务 | |
| 服务端模块 | |
| 功能标志 | |
| 全局配置 | |
| 数据库Schema | |
| 数据库模型 | |
| 数据库仓库 | |
| 第三方集成 | |
| 内置工具 | |
| 仅云端功能 | |
Data Flow
数据流
React UI → Store Actions → Client Service → TRPC Lambda → Server Services → DB Model → PostgreSQLReact UI → Store Actions → Client Service → TRPC Lambda → Server Services → DB Model → PostgreSQL