# What Are the Dependencies for Building Chat2DB? A Full-Stack Maven and NPM Guide

> Discover the essential dependencies for building Chat2DB. Learn about Java 17, Maven, Node.js, NPM packages, and backend artifacts needed to compile this powerful tool.

- Repository: [OtterMind/Chat2DB](https://github.com/OtterMind/Chat2DB)
- Tags: how-to-guide
- Published: 2026-07-27

---

**To build Chat2DB from source, you need Java 17, Maven, Node.js, and Yarn to resolve roughly 120 backend Maven artifacts declared in [`chat2db-community-server/chat2db-community-bom/pom.xml`](https://github.com/OtterMind/Chat2DB/blob/main/chat2db-community-server/chat2db-community-bom/pom.xml) and approximately 40 frontend NPM packages listed in [`chat2db-community-client/package.json`](https://github.com/OtterMind/Chat2DB/blob/main/chat2db-community-client/package.json).**

Chat2DB is an open-source, full‑stack database client maintained by OtterMind. If you plan to compile the project from source, understanding the dependencies for building Chat2DB is the first step to a successful build. The repository splits dependency management between a centralized Maven BOM for its Java 17/Spring Boot backend and a Yarn-managed [`package.json`](https://github.com/OtterMind/Chat2DB/blob/main/package.json) for its React/TypeScript frontend.

## Backend Build Dependencies

Chat2DB's server side is a multi-module Maven project. Every library version and plugin version is locked in a single Bill-of-Materials file that child modules import.

### The Central BOM ([`chat2db-community-bom/pom.xml`](https://github.com/OtterMind/Chat2DB/blob/main/chat2db-community-bom/pom.xml))

In [`chat2db-community-server/chat2db-community-bom/pom.xml`](https://github.com/OtterMind/Chat2DB/blob/main/chat2db-community-server/chat2db-community-bom/pom.xml), the `<dependencyManagement>` section aggregates roughly 120 Maven coordinates. Individual modules reference these artifacts using the `${revision}` property, which guarantees consistent versions across the entire build.

Key backend dependency groups include:

- **Spring ecosystem** — `spring-boot-dependencies`, `spring-ai-bom`, and `spring-context-indexer`.
- **Database access** — `mybatis-plus`, `mybatis-plus-generator`, `HikariCP`, `liquibase-core`, `flyway-core`, plus dialect-specific drivers in `chat2db-community-server/chat2db-community-plugins/*/pom.xml`.
- **Utilities** — Guava, Hutool, FastJSON2, MapStruct, Lombok, Apache Commons, Vavr, JTS, Tika, Calcite, and POI.
- **Security** — `java-jwt`, `bouncycastle`, `sa-token-spring-boot3-starter`, and `sa-token-jwt`.
- **HTTP clients** — `okhttp` and `forest-core`.
- **AI / LLM integration** — `chatgpt-java`, `openai-gpt3-java`, and `spring-ai-starter-mcp-server-webmvc`.
- **Desktop bridge** — `jcef`, used by the native desktop launcher.

### Maven Build Plugins

The same BOM file defines required build tools inside `<build><pluginManagement>`. Essential plugins include `maven-compiler-plugin`, `spring-boot-maven-plugin`, `maven-surefire-plugin`, and `flatten-maven-plugin`. These handle compilation, packaging, test execution, and metadata flattening.

## Frontend Build Dependencies

The user interface lives in `chat2db-community-client/` and is built with Umi, React, and TypeScript. Yarn manages both runtime libraries and local development tools.

### Production Libraries ([`package.json`](https://github.com/OtterMind/Chat2DB/blob/main/package.json))

The `dependencies` block in [`chat2db-community-client/package.json`](https://github.com/OtterMind/Chat2DB/blob/main/chat2db-community-client/package.json) lists the runtime packages that Webpack bundles into the final web or desktop UI. Core entries include:

- **Framework** — Umi and `@umijs/plugins`.
- **UI components** — `antd` and `antd-style`.
- **Data tables** — `@visactor/vtable` family for high-performance rendering.
- **Interaction** — `@dnd-kit/*` for drag-and-drop and `elkjs` for graph layout.
- **State management** — `zustand`.
- **Editors** — `monaco-editor`.
- **Terminal** — `xterm` and its addons.
- **Utilities** — `lodash`, `dayjs`, `uuid`, `query-string`, and `url-parse`.

### Development and Test Tools

The `devDependencies` section in the same [`package.json`](https://github.com/OtterMind/Chat2DB/blob/main/package.json) supplies TypeScript, ESLint, Prettier, Stylelint, Jest (`tsx`), and `cross-env`. These tools are required for linting, formatting, testing, and build-time environment switching but are not shipped in the production bundle.

## How to Build Chat2DB From Source

With Java 17, Maven, Node.js, and Yarn installed, the following commands automatically download every dependency and produce runnable artifacts.

### Backend Build (Maven)

Run this from the repository root to compile, test, and package the executable JAR:

```bash
cd chat2db-community-server
mvn -B clean package \
    -Dchat2db.runtime.mode=community \
    -Dchat2db.network.status=OFFLINE \
    -Dchat2db.finalName=chat2db-community \
    -DskipTests=false

```

This pulls every library and plugin declared in the BOM and places the final JAR in `chat2db-community-start/target/chat2db-community.jar`.

### Frontend Build (Yarn)

From the client directory, install exact versions and build the Community edition:

```bash
cd chat2db-community-client
yarn install --frozen-lockfile
yarn run lint
yarn run build:web:community

```

`yarn install` resolves all entries in `dependencies` and `devDependencies`, while `build:web:community` bundles the UI via Umi.

### Run the Full Stack Locally

Start the backend JAR on port 10825:

```bash
java -Dchat2db.runtime.mode=community \
     -Dchat2db.network.status=OFFLINE \
     -Dserver.port=10825 \
     -jar chat2db-community-server/chat2db-community-start/target/chat2db-community.jar

```

In a second terminal, launch the frontend dev server:

```bash
cd chat2db-community-client
yarn start:community:hot

```

The UI defaults to port `8889` and communicates with the backend at `127.0.0.1:10825`.

## Summary

- Chat2DB is a full‑stack project requiring **Java 17 and Maven** for the backend and **Node.js and Yarn** for the frontend.
- All backend library and plugin versions are centralized in **[`chat2db-community-server/chat2db-community-bom/pom.xml`](https://github.com/OtterMind/Chat2DB/blob/main/chat2db-community-server/chat2db-community-bom/pom.xml)**.
- The frontend dependency tree is defined in **[`chat2db-community-client/package.json`](https://github.com/OtterMind/Chat2DB/blob/main/chat2db-community-client/package.json)**, split between production `dependencies` and build `devDependencies`.
- Key backend technologies include Spring Boot, MyBatis-Plus, HikariCP, Liquibase, and modular database dialect plugins.
- Key frontend technologies include Umi, Ant Design, VTable, Monaco Editor, Zustand, and XTerm.
- Running `mvn clean package` and `yarn install` resolves every required JAR and NPM module automatically.

## Frequently Asked Questions

### What Java version is required to build Chat2DB?

The backend targets **Java 17**. The `maven-compiler-plugin` configuration inside the BOM enforces this version, and the Spring Boot 3.x stack used by Chat2DB expects a Java 17 runtime or newer.

### Can I build Chat2DB without an internet connection?

A fully offline build is only possible if you already have a populated Maven repository and Yarn offline cache. Passing `-Dchat2db.network.status=OFFLINE` configures runtime behavior, but Maven and Yarn must still resolve roughly 120 JARs and 40 NPM packages from local caches because the BOM and [`package.json`](https://github.com/OtterMind/Chat2DB/blob/main/package.json) reference external coordinates.

### Where are the database driver dependencies located?

Individual drivers are declared inside each plugin module under **`chat2db-community-server/chat2db-community-plugins/`**. For example, the MySQL plugin contains its own [`pom.xml`](https://github.com/OtterMind/Chat2DB/blob/main/pom.xml) that inherits the parent BOM and pulls the MySQL connector. This modular layout supports MySQL, PostgreSQL, Oracle, SQL Server, ClickHouse, DuckDB, and others without bloating the core server.

### Is Yarn mandatory for the frontend build?

The repository documentation and build scripts are written for **Yarn**. Commands such as `yarn install --frozen-lockfile` and `yarn run build:web:community` rely on Yarn's lockfile semantics, making it the supported package manager for resolving the dependencies in [`chat2db-community-client/package.json`](https://github.com/OtterMind/Chat2DB/blob/main/chat2db-community-client/package.json).