Skip to content

Local Development Environment

Prerequisites

ToolVersionNotes
JDK21 (enforced [21,22))Adoptium OpenJDK 21
Maven3.8+Build backend modules
Node.js20+Frontend development
pnpm10+Frontend package manager
Docker20+Run Testcontainers integration tests

Start Infrastructure

bash
# Start Nacos, MySQL, Redis, RabbitMQ, MinIO
docker compose -f docker-compose.infra.yml up -d

# Verify all prerequisites
./scripts/env-check.sh

# Check individual services
./scripts/env-check.sh --service nacos
./scripts/env-check.sh --service mysql
./scripts/env-check.sh --service fisco

Configuration

Configuration is split into two layers:

  1. Profile config (application-local.yml): database host, ports, and other local settings
  2. Nacos config: sensitive configs (keys, S3 credentials, etc.) delivered dynamically
bash
# Copy and fill in local config
cp .env.example .env

Required .env variables:

VariableDescription
JWT_KEYJWT signing key (recommend 64+ character random string)
S3_ACCESS_KEY / S3_SECRET_KEYS3/MinIO access credentials
FISCO_CONTRACT_STORAGE_ADDRESSStorage.sol contract address
FISCO_CONTRACT_SHARING_ADDRESSSharing.sol contract address

IntelliJ IDEA Setup

  1. Import as Maven project (select repository root)
  2. Set Project SDK to JDK 21
  3. Create run configurations for each service:
ServiceMain ClassActive Profiles
Storage Servicecn.flying.StorageApplicationlocal
FISCO Servicecn.flying.FiscoApplicationlocal
Backend Webcn.flying.WebApplicationlocal
  1. VM Options (required for running tests):
-javaagent:<path>/byte-buddy-agent-1.14.19.jar -Djdk.attach.allowAttachSelf=true

Frontend Development

bash
cd platform-frontend
pnpm install

# Start development server
pnpm dev

# Regenerate API types after backend changes
pnpm types:gen

# Code quality checks
pnpm lint        # ESLint
pnpm check       # svelte-check type checking
pnpm format      # Prettier formatting

Multi-Module Build Order

bash
# 1. Shared interfaces (required by all other modules — build first)
mvn -f platform-api/pom.xml clean install

# 2. Backend services (order among these three is interchangeable)
mvn -f platform-backend/pom.xml clean package -DskipTests
mvn -f platform-fisco/pom.xml clean package -DskipTests
mvn -f platform-storage/pom.xml clean package -DskipTests

# 3. Frontend build
cd platform-frontend && pnpm build

Service URLs

ServiceURLNotes
Swagger UIhttp://localhost:8000/record-platform/swagger-ui.htmlAPI docs, auth: admin/123456
OpenAPI JSONhttp://localhost:8000/record-platform/v3/api-docsOpenAPI spec
Druid Monitorhttp://localhost:8000/record-platform/druid/SQL monitoring
Frontendhttp://localhost:5173Dev server
Nacos Consolehttp://localhost:8848/nacosService registry and config
MinIO Consolehttp://localhost:9001Object storage management
RabbitMQ Managementhttp://localhost:15672Message queue monitoring

Released under the Apache 2.0 License.