Skillsproject-overview
P

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.

lobehub
70.7k stars
1414k downloads
Updated 5d ago

Readme

project-overview follows the SKILL.md standard. Use the install command to add it to your agent stack.

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

# LobeChat 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/
│   │   ā”œā”€ā”€ [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)
```

## Architecture Map

| Layer | Location |
|-------|----------|
| UI Components | `src/components`, `src/features` |
| 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
```

Install

Requires askill CLI v1.0+

Metadata

LicenseUnknown
Version-
Updated5d ago
Publisherlobehub

Tags

apidatabasesecurity