Onboarding
Development Setup
Set up your local environment to contribute to the Matador ecosystem.
This guide is for developers who want to modify the Matador compiler, interpreter, or documentation.
Repository Architecture
Matador is a monorepo containing three distinct subsystems.
graph TD
Root[Monorepo Root] --> Contracts[contracts/]
Root --> DSL[dsl/]
Root --> Docs[docs/]
Contracts --> Foundry[Foundry Framework]
Contracts --> Solidity[Interpreter & Modules]
DSL --> Langium[Langium Framework]
DSL --> Compiler[Compiler Core]
DSL --> CLI[CLI Tool]
DSL --> VSCode[VSCode Extension]
Docs --> Next[Next.js App]
Docs --> Content[MDX Content]Prerequisites
Ensure you have the following installed before starting:
- Node.js: v20+ (Required for DSL and Docs)
- Foundry: Latest version (Required for Contracts)
- Git: For version control
Setup Instructions
Clone the Repository
git clone https://github.com/SteerFinance/matador.git
cd matadorSmart Contracts (Solidity)
The contracts subsystem uses Foundry.
cd contracts
# Install submodules (OpenZeppelin, etc.)
forge install
# Build contracts
forge build
# Run unit tests
forge testDSL Compiler (TypeScript)
The compiler is a Node.js workspace managed by npm.
cd dsl
# Install dependencies
npm install
# Generate Langium artifacts (parser, types)
npm run langium:generate
# Build all packages (core, cli, language)
npm run build
# Run test suite
npm run testDocumentation (Next.js)
The docs site is a Next.js application using Fumadocs.
cd docs
# Install dependencies
npm install
# Start local dev server
npm run devOpen http://localhost:3000 to view the site.
IDE Configuration
We strongly recommend VS Code for Matador development.
Recommended Extensions
- Solidity (Nomic Foundation) - For contract syntax highlighting.
- ESLint / Prettier - For TypeScript code style.
- Matador Language - You can side-load the local extension from
dsl/packages/extensionto get live syntax highlighting for.matadorfiles.
Linking the CLI
To test your local changes to the compiler CLI globally:
cd dsl/packages/cli
npm linkNow matador-policy-cli will point to your local build.