{"data":{"slug":"github-lobehub-lobehub-agents-skills-project-overview-a0d3531c8fe1","title":"LobeHub Project Overview","summary":"Explore the LobeHub open-source repository structure, including directory layouts, tech stack, and monorepo organization. This guide helps locate key components like UI, routing, and state management, and identifies core packages and services.","url":"https:\/\/skillshunter.net\/skills\/github-lobehub-lobehub-agents-skills-project-overview-a0d3531c8fe1","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-lobehub-lobehub-agents-skills-project-overview-a0d3531c8fe1","markdown_url":"https:\/\/skillshunter.net\/skills\/github-lobehub-lobehub-agents-skills-project-overview-a0d3531c8fe1.md","download_url":"https:\/\/skillshunter.net\/skills\/github-lobehub-lobehub-agents-skills-project-overview-a0d3531c8fe1\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Before exploring the project, ensure you have access to the LobeHub repository and run `ls` in the root directory to see the current set of packages and apps. The tech stack and directory structure may evolve over time, so always refer to the latest `package.json` for exact versions.","instructions":"---\nname: project-overview\ndescription: 'Use for the OSS repository map, code-layer lookup, apps\/packages\/src ownership and business stubs.'\nuser-invocable: false\n---\n\n# LobeHub Project Overview\n\n> The directory listings below are a **curated map of key locations**, not an\n> exhaustive tree. `packages\/`, `src\/store\/`, route groups etc. grow over time \u2014\n> run `ls` against the real directory for the current set.\n\n## Project Description\n\nOpen-source, modern-design AI Agent Workspace: **LobeHub** (previously LobeChat).\nThis repo is the **open-source root** (`github.com\/lobehub\/lobehub`, package `@lobehub\/lobehub`).\n\n**Supported platforms:**\n\n- Web desktop\/mobile\n- Desktop (Electron) \u2014 `apps\/desktop`\n- Mobile app (React Native) \u2014 **separate repo, already launched** (not in this monorepo)\n\n**Logo emoji:** \ud83e\udd2f\n\n## Complete Tech Stack\n\n| Category      | Technology                                 |\n| ------------- | ------------------------------------------ |\n| Framework     | Next.js 16 + React 19                      |\n| Routing       | SPA inside Next.js with `react-router-dom` |\n| Language      | TypeScript                                 |\n| UI Components | `@lobehub\/ui`                              |\n| CSS-in-JS     | `@lobehub\/ui` `createStaticStyles`         |\n| Icons         | lucide-react, `@ant-design\/icons`          |\n| i18n          | react-i18next                              |\n| State         | zustand                                    |\n| URL Params    | nuqs                                       |\n| Data Fetching | SWR                                        |\n| React Hooks   | aHooks                                     |\n| Date\/Time     | dayjs                                      |\n| Utilities     | es-toolkit                                 |\n| API           | TRPC (type-safe)                           |\n| Database      | Neon PostgreSQL + Drizzle ORM              |\n| Testing       | Vitest                                     |\n\n> Exact versions live in the root `package.json` \u2014 check there, not here.\n\n## Monorepo Layout\n\nFlat layout \u2014 `apps\/`, `packages\/`, and `src\/` all sit at the repo root. No\ngit submodules.\n\n```\n(repo root)\n\u251c\u2500\u2500 apps\/\n\u2502   \u251c\u2500\u2500 cli\/                  # LobeHub CLI\n\u2502   \u251c\u2500\u2500 desktop\/              # Electron desktop app\n\u2502   \u2514\u2500\u2500 server\/               # Next.js-backed server (`@\/server\/*` alias)\n\u2502       \u2514\u2500\u2500 src\/\n\u2502           \u251c\u2500\u2500 router-hono\/  # Hono endpoint routers and standalone runtime\n\u2502           \u2514\u2500\u2500 ...           # featureFlags, globalConfig, modules, routers, services, utils, workflows\n\u251c\u2500\u2500 docs\/                     # changelog, development, self-hosting, usage\n\u251c\u2500\u2500 locales\/                  # en-US, zh-CN, ...\n\u251c\u2500\u2500 packages\/                 # ~80 @lobechat\/* workspace packages \u2014 `ls` for the full set. Key ones:\n\u2502   \u251c\u2500\u2500 agent-runtime\/        # Agent runtime core\n\u2502   \u251c\u2500\u2500 agent-signal\/         # Agent Signal pipeline\n\u2502   \u251c\u2500\u2500 agent-tracing\/        # Tracing \/ snapshots\n\u2502   \u251c\u2500\u2500 builtin-tool-*\/       # Per-tool packages (calculator, web-browsing, claude-code, ...)\n\u2502   \u251c\u2500\u2500 builtin-tools\/        # Central registries that compose builtin-tool-*\n\u2502   \u251c\u2500\u2500 context-engine\/\n\u2502   \u251c\u2500\u2500 database\/             # src\/{models,schemas,repositories}\n\u2502   \u251c\u2500\u2500 model-bank\/           # Model definitions & provider cards\n\u2502   \u251c\u2500\u2500 model-runtime\/        # src\/{core,providers}\n\u2502   \u251c\u2500\u2500 locales\/              # i18n source of truth: packages\/locales\/src\/default\/\n\u2502   \u251c\u2500\u2500 env\/                  # env schemas (@\/envs\/* \u2192 packages\/env\/src\/*)\n\u2502   \u251c\u2500\u2500 app-config\/\n\u2502   \u251c\u2500\u2500 business\/             # Open-source stubs (config, const, model-bank, model-runtime) \u2014 overridden by cloud\n\u2502   \u251c\u2500\u2500 types\/\n\u2502   \u2514\u2500\u2500 utils\/\n\u2514\u2500\u2500 src\/\n    \u251c\u2500\u2500 app\/\n    \u2502   \u251c\u2500\u2500 (backend)\/        # api, f, market, middleware, oidc, trpc, webapi\n    \u2502   \u251c\u2500\u2500 spa\/              # SPA HTML template service\n    \u2502   \u2514\u2500\u2500 spa-auth\/         # Auth HTML shell (SSR)\n    \u251c\u2500\u2500 routes\/               # SPA page segments (thin \u2014 delegate to features\/)\n    \u2502   \u2514\u2500\u2500 (main)\/ (mobile)\/ (desktop)\/ (popup)\/ auth\/ onboarding\/ share\/\n    \u251c\u2500\u2500 spa\/                  # SPA entries + router config\n    \u2502   \u251c\u2500\u2500 entry.{web,mobile,desktop,popup}.tsx\n    \u2502   \u2514\u2500\u2500 router\/\n    \u251c\u2500\u2500 business\/             # Open-source stubs (client\/server) \u2014 cloud repo provides real impls\n    \u251c\u2500\u2500 features\/             # Domain business components\n    \u251c\u2500\u2500 store\/                # ~30 zustand stores \u2014 `ls` for the full set\n    \u2514\u2500\u2500 ...                   # components, hooks, layout, libs, services, types, utils\n```\n\n## Architecture Map\n\n| Layer            | Location                                                 |\n| ---------------- | -------------------------------------------------------- |\n| UI Components    | `src\/components`, `src\/features`                         |\n| SPA Pages        | `src\/routes\/`                                            |\n| React Router     | `src\/spa\/router\/`                                        |\n| Global Providers | `src\/layout`                                             |\n| Zustand Stores   | `src\/store`                                              |\n| Client Services  | `src\/services\/`                                          |\n| REST API         | `src\/app\/(backend)\/webapi`                               |\n| tRPC Routers     | `apps\/server\/src\/routers\/{async\\|lambda\\|mobile\\|tools}` |\n| Server Services  | `apps\/server\/src\/services` (can access DB)               |\n| Server Modules   | `apps\/server\/src\/modules` (no DB access)                 |\n| Feature Flags    | `apps\/server\/src\/featureFlags`                           |\n| Global Config    | `apps\/server\/src\/globalConfig`                           |\n| DB Schema        | `packages\/database\/src\/schemas`                          |\n| DB Model         | `packages\/database\/src\/models`                           |\n| DB Repository    | `packages\/database\/src\/repositories`                     |\n| Third-party      | `src\/libs` (analytics, oidc, etc.)                       |\n| Builtin Tools    | `packages\/builtin-tool-*`, `packages\/builtin-tools`      |\n| Open-source stub | `src\/business\/*`, `packages\/business\/*` (this repo)      |\n\n## Data Flow\n\n```\nReact UI \u2192 Store Actions \u2192 Client Service \u2192 TRPC Lambda \u2192 Server Services \u2192 DB Model \u2192 PostgreSQL\n```\n\n## Note: Relationship to the Cloud Repo\n\nThis open-source repo is consumed by a **separate, private cloud (SaaS) repo**\nas a git submodule mounted at `lobehub\/`. The cloud repo provides:\n\n- **`src\/business\/{client,server}`** and **`packages\/business\/*`** implementations\n  that override the stubs shipped here.\n- Cloud-only routes (e.g. `(cloud)\/`, `embed\/`), cloud-only stores (e.g.\n  `subscription\/`), cloud-only TRPC routers (billing, budget, risk control, \u2026),\n  and Vercel cron routes under `src\/app\/(backend)\/cron\/`.\n- File-resolution order in cloud: `@\/store\/x` \u2192 cloud `src\/store\/x` first, then\n  `lobehub\/packages\/store\/src\/x`, then `lobehub\/src\/store\/x`. **Cloud override wins.**\n\nWhen working in this repo alone, ignore the cloud layer \u2014 the stubs in\n`src\/business\/` and `packages\/business\/` are the source of truth here.\n","use_cases":["Understanding the directory structure of the LobeHub repository","Locating key components like UI, routing, and state management","Identifying the location of core packages and services"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/lobehub\/lobehub\/blob\/54382b5c8e81544da454fa6d7b50f461a562c1ee\/.agents\/skills\/project-overview\/SKILL.md","source_commit":"54382b5c8e81544da454fa6d7b50f461a562c1ee","license":null,"version":null,"listing_approved_at":"2026-11-22","created_at":"2026-11-21T11:26:34.000000Z","updated_at":"2026-11-22T11:17:19.000000Z","seo_title":"LobeHub Project Overview Guide","seo_description":"Explore the LobeHub open-source project structure, tech stack, and monorepo layout with this curated guide.","seo_keywords":["LobeHub project structure","LobeHub directory layout","LobeHub tech stack","LobeHub monorepo layout","LobeHub package locations"]}}