Technical Development Getting Started Guide
Welcome to the LobeHub Technical Development Getting Started Guide. LobeHub is an AI conversation application built on the Next.js framework, incorporating a range of technology stacks to achieve diverse functionalities and features. This guide will detail the main technical components of LobeHub and how to configure and use these technologies in your development environment.
Basic Technology Stack
The core technology stack of LobeHub is as follows:
- Framework: Next.js 16 + React 19, providing server-side rendering, Router Handler, and other key features.
- Component Library: Ant Design (antd) as the base component library, @lobehub/ui as the business component library.
- State Management: zustand, a lightweight and easy-to-use state management library.
- Data Fetching: SWR for client-side data fetching.
- Routing: Hybrid routing architecture — Next.js App Router for static pages (e.g., auth pages), React Router DOM for the main SPA.
- API: tRPC for end-to-end type-safe API communication.
- Database: Drizzle ORM + PostgreSQL.
- Internationalization: react-i18next for multilingual support.
- Styling: antd-style, a CSS-in-JS library that complements Ant Design.
- Unit Testing: Vitest for unit testing.
Folder Directory Structure
LobeHub uses a Monorepo architecture
(@lobechat/ namespace).
The top-level directory structure is as follows:
For a detailed introduction to the directory structure, see: Folder Directory Structure
Local Development Environment Setup
Please refer to the Environment Setup Guide for the complete setup process, including software installation, project configuration, Docker service startup, and database migrations.
Code Style and Contribution Guide
In the LobeHub project, we place great emphasis on the quality and consistency of the code. For this reason, we have established a series of code style standards and contribution processes to ensure that every developer can smoothly participate in the project. Here are the code style and contribution guidelines you need to follow as a developer.
- Code Style: We use
@lobehub/lintto unify the code style, including ESLint, Prettier, remarklint, and stylelint configurations. Please adhere to our code standards to maintain code consistency and readability. - Contribution Process: We use gitmoji and semantic release for code submission and release processes. Please use gitmoji to annotate your commit messages and ensure compliance with the semantic release standards so that our automation systems can correctly handle version control and releases.
All contributions will undergo code review. Maintainers may suggest modifications or requirements. Please respond actively to review comments and make timely adjustments. We look forward to your participation and contribution.
For detailed code style and contribution guidelines, please refer to Code Style and Contribution Guide.
Internationalization Implementation Guide
LobeHub uses react-i18next for multilingual support,
ensuring a global user experience.
Default language files are located in src/locales/default/
(English). Translation files are in the locales/ directory.
During development, you only need to edit keys in
src/locales/default/ — CI automatically generates
translation files for other languages.
If you want to add a new language, follow specific steps detailed in New Language Addition Guide. We encourage you to participate in our internationalization efforts to provide better services to global users.
For a detailed guide on internationalization implementation, please refer to Internationalization Implementation Guide.
Appendix: Resources and References
To support developers in better understanding and using the technology stack of LobeHub, we provide a comprehensive list of resources and references — LobeHub Resources and References - Visit our maintained list of resources, including tutorials, articles, and other useful links.
We encourage developers to utilize these resources to deepen their learning and enhance their skills, join community discussions through LobeHub GitHub Discussions or Discord, ask questions, or share your experiences.
If you have any questions or need further assistance, please do not hesitate to contact us through the above channels.