CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.Project Overview
This is the official Rhombus API documentation site built with Mintlify. It documents all API endpoints with auto-generated content from OpenAPI specifications that sync nightly from production. Live site: https://api-docs.rhombus.community/ API source: https://api2.rhombussystems.com/api/openapi/public.json The Rhombus API is currently unversioned β a single version ("version": "1.0") serves all consumers. See VERSIONING.md for the plan to introduce versioning when breaking changes occur.
Prerequisites
- Node.js 19+
- Mintlify CLI (
npm i -g mint) - Python 3.11+ (for maintenance scripts)
Development Commands
All commands should be run from the root directory wheredocs.json lives.
Local Development
Maintenance Scripts
Automation (GitHub Actions)
The nightly OpenAPI sync (.github/workflows/sync-openapi.yml) runs at 9 AM UTC and follows this pipeline:
- Fetches latest spec from
https://api2.rhombussystems.com/api/openapi/public.json detect_openapi_changes.pyβ compares old/new specs, produces a change report JSON- Copies new spec to
api-reference/openapi.json build-api-navigation.pyβ rebuilds API Reference navigation indocs.jsongenerate_changelog_entry.py+insert_changelog_entry.pyβ adds changelog entry- Creates a pull request (not a direct commit) on branch
automated/openapi-sync
workflow_dispatch.
Repository Structure
docs/ subdirectory.
Navigation Structure
The documentation uses a 3-tab navigation system configured indocs.json:
- Guides: Getting started (index, resources, webhooks, changelog) + implementation guides by topic (Cameras, Access Control, Alarm Monitoring, IoT Sensors, More)
- Integrations: Low code / no code platforms (Zapier, Make, n8n) + AI & LLMs (Documentation MCP)
- API Reference: Complete API endpoint documentation with live testing (auto-generated from OpenAPI spec)
Architecture
docs.json Structure
- Format: JSON with nested navigation groups; 107KB+ β do not hand-edit the API Reference section
- API endpoints: Referenced as
"api-reference/openapi.json {method} {path}" - Modifying API nav: Always use
python3 scripts/build-api-navigation.pyto rebuild the API Reference navigation from the OpenAPI spec. Manual edits to that section will be overwritten by the nightly sync.
Content Types
- Hand-written MDX: Implementation guides, quickstart, MCP documentation
- Auto-generated API docs: All endpoint pages under API Reference tab (do not manually create these)
- AI context files:
llms.txtandllms-full.txtfor AI assistants
Key Files
docs.jsonβ Main config; 107KB+ with 846+ endpoint references. Schema: https://mintlify.com/docs.jsonapi-reference/openapi.jsonβ Full OpenAPI spec synced from productionapi-reference/overview.mdxβ Hand-written API reference landing pagecustom.cssβ Custom styling overridesVERSIONING.mdβ Plan for introducing API versioning when breaking changes occur
API-Specific Conventions
- Base URL:
https://api2.rhombussystems.com - Media URL:
https://media.rhombussystems.com(for media/streaming endpoints) - Authentication headers:
x-auth-scheme: api-token+x-auth-apikey: YOUR_API_KEY - Endpoint grouping: By service area (Access Control, Camera, Climate, etc.) with subgroups: Create & Add, Get & Find, Update & Modify, Delete & Remove, Other Operations
Working Relationship
- Push back on ideas when it leads to better documentation - cite sources
- ALWAYS ask for clarification rather than making assumptions
- NEVER lie, guess, or make up anything
- Search for existing content before adding new pages to avoid duplication
- Start by making the smallest reasonable changes
Content Standards
Frontmatter Requirements
Every MDX file must have:Writing Standards
- Second-person voice (βyouβ)
- Active voice and present tense
- Prerequisites at start of procedural content
- Test all code examples before publishing
- Match style and formatting of existing pages
- Include both basic and advanced use cases
- Language tags on all code blocks
- Alt text on all images
- Relative paths for internal links
- Start page content with h2 headings (h1 is generated from frontmatter title)
Code Example Requirements
- Complete, runnable examples users can copy
- Proper error handling and edge cases
- Realistic data, not placeholders
- Include expected outputs
- Never include real API keys or secrets
- Always include authentication in code examples (
x-auth-apikeyheader)
Component Selection
- Steps: Sequential instructions and procedures
- Tabs: Platform-specific content or alternatives
- CodeGroup: Same concept in multiple languages
- Accordions: Progressive disclosure
- RequestExample/ResponseExample: API endpoint docs
- ParamField: API parameters
- ResponseField: API responses
- Expandable: Nested properties
<Note>, <Tip>, <Warning>, <Info>, <Check>
Git Workflow
- NEVER use
--no-verifywhen committing - NEVER skip or disable pre-commit hooks
- Ask how to handle uncommitted changes before starting
- Create a new branch when no clear branch exists
- Commit frequently throughout development
Critical Donβts
- Manually edit the API Reference navigation in
docs.jsonβ usebuild-api-navigation.py - Manually create endpoint pages under API Reference β Mintlify auto-generates these from the OpenAPI spec
- Skip frontmatter on any MDX file
- Use absolute URLs for internal links
- Modify the GitHub Action workflow without understanding the full sync pipeline