lobehub-project-overview
SKILL.md
LobeHub Project Overview
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: π€―
Complete Tech Stack
| Category | Technology |
|---|---|
| Framework | Next.js 16 + React 19 |
| Routing | SPA inside Next.js with react-router-dom |
| Language | TypeScript |
| UI Components | @lobehub/ui, antd |
| CSS-in-JS | antd-style |
| Icons | lucide-react, @ant-design/icons |
| 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 |
Complete Project Structure
Monorepo using @lobechat/ namespace for workspace packages.
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/
β β βββ spa/ # SPA HTML template service
β β βββ [variants]/
β β βββ (auth)/ # Auth pages (SSR required)
β βββ routes/ # SPA page components (Vite)
β β βββ (main)/
β β βββ (mobile)/
β β βββ (desktop)/
β β βββ onboarding/
β β βββ share/
β βββ spa/ # SPA entry points and router config
β β βββ entry.web.tsx
β β βββ entry.mobile.tsx
β β βββ entry.desktop.tsx
β β βββ router/
β βββ 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)
Architecture Map
| Layer | Location |
|---|---|
| UI Components | src/components, src/features |
| SPA Pages | src/routes/ |
| React Router | src/spa/router/ |
| Global Providers | src/layout |
| Zustand Stores | src/store |
| Client Services | src/services/ |
| REST API | src/app/(backend)/webapi |
| tRPC Routers | src/server/routers/{async|lambda|mobile|tools} |
| Server Services | src/server/services (can access DB) |
| Server Modules | src/server/modules (no DB access) |
| Feature Flags | src/server/featureFlags |
| Global Config | src/server/globalConfig |
| DB Schema | packages/database/src/schemas |
| DB Model | packages/database/src/models |
| DB Repository | packages/database/src/repositories |
| Third-party | src/libs (analytics, oidc, etc.) |
| Builtin Tools | src/tools, packages/builtin-tool-* |
| Cloud-only | src/business/*, packages/business/* |
Data Flow
React UI β Store Actions β Client Service β TRPC Lambda β Server Services β DB Model β PostgreSQL
Weekly Installs
2
First Seen
14 days ago
Installed on
claude-code1
codebuddy1