Developer Setup¶
Complete guide to setting up the full DRLS development environment.
Prerequisites¶
| Tool | Version | Purpose |
|---|---|---|
| Java JDK | 21 | Spark JVM modules |
| Python | 3.12+ | Core runtime |
| Rust | stable | UI backend |
| Node.js | 20+ | React frontend |
| Maven | 3.9+ | JVM build |
macOS (Homebrew)¶
Clone and Build¶
1. JVM Modules¶
cd core
JAVA_HOME=/opt/homebrew/Cellar/openjdk@21/21.0.10/libexec/openjdk.jdk/Contents/Home \
mvn clean package -DskipTests
cd ..
2. Python Package¶
3. Rust Workspace (Backend + Operators)¶
Tip
The ui/backend symlink points to rust/crates/ui-server/, so cd ui/backend && cargo run still works for the dev workflow.
4. React Frontend¶
5. gRPC Stubs¶
Verify¶
# Python
python -c "import drls; print(drls.__version__)"
# Rust
cd rust && cargo test --workspace && cd ..
# Frontend
cd ui/frontend && npm run lint && cd ../..
# Unit tests
python -m pytest python/drls/tests/ -v -k "not end_to_end"
Development Workflow¶
Run the full stack locally with two terminals:
Open http://localhost:5173 for the management console.
Auth Configuration¶
By default, authentication is disabled (AUTH_ENABLED=false) and all endpoints are accessible without login. To enable auth:
The first user to register is automatically granted the Admin role. Subsequent users default to Auditor and must be promoted by an admin.
Database¶
The backend uses SQLite by default (sqlite://drls.db). Migrations run automatically on startup (001–010). To use PostgreSQL instead:
Running Tests¶
Python Unit Tests¶
End-to-End Tests¶
Requires a running Spark + Ray cluster:
Rust Tests¶
Frontend Lint + Build¶
Linting¶
# Python
ruff check python/
ruff format --check python/
# Java/Scala
cd core && mvn checkstyle:check spotless:check -DskipTests
# Rust
cd rust && cargo clippy --workspace -- -D warnings
# Frontend
cd ui/frontend && npm run lint && npm run format:check