This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
DataEase is an open-source BI tool by FIT2Cloud for data analysis and visualization via drag-and-drop chart creation. Version 3.0.0, GPL v3 license.
Branch: dev-v3 (current), PRs target dev-v2
- Backend: Java 21, Spring Boot 3.3.x, JPA (Hibernate) + QueryDSL, JDK 21
- Frontend: Vue 3, TypeScript, Vite, Element Plus, ECharts, AntV (G2, L7, S2)
- DB: MySQL 8 (primary), also PostgreSQL, Oracle, SQL Server, DM, Kingbase, GreatSQL, H2 (desktop)
- Other: Knife4j (API docs), EhCache, Quartz
dataease/
โโโ core/
โ โโโ core-backend/ # Spring Boot app (main artifact: CoreApplication.jar)
โ โโโ core-frontend/ # Vue 3 SPA
โโโ sdk/ # Shared SDK (common, api, extensions, distributed)
โโโ de-xpack/ # Enterprise/premium features (separate git repo)
โโโ drivers/ # JDBC drivers
โโโ installer/ # Docker Compose, deployment scripts
Each business domain under core/core-backend/src/main/java/io/dataease/<domain>/:
<domain>/
โโโ dao/auto/entity/ # JPA @Entity classes
โโโ auto/repository/ # JpaRepository interfaces
โโโ dao/ext/po/ # QueryDSL projection POJOs
โโโ dao/ext/mapper/ # Custom repository interfaces
โโโ dto/ # Data Transfer Objects
โโโ bo/ # Business Objects
โโโ manage/ # Business logic (@Component)
โโโ server/ # API implementations (implements sdk interfaces)
โโโ request/ # Request body classes
โโโ utils/ # Domain utilities
# Full build (all modules)
mvn clean install
# Build community standalone JAR
cd core && mvn clean package -Pstandalone -U -Dmaven.test.skip=true
# Output: core/core-backend/target/CoreApplication.jar
# Build desktop edition
cd core && mvn clean package -Pdesktop -U -Dmaven.test.skip=true
# Build enterprise/distributed edition
cd core && mvn clean package -Pdistributed -U -Dmaven.test.skip=true# Direct JAR execution
java -jar core/core-backend/target/CoreApplication.jar
# Docker (recommended for testing)
curl -sSL https://dataease.oss-cn-hangzhou.aliyuncs.com/quick_start_v2.sh | bash
# Default credentials: admin / DataEase@123456
# Local installer
cd installer && /bin/bash install.shcd core/core-frontend
npm run dev # Dev server
npm run build:distributed # Production buildmvn compile # Regenerates Q-classes in target/generated-sources/java/| Profile | Database | Description |
|---|---|---|
standalone (default) |
MySQL | Community/single-server |
desktop |
H2 | Desktop/lightweight |
distributed |
MySQL | Enterprise/multi-node |
Database-specific profiles: standalone-oracle, standalone-pg, standalone-dm, standalone-kingbase, standalone-sqlserver, standalone-GreatSQL
MyBatis-Plus has been replaced by JPA. Do not use MyBatis-Plus patterns.
- Use
jakarta.persistence.*(notjavax.persistence.*) - Entities:
@Getter/@Settervia Lombok (not@Data),@Commenton table and every field - IDs:
Long, no@GeneratedValueโ IDs generated manually viaSnowflakeUtil - Repositories:
JpaRepository<Xxx, Long>,JpaSpecificationExecutor<Xxx>
Intercepts all save/saveAndFlush calls:
- If entity exists (non-null ID), only non-null fields are copied before saving โ mimics MyBatis-Plus
updateById - To intentionally set a field to null: use QueryDSL
@Modifying+ JPQL,save()cannot do this
All QueryDSL/JPQL queries must work across all supported databases (MySQL, Oracle, PostgreSQL, SQL Server, DM, Kingbase, GreatSQL). Avoid database-specific dialect functions; branch per-dialect when necessary (see DynamicCaseNamingStrategy).
- server/ = API endpoint implementation, implements interfaces from
sdkmodule - manage/ = business logic,
@Component, called by server - dao/auto/ = JPA entities + repositories
- dao/ext/ = custom query POJOs and non-standard repositories
Use SnowflakeUtil for all new entity IDs.
- Profile-based feature toggling: Three Maven profiles control which modules are included (community vs enterprise)
- Frontend bundled into JAR:
maven-antrun-plugincopies frontend dist into backendstatic/ - Schema management: Flyway disabled,
ddl-auto: updatemanages schema in dev and production - xpack independence: de-xpack is a separate git repo; core-backend optionally depends on it for debugging