Skip to content

Development Guide

This section contains guides for developing and contributing to the Datto RMM API clients.

  • Node.js v22 (use nvm use to activate from .nvmrc)
  • pnpm v9.14.2+
  • Rust (latest stable)
Terminal window
# Clone and install
git clone https://github.com/josh-fisher/datto-rmm.git
cd datto-rmm
pnpm install
# Fetch the OpenAPI spec
pnpm sync:openapi
# Generate API clients
pnpm generate:api
# Build everything
pnpm build
  1. Edit files in packages/api/src/
  2. Run pnpm --filter datto-rmm-api build to compile
  3. Run pnpm --filter datto-rmm-api typecheck to verify types
  1. Edit files in crates/datto-api/src/
  2. Run cargo check -p datto-api to verify
  3. Run cargo build -p datto-api to compile

When the Datto RMM API is updated:

Terminal window
# Fetch latest spec
pnpm sync:openapi
# Regenerate all clients
pnpm generate:api
# Rebuild
pnpm build
  • Strict mode enabled
  • Explicit types for public APIs
  • Use type imports: import type { Foo } from './foo.js'
  • ESM modules with .js extensions in imports
  • Follow standard Rust conventions
  • Use thiserror for error types
  • Async/await with tokio
TypeConvention
TypeScript fileskebab-case.ts
Rust filessnake_case.rs
Directorieskebab-case
Terminal window
# Run all tests
pnpm test
# Run tests for specific package
pnpm --filter datto-rmm-api test
Terminal window
# Run all tests
cargo test
# Run tests for specific crate
cargo test -p datto-api
  1. Add types/interfaces in appropriate file
  2. Export from index.ts
  3. Add documentation in JSDoc comments
  4. Update README if needed
  5. Add tests
  1. Add types/functions in appropriate module
  2. Export from lib.rs
  3. Add doc comments (///)
  4. Update README if needed
  5. Add tests

Update docs in apps/docs/src/content/docs/:

Terminal window
# Start docs dev server
pnpm --filter @datto-rmm/docs dev

Visit http://localhost:4000 to preview changes.

  • TypeScript: JSDoc comments for public APIs
  • Rust: Doc comments (///) for public items

If Datto adds a new regional platform:

  1. TypeScript: Add to packages/api/src/platforms.ts
  2. Rust: Add to crates/datto-api/src/platforms.rs
  3. Docs: Update platform tables in documentation
Terminal window
# Update all pnpm dependencies
pnpm update
# Update Rust dependencies
cargo update
Terminal window
# Clean, generate, build, and typecheck
pnpm clean && pnpm generate:api && pnpm build && pnpm typecheck

Run pnpm sync:openapi to fetch the spec.

The spec may have changed. Check the generated types and update any affected code.

Progenitor doesn’t yet support OpenAPI 3.1.0. The crate will compile but without generated types.

  • Check existing documentation
  • Review the Architecture section
  • Open an issue on GitHub