Skip to main content
This page describes the local development environment setup, the tools used for day-to-day engineering, and the automated gates that ensure system integrity before code is committed or pushed.

Environment Prerequisites

The Palyra codebase is a polyglot monorepo requiring several toolchains to be present on the host system.
ToolVersion / RequirementPurpose
Rust1.91.0 (pinned in CI)Core daemon, CLI, and WASM plugins.
Node.js>= 18.xWeb Console and Desktop UI (React/Vite).
JustLatestPreferred command runner for task automation.
ProtocLatestProtobuf compilation for gRPC and cross-platform stubs.
Sources: justfile#19, Makefile#40, scripts/run-pre-push-checks.sh#34

Local Setup and Bootstrapping

The repository provides automated scripts to prepare the environment. The primary entry point for new developers is the doctor command, followed by the dev target.

1. The ‘palyra doctor’ Command

The doctor command, implemented in crates/palyra-cli/src/commands/doctor.rs, performs a comprehensive audit of the local environment crates/palyra-cli/src/commands/doctor.rs#4-5. It checks for:

2. Just / Make Targets

Palyra supports both just and make for common tasks.
  • just dev: Runs the doctor, ensures the desktop UI is built, and compiles the entire workspace justfile#16-21.
  • just web-bootstrap: Initializes the JS workspace using vp install justfile#30-31.
  • just protocol: Validates .proto definitions and regenerates Rust/Kotlin/Swift stubs justfile#103-107.

Local Setup Flow

The following diagram illustrates the bootstrap sequence from a clean clone to a running system. Title: Developer Bootstrap Flow Sources: justfile#7-22, crates/palyra-cli/src/commands/doctor.rs#3-10

Developer Workflow

The workflow is centered around high-frequency testing and strict hygiene checks.

Building and Testing

  • Workspace Build: cargo build --workspace --locked justfile#114.
  • Workspace Test: cargo test --workspace --locked justfile#110.
  • CLI Regression: bash scripts/test/run-workflow-regression.sh justfile#62-63.
  • Fuzzing: Fuzz targets for parsers (JSON, Webhooks, Config) can be built via just fuzz-build justfile#154-167.

Protocol Management

Palyra uses a “Schema First” approach. When modifying gRPC or message structures:
  1. Edit files in schemas/proto/palyra/v1/.
  2. Run just protocol-validate to ensure no breaking changes justfile#97-98.
  3. Run just protocol-generate to update generated code in all languages justfile#100-101.

Pre-Push Gate

Before pushing to the remote, developers are expected to run the pre-push suite. This is orchestrated by scripts/run-pre-push-checks.sh and supports two profiles scripts/run-pre-push-checks.sh#5:

1. Fast Profile (fast)

Optimized for speed, focusing on formatting and deterministic core tests:

2. Full Profile (full)

Required for significant changes or before opening a PR: Title: Pre-Push Validation Pipeline Sources: scripts/run-pre-push-checks.sh#49-69, .gitignore#49-56

Security Auditing

Developers can run local security audits using palyra security audit. This command leverages the same logic as the doctor but focuses on deployment risks crates/palyra-cli/src/commands/security.rs#68-70. The audit identifies: Sources: crates/palyra-cli/src/commands/security.rs#134-185, justfile#130-136