Skip to content

Project Structure

This page explains how the Datto RMM monorepo is organized and the purpose of each directory.

datto-rmm/
├── apps/ # Applications
│ ├── mcp-server/ # MCP server for AI assistants
│ └── docs/ # This documentation site (Starlight)
├── packages/ # TypeScript packages
│ └── api/ # datto-rmm-api - TypeScript client
├── crates/ # Rust packages
│ └── datto-api/ # Rust API client
├── specs/ # OpenAPI specifications
│ └── datto-rmm-openapi.json
├── tooling/ # Build tools and scripts
│ └── scripts/ # Utility scripts
├── .ai-docs/ # AI assistant configuration
├── Cargo.toml # Rust workspace
├── turbo.json # Turborepo configuration
├── pnpm-workspace.yaml # pnpm workspace configuration
└── package.json # Root package.json

The MCP (Model Context Protocol) server that enables AI assistants to interact with Datto RMM.

apps/mcp-server/
├── src/
│ ├── index.ts # Entry point
│ ├── server.ts # MCP server setup
│ ├── config.ts # Configuration
│ ├── types.ts # Type definitions
│ ├── tools/ # MCP tool implementations
│ │ ├── account.ts # Account tools
│ │ ├── sites.ts # Site tools
│ │ ├── devices.ts # Device tools
│ │ ├── alerts.ts # Alert tools
│ │ ├── jobs.ts # Job tools
│ │ ├── audit.ts # Audit tools
│ │ ├── activity.ts # Activity log tools
│ │ └── system.ts # System tools
│ ├── resources/ # MCP resource handlers
│ └── utils/ # Utility functions
├── package.json
└── tsconfig.json

The TypeScript API client package.

packages/api/
├── src/
│ ├── index.ts # Main exports
│ ├── client.ts # Client factory
│ ├── platforms.ts # Platform configuration
│ ├── auth/ # OAuth handling
│ │ ├── middleware.ts # Auth middleware
│ │ └── oauth.ts # Token manager
│ └── generated/
│ └── types.ts # Auto-generated types
├── scripts/
│ └── generate.ts # Type generation script
├── package.json
└── tsconfig.json

The Rust API client crate.

crates/datto-api/
├── src/
│ ├── lib.rs # Main exports
│ ├── client.rs # Client implementation
│ └── platforms.rs # Platform configuration
├── build.rs # Code generation
├── Cargo.toml
└── README.md

Cached OpenAPI specifications used for code generation.

specs/
├── datto-rmm-openapi.json # Datto RMM API spec
└── README.md # Spec management docs

Utility scripts for development:

ScriptDescription
sync-openapi-spec.shFetch latest OpenAPI spec
generate-api-clients.shRegenerate all clients
setup-claude-files.shSet up AI assistant config

This documentation site, built with Starlight.

apps/docs/
├── src/
│ ├── content/
│ │ └── docs/ # Documentation pages
│ └── assets/ # Images and static files
├── astro.config.mjs # Astro configuration
└── package.json
TypeConventionExample
TypeScript packagesdatto-rmm-namedatto-rmm-api
Rust cratesdatto-namedatto-api
Fileskebab-caseoauth-middleware.ts

Defined in pnpm-workspace.yaml:

packages:
- 'apps/*'
- 'packages/*'
- 'tooling/*'

Defined in Cargo.toml:

[workspace]
resolver = "2"
members = ["crates/*"]

Turborepo manages the TypeScript build pipeline:

TaskDescription
buildBuild all packages
devStart development servers
generateGenerate API types
testRun tests
lintCheck code quality
typecheckTypeScript type checking
cleanClean build artifacts
generate → build → test
typecheck
lint

The datto-rmm-api#build task depends on generate to ensure types are generated before building. The datto-rmm-mcp-server#build task depends on datto-rmm-api#build since it uses the API client.