Agent Skills: LobeHub Project Overview

Complete project architecture and structure guide. Use when exploring the codebase, understanding project organization, finding files, or needing comprehensive architectural context. Triggers on architecture questions, directory navigation, or project overview needs.

UncategorizedID: lobehub/lobehub/project-overview

Repository

lobehubLicense: NOASSERTION
74,28214,834

Install this agent skill to your local

pnpm dlx add-skill https://github.com/lobehub/lobehub/tree/HEAD/.agents/skills/project-overview

Skill Files

Browse the full folder contents for project-overview.

Download Skill

Loading file tree…

.agents/skills/project-overview/SKILL.md

Skill Metadata

Name
project-overview
Description
Complete project architecture and structure guide. Use when exploring the codebase, understanding project organization, finding files, or needing comprehensive architectural context. Triggers on architecture questions, directory navigation, or project overview needs.

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.

lobehub/
β”œβ”€β”€ 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