Skip to content

Local Development Setup

Detailed instructions for setting up your development environment.

Java 25

ArchSmith requires Java 25. We recommend using SDKMAN to manage JDK installations:

bash
# Install SDKMAN
curl -s "https://get.sdkman.io" | bash

# Install Azul Zulu 25
sdk install java 25-zulu

# Verify
java -version
echo $JAVA_HOME

Alternatively, download directly from Azul Zulu or Adoptium.

WARNING

Ensure JAVA_HOME is set correctly. Gradle will fail with a clear error if it detects a different Java version.

IDE Configuration

  1. Open project: File → Open → select the ArchSmith/ root directory
  2. Gradle import: IntelliJ auto-detects build.gradle.kts and imports all modules
  3. JDK setup: File → Project Structure → Project SDK → select Java 25
  4. Lombok plugin: Settings → Plugins → search "Lombok" → Install
  5. Annotation processing: Settings → Build → Compiler → Annotation Processors → Enable
  6. Code style: Import Google Java Style (enforced by Spotless)

VS Code

  1. Install extensions: Extension Pack for Java, Gradle for Java
  2. Set java.configuration.runtimes in settings to point to JDK 25
  3. Install Lombok support: vscjava.vscode-lombok

Gradle Tips

bash
# Full build
./gradlew build

# Build without tests (faster)
./gradlew build -x test

# Run only backend
./gradlew server-admin:bootRun

# Run specific test class
./gradlew :server-admin:test --tests "com.lesofn.archsmith.*"

# Check code formatting
./gradlew spotlessCheck

# Auto-fix code formatting
./gradlew spotlessApply

# Clean build (useful when switching branches)
./gradlew clean build

TIP

Gradle 9.4.1 supports configuration cache. After the first build, subsequent builds are significantly faster.

Dev Profile Features

When running with the default dev profile, the following are automatically configured:

FeatureBehavior
DatabaseTestcontainers PostgreSQL (auto-started via Docker)
RedisTestcontainers Redis (auto-started via Docker)
File StorageTestcontainers RustFS (S3-compatible, auto-started via Docker)
SchemaHibernate DDL auto=update (auto-creates tables)
Seed DataLoaded automatically via InitDbMockServer
FlywayDisabled (not needed for dev)
CaptchaDisabled (skip captcha on login)
DevToolsHot reload enabled with LiveReload on port 35729
Swagger UIAvailable at http://localhost:8080/swagger-ui/index.html
Tracing100% sampling to local OTLP endpoint

Hot Reload

Spring Boot DevTools is enabled in dev mode. When you modify Java files and recompile (Ctrl+F9 in IntelliJ), the application restarts automatically.

Monitored paths:

  • src/main/java
  • src/main/resources

Excluded from restart:

  • static/**
  • public/**

Testcontainers (Dev Services)

In dev mode, Docker containers for PostgreSQL, Redis, and RustFS are automatically started by Testcontainers when you run ./gradlew server-admin:bootRun. No manual setup is required.

TIP

Make sure Docker Desktop (or Docker Engine) is running before starting the backend. Testcontainers will pull the required images on first launch.

The auto-started services are:

ServiceContainer ImagePurpose
PostgreSQLpostgres:17Primary database
Redisredis:7-alpineSession cache, data caching
RustFSrustfs/rustfsS3-compatible file storage

Frontend Development

bash
cd ArchSmithAdmin

# Install dependencies
pnpm install

# Start dev server (http://localhost:8848)
pnpm dev

# Build for production
pnpm build

# Lint and format
pnpm lint

The frontend dev server proxies API requests to http://localhost:8080 by default.

Troubleshooting

ProblemSolution
Unsupported class file major version 69Wrong Java version — ensure JAVA_HOME points to JDK 25
Port 8080 already in useKill the existing process or change server.port in YAML
Testcontainers startup failureEnsure Docker is running; check docker ps and Docker logs
Gradle build hangsRun ./gradlew --stop to kill daemon, then rebuild
Redis connection refusedEnsure Docker is running — Testcontainers auto-starts Redis

Released under the MIT License.