mise-en-place: Monorepo & Polyglot Toolchain Guide
Unifying Angular, Node, pnpm, Spring Boot, Java, Gradle, and Docker Compose under a single deterministic dev engine.
Mise in 30 Seconds
Managing separate versions of node, pnpm, java, gradle, and docker-compose across different machines causes subtle bugs, broken builds, and wasted onboarding time. Mise replaces nvm, sdkman, pyenv, direnv, and make with a single config: mise.toml. It provisions tools on directory entry, exports environment variables like JAVA_HOME, and orchestrates full-stack workflows from local containers to CI.
Introduction
In professional kitchens, mise en place means "everything in its place" — having every ingredient prepped and every knife sharpened before service starts. In software engineering, mise does the exact same thing for your development workspace.
As engineering architectures evolve, full-stack monorepos housing both a frontend application (such as Angular, React, or Vue) and a backend service (such as Spring Boot, Go, or Python) are the industry standard. However, polyglot monorepos introduce distinct developer experience headaches:
- Conflicting Toolchains: The frontend requires specific Node.js and pnpm versions; the backend requires specific JDK vendors, Gradle releases, or Python virtualenvs.
- Environment Variable Leakage: Backend database credentials,
JAVA_HOME, or JVM flags can pollute the frontend build environment, causing unexpected build failures. - Script Fragility: Teams resort to brittle shell scripts or giant root
package.jsonscripts full ofcd frontend && pnpm build && cd ../backend && ./gradlew build. - Unequal Tooling Burden: Frontend engineers shouldn't have to install and debug complex JVM runtimes just to work on UI components, and backend engineers shouldn't struggle with Node.js version managers.
Mise solves this natively with first-class monorepo configuration:
- Monorepo Root & Scoped Config Roots: With
monorepo_root = trueand[monorepo] config_roots = ["frontend", "backend"], mise explicitly defines workspace boundaries and project subtrees without slow recursive directory scans. - Polyglot Runtime & Scoped Env Isolation: Node & pnpm remain scoped to
frontend/mise.toml; Java & Gradle remain scoped tobackend/mise.toml. Runtimes and environment variables only activate where they belong. - Namespaced Task Execution: Execute any sub-project task from anywhere in the repository using canonical double-slash path notation (e.g.,
mise run //frontend:build,mise run //backend:test, or wildcardmise '//*:build'). - Sub-millisecond Rust Engine & Task DAGs: Mise calculates task dependency trees across projects (
mise tasks graph), enabling parallel execution and clean full-stack lifecycle orchestration.
Comparison: Mise vs. Turborepo / Nx vs. ASDF vs. Make in a Polyglot Monorepo
| Feature | mise (Monorepo) | Turborepo / Nx | asdf | make / Shell Scripts |
|---|---|---|---|---|
| Language Scope | Polyglot (Node, JVM, Go, Rust, Python, etc.) | JavaScript / TypeScript focused | Polyglot (Runtimes only) | Language agnostic |
| Runtime Management | Built-in (installs exact compilers) | None (requires external tool) | Yes | None |
| Project Isolation | Scoped mise.toml per project | Workspace packages | Directory .tool-versions | Manual directory handling |
| Cross-Project Namespacing | Native (//frontend:task) | Native (turbo run build) | None | Manual target names |
| Speed & Overhead | Sub-millisecond (Rust) | Fast (Go / Rust) | Slow (Bash shims) | Depends on shell |
| Environment Scoping | Per-project & root inheritance | Limited to env file loaders | None | Manual exports |
| Task Dependency DAG | Built-in (depends across roots) | Built-in | None | Manual target chains |
How Can Mise Help Me?
When a team works across frontend, backend, and containerized microservices, development setups decay quickly. Here is how adopting mise creates an effortless developer experience:
1. Eliminating "Works on My Machine" Across the Stack
Frontend engineers shouldn't have to fiddle with JAVA_HOME or install SDKMAN to run the backend API. Backend developers shouldn't have to fight mismatched Node or pnpm versions to test Angular components. Committing a single mise.toml guarantees that running mise install provisions the exact same tool versions on every laptop.
2. High Performance (Rust vs. Shell Shims)
Older tools like asdf wrap every command in a bash script ("shim"). Invoking node, gradle, or git repeatedly spawns subshells to parse version files, slowing down your terminal and editor. Mise is written in Rust and integrates directly into shell prompt hooks, keeping terminal latency imperceptible.
3. Integrated Environment Variables & Secrets
Instead of maintaining .env, .envrc, and export scripts separately, mise sets your active JAVA_HOME, PORT, SPRING_PROFILES_ACTIVE, and database connection strings alongside the tool definitions.
4. Zero-Drift CI/CD Parity
Because the official jdx/mise-action reads the same mise.toml, your GitHub Actions workflows build with the identical compilers and run the identical tasks as your local environment.
Quick Guide: Setup & Basic Usage
Setting up mise for a full-stack monorepo takes only a few minutes.
Step 1: Install Mise
On macOS (Homebrew):
brew install mise
On Linux / macOS (Standalone Installer):
curl https://mise.run | sh
Step 2: Configure Shell Profile
Add the activation line to your shell configuration file.
For Zsh (macOS default):
echo 'eval "$(mise activate zsh)"' >> ~/.zshrc
source ~/.zshrc
For Bash:
echo 'eval "$(mise activate bash)"' >> ~/.bashrc
source ~/.bashrc
For Fish:
echo 'mise activate fish | source' >> ~/.config/fish/config.fish
source ~/.config/fish/config.fish
Step 3: Verify Your Setup
Run the built-in diagnostic tool:
mise doctor
Check that shell integration is active and all diagnostics report healthy.
Step 4: Daily Commands Cheat Sheet for Monorepos
| Command | Action |
|---|---|
mise install --monorepo | Installs all pinned tools across all monorepo config roots |
mise ls --monorepo | Lists all installed tools and active versions across all projects |
mise tasks --all | Displays all available tasks across root and subprojects |
mise tasks graph | Visualizes the monorepo task dependency DAG |
mise tasks deps [task] | Shows the prerequisite dependency tree for a specific task |
mise run //frontend:dev | Starts the Angular development server from anywhere |
mise run //backend:dev | Starts the Spring Boot backend server from anywhere |
mise run //*:build | Builds all projects matching the wildcard pattern |
mise run //...:test | Runs all test tasks across the entire monorepo |
mise run dev | Runs root composite task (starts containers and launches full stack) |
mise run ci | Runs complete end-to-end CI build and test pipeline |
How It Works Under the Hood
Monorepo Discovery & Boundary Resolution
When working in standard mode, mise walks upward through parent directories looking for configuration files. In a monorepo, mise uses monorepo_root to establish a project boundary:
# mise.toml at repository root
monorepo_root = true
[monorepo]
config_roots = [
"frontend",
"backend"
]
- Explicit Loading: Rather than recursively walking every subfolder (which could search through thousands of
node_modulesor build directories), mise explicitly loads the directories declared inconfig_roots. - Boundary Anchoring: Sub-projects recognize the monorepo root as their workspace boundary. Path targets starting with
//resolve relative to this root. - Single-Level Globs: If your repository scales to multiple microservices or shared libraries, you can specify patterns like
"services/*"or"packages/*".
Path-Based Task Namespacing (//<root>:<task>)
Every task defined in a sub-project mise.toml is assigned a canonical identifier prefixed by // and its directory path:
frontend/mise.toml[tasks.build]→//frontend:buildfrontend/mise.toml[tasks.test]→//frontend:testbackend/mise.toml[tasks.build]→//backend:buildbackend/mise.toml[tasks.test]→//backend:test
You can invoke these tasks using either mise run //frontend:build or the shorthand mise //frontend:build. When your current working directory is already inside frontend/, calling mise run build automatically runs the local build task without needing the //frontend: prefix.
Deep Dive: How Monorepo Hook Resolution & Execution Flow Operates
Here is how mise orchestrates shell environments and cross-project tasks:
[Developer enters repository: cd ~/code/my-monorepo]
│
▼
[Shell hook executes: mise hook-env]
│
├── Reads root mise.toml:
│ monorepo_root = true
│ config_roots = ["frontend", "backend"]
│ tools: docker-compose
│
▼
[Developer changes directory: cd frontend]
│
├── Shell hook detects frontend/mise.toml
│ Dynamically prepends Node & pnpm to $PATH
│ Exports frontend environment variables (PORT, API_URL)
│ Zero JVM tools injected into $PATH
│
▼
[Developer runs root task: mise run //backend:test]
│
├── Mise resolves backend/mise.toml in user-space
│ Executes gradle test inside backend directory context
│ Applies backend tools (Java, Gradle) and exports JAVA_HOME
│ Returns exit code directly to current shell
This architecture ensures that each sub-project runs in an isolated runtime environment while retaining complete cross-project operational control.
Task Dependency Resolution & Parallel DAG
When a root task declares dependencies on sub-project tasks, mise constructs a Directed Acyclic Graph (DAG):
[tasks.build]
description = "Build all production artifacts"
depends = ["//frontend:build", "//backend:build"]
Mise evaluates prerequisites in the graph:
- Independent prerequisites (like compiling the Angular frontend and compiling the Spring Boot JAR) run concurrently in parallel, utilizing all available CPU cores.
- If any prerequisite task fails with a non-zero exit code, downstream dependent tasks are halted, and the error output is surfaced immediately.
- Run
mise tasks graphormise tasks deps buildto visualize the execution order before running.
Full-Stack Monorepo Example: Angular + Spring Boot + Compose
Here is a complete, production-ready monorepo configuration featuring an Angular frontend, a Spring Boot backend, and Docker Compose backing services.
Monorepo Workspace Structure
my-fullstack-monorepo/
├── mise.toml # Monorepo root config (orchestration & shared tools)
├── docker-compose.yml # Backing infrastructure (Postgres, Redis, grafana/otel-lgtm)
├── frontend/ # Angular 22 frontend project
│ ├── mise.toml # Frontend tools (Node 22, pnpm) & tasks
│ ├── package.json
│ └── src/
└── backend/ # Spring Boot 4.x backend project
├── mise.toml # Backend tools (OpenJDK 23, Gradle) & tasks
├── build.gradle.kts
└── src/
1. Root mise.toml (Monorepo Orchestrator)
The root configuration declares the monorepo boundary, registers the project sub-trees, provisions shared infrastructure tools, and defines composite lifecycle tasks:
# mise.toml (Repository Root)
monorepo_root = true
[monorepo]
config_roots = [
"frontend",
"backend"
]
[tools]
# Shared orchestration tooling across the repository
docker-compose = "latest"
[env]
_.file = ".env"
# -----------------------------------------------------------------------------
# DOCKER COMPOSE INFRASTRUCTURE TASKS
# -----------------------------------------------------------------------------
[tasks."services:up"]
description = "Start backing containers (Postgres, Redis, grafana-lgtm) in background"
run = "docker compose up -d"
[tasks."services:down"]
description = "Stop backing containers via Docker Compose"
run = "docker compose down"
[tasks."services:logs"]
description = "Follow logs from all backing containers"
run = "docker compose logs -f"
# -----------------------------------------------------------------------------
# MONOREPO COMPOSITE TASKS
# -----------------------------------------------------------------------------
[tasks.install]
description = "Install dependencies across all monorepo packages"
depends = ["//frontend:install", "//backend:install"]
[tasks.build]
description = "Build all production artifacts (Angular frontend & Spring Boot backend)"
depends = ["//frontend:build", "//backend:build"]
[tasks.test]
description = "Run all unit and integration test suites in parallel"
depends = ["//frontend:test", "//backend:test"]
[tasks.dev]
description = "Boot database services and launch backend & frontend concurrently"
depends = ["services:up"]
run = """
echo "Infrastructure online. Launching backend and frontend..."
# Launch backend in background and frontend in foreground
mise run //backend:dev &
mise run //frontend:dev
"""
[tasks.ci]
description = "Full verification pipeline for CI/CD"
depends = ["install", "build", "test"]
2. Frontend Configuration (frontend/mise.toml)
The frontend configuration isolates the Node.js and pnpm toolchains, exports frontend-specific environment variables, and defines frontend tasks:
# frontend/mise.toml
[tools]
node = "22"
pnpm = "latest"
[env]
PORT = "4200"
API_BASE_URL = "http://localhost:8080/api"
[tasks.install]
description = "Install Angular dependencies via pnpm"
run = "pnpm install"
[tasks.dev]
description = "Start Angular development server with hot-reload"
run = "pnpm start"
[tasks.build]
description = "Compile Angular application for production"
run = "pnpm run build"
[tasks.test]
description = "Run Angular unit tests and accessibility audits"
run = "pnpm test"
[tasks.lint]
description = "Lint TypeScript and Angular template code"
run = "pnpm run lint"
3. Backend Configuration (backend/mise.toml)
The backend configuration manages the JVM toolchain, dynamically configures JAVA_HOME, defines database credentials, and manages Gradle tasks:
# backend/mise.toml
[tools]
java = "latest" # Resolves to latest stable OpenJDK (e.g., OpenJDK 25)
gradle = "latest"
[env]
# Automatically sets JAVA_HOME to the exact JDK version provisioned by mise
JAVA_HOME = "{{env.MISE_TOOL_OPTS__JAVA_HOME | default: (exec(command='mise where java'))}}"
SPRING_PROFILES_ACTIVE = "local"
DATABASE_URL = "jdbc:postgresql://localhost:5432/app_dev"
DATABASE_USERNAME = "postgres"
DATABASE_PASSWORD = "devpassword"
[tasks.install]
description = "Download and verify backend Gradle dependencies"
run = "gradle --version"
[tasks.dev]
description = "Run Spring Boot application with live reload"
run = "gradle bootRun"
[tasks.build]
description = "Compile and package Spring Boot executable JAR"
run = "gradle build -x test"
[tasks.test]
description = "Run Spring Boot JUnit and integration test suites"
run = "gradle test"
View sample docker-compose.yml for this workspace
# docker-compose.yml
services:
postgres:
image: postgres:18-alpine
container_name: app-postgres
restart: unless-stopped
ports:
- "5432:5432"
environment:
POSTGRES_DB: app_dev
POSTGRES_USER: postgres
POSTGRES_PASSWORD: devpassword
volumes:
- pgdata:/var/lib/postgresql/data
redis:
image: redis:8.2.3-alpine
container_name: app-redis
ports:
- "6379:6379"
grafana-lgtm:
image: 'grafana/otel-lgtm:latest'
ports:
- '3000:3000'
- '4317:4317'
- '4318:4318'
volumes:
pgdata:
With mise.toml configured at the root, running mise run services:up spins up PostgreSQL, Redis, and Grafana stack in one command.
How Mise handles JAVA_HOME & Gradle integration automatically
One of the most persistent headaches in full-stack JVM development is mismatching JAVA_HOME with the active version of Java.
Mise eliminates this problem completely:
- When mise evaluates
backend/mise.toml, it downloads and unpacks the target JDK into~/.local/share/mise/installs/java/<version>. - The dynamic template
exec(command='mise where java')resolvesJAVA_HOMEdirectly to the JDK installation root. - When Gradle runs (
gradle bootRunor./gradlew build), it readsJAVA_HOMEand immediately compiles against the exact compiler and bytecode target without requiring manual exports in~/.zshrc. - Crucially, this variable is scoped strictly to the backend; it never leaks into frontend node processes or system shells.
CI/CD Pipeline Integration
Using jdx/mise-action@v2 allows GitHub Actions workflows to leverage the monorepo configuration with built-in tool caching and parallel task execution:
Unified Monorepo CI Workflow
# .github/workflows/ci.yml
name: Monorepo CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
verify:
name: Verify Monorepo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Provision All Monorepo Toolchains via Mise
uses: jdx/mise-action@v2
with:
cache: true
install_args: "--monorepo"
- name: Verify Installed Runtimes
run: |
mise ls --monorepo
- name: Run Full Monorepo CI Pipeline
run: mise run ci
Alternative: Matrix Strategy for Isolated Parallel CI
If you prefer separate, independent GitHub Actions jobs for the frontend and backend:
# .github/workflows/ci-matrix.yml
name: Monorepo Matrix CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
frontend:
name: Frontend (Angular)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
with:
cache: true
- name: Test & Build Frontend
run: |
mise run //frontend:install
mise run //frontend:lint
mise run //frontend:test
mise run //frontend:build
backend:
name: Backend (Spring Boot)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
with:
cache: true
- name: Test & Build Backend
run: |
mise run //backend:install
mise run //backend:test
mise run //backend:build
Frequently Asked Questions & Troubleshooting
How do I run a task from inside a sub-project directory?
When your current shell directory is frontend/, running mise run build automatically executes the local frontend/mise.toml build task. You don't need the //frontend: prefix. To target a different subproject from there, use the fully-qualified path: mise run //backend:test.
Can I use wildcards to run a task across all packages?
Yes! Mise supports target wildcards. Running:
mise run '//*:build'
finds all config roots that define a build task and executes them. To run tests across every package in the monorepo:
mise run '//...:test'
Can I add shared libraries or additional microservices?
Absolutely. Add the directory to config_roots in the root mise.toml:
[monorepo]
config_roots = [
"frontend",
"backend",
"services/*",
"libs/*"
]
Each matching folder with a mise.toml becomes a first-class monorepo project.
How do I use a specific JDK distribution like Amazon Corretto or Eclipse Temurin?
In backend/mise.toml, specify the vendor prefix:
[tools]
java = "corretto-21"
# or
java = "temurin-17"
Mise downloads and manages the specific vendor distribution automatically.
Summary
Adopting mise-en-place for monorepos eliminates the brittle scripts, conflicting compilers, and environment pollution that plague full-stack architectures. By anchoring your workspace with monorepo_root = true and maintaining dedicated frontend/mise.toml and backend/mise.toml configurations:
- Frontend engineers enjoy a clean Node and pnpm environment without JVM dependencies.
- Backend engineers compile with reliable JDK and Gradle runtimes with zero manual
JAVA_HOMEconfiguration. - Everyone benefits from path-based task targeting (
mise //frontend:dev), parallel task DAG execution, and identical local-to-CI development environments.