Skip to main content

Development Guide

Learn how to set up, develop, and deploy CallIntel LiveKit documentation locally.

Prerequisites

  • Node.js version 19 or higher
  • npm or yarn package manager
  • Git for version control
  • A text editor (VS Code recommended)

Installation

Install Mintlify CLI

The Mintlify CLI is required to develop and preview documentation locally.
npm i -g mint

Clone and Navigate

# Clone the repository
git clone https://github.com/rejoicehub/callintel-livekit.git
cd callintel-livekit/docs

Verify Installation

mint --version

Local Development

Preview Locally

Navigate to your docs directory and run:
mint dev
Your documentation will be available at http://localhost:3000.
The dev server includes hot reload - changes to .mdx files will automatically refresh your browser.

Custom Port

By default, Mintlify uses port 3000. To use a different port:
mint dev --port 3333
If the port is already in use, Mintlify will automatically use the next available port:
Port 3000 is already in use. Trying 3001 instead.

Documentation Structure

See /guides/documentation-guide for detailed information about the documentation structure and best practices.

Building for Production

Build Static Site

mint build
This creates a production-ready static site in the dist/ directory.

Verify Build

# Install serve to test locally
npm i -g serve

# Serve the built documentation
serve dist

# Visit http://localhost:3000

Editing Pages

Creating New Pages

  1. Create a new .mdx file in the appropriate directory:
# Create a new guide
touch guides/services/new-service.mdx
  1. Add front matter:
---
title: "Service Name"
description: "Brief description"
---
  1. Add content using Markdown/MDX
  2. Update docs.json to include the new page in navigation

Updating Navigation

Edit docs.json:
{
  "navigation": {
    "tabs": [
      {
        "tab": "Guides",
        "groups": [
          {
            "group": "Services",
            "pages": [
              "guides/services/new-service"
            ]
          }
        ]
      }
    ]
  }
}

MDX Components

Available Mintlify components:
<Card
  title="Title"
  icon="icon-name"
  href="/path"
>
  Description
</Card>

<Columns cols={2}>
  <Card>...</Card>
  <Card>...</Card>
</Columns>

<Note>Important information</Note>
<Warning>Warning message</Warning>
<Tip>Helpful tip</Tip>
<Check>Success message</Check>

<CodeBlock title="Example" language="python">
  code here
</CodeBlock>

<Expandable title="Click to expand">
  Hidden content
</Expandable>

Linting and Validation

Lint Documentation

mint lint
This checks for:
  • Invalid Markdown
  • Missing files referenced in navigation
  • Broken links

Validate Configuration

mint validate
Validates docs.json structure.

Customization

Colors

Edit docs.json to customize colors:
{
  "colors": {
    "primary": "#16A34A",
    "light": "#07C983",
    "dark": "#15803D"
  }
}
Place SVG files in docs/logo/:
  • light.svg - Light mode logo
  • dark.svg - Dark mode logo
Add links in docs.json:
{
  "navigation": {
    "global": {
      "anchors": [
        {
          "anchor": "GitHub",
          "href": "https://github.com/rejoicehub/callintel-livekit",
          "icon": "github"
        }
      ]
    }
  }
}

Best Practices

Writing Quality Documentation

  1. Clear titles - Use descriptive, action-oriented titles
  2. Structure - Use headings to organize content
  3. Examples - Include code examples for every concept
  4. Screenshots - Add visuals for UI-heavy topics
  5. Links - Link to related documentation
  6. Tone - Be professional but friendly
  7. Updates - Keep docs in sync with code

Code Examples

# Good: Clear, runnable example
from Service.AgentService import AgentService

service = AgentService()
agent = await service.create_agent({
    "name": "Support Agent",
    "ai_provider": "gemini"
})

Formatting

  • Use bold for emphasis
  • Use code for filenames and variables
  • Use code blocks for multi-line code
  • Use tables for structured data

Deployment

GitHub Pages

Documentation is automatically deployed when you push to main branch:
git add docs/
git commit -m "Update documentation"
git push origin main
Check .github/workflows for CI/CD configuration.

Custom Domain

Update docs.json navbar to reflect your domain:
{
  "navbar": {
    "primary": {
      "type": "button",
      "label": "Get Started",
      "href": "https://yourdomain.com/guides/getting-started/quickstart"
    }
  }
}

Troubleshooting

Dev Server Not Starting

# Clear cache
rm -rf .next

# Restart server
mint dev

Port Already in Use

# Find process using port 3000
lsof -i :3000

# Kill process
kill -9 <PID>

# Restart
mint dev

Changes Not Appearing

  1. Check file is saved
  2. Refresh browser (or wait for hot reload)
  3. Check browser console for errors
  4. Verify file path in docs.json

Build Errors

# Check for syntax errors
mint lint

# Validate configuration
mint validate

# Look for missing imports or broken links

CI/CD Pipeline

Documentation builds and deploys automatically via GitHub Actions.

Manual Deployment

# Build production version
mint build

# Deploy to your hosting provider
# (See your deployment configuration)

Version Control

Git Workflow

# Create a branch for documentation updates
git checkout -b docs/update-guides

# Make changes
vim guides/services/new-service.mdx

# Commit changes
git add docs/
git commit -m "docs: add new service guide"

# Push and create PR
git push origin docs/update-guides

Commit Messages

Use conventional commits:
docs: add API authentication guide
docs: fix typo in quick start
docs: update Docker deployment instructions

Performance

Optimization Tips

  1. Compress images before adding
  2. Use appropriate image formats (PNG for graphics, JPG for photos)
  3. Link to external resources instead of embedding
  4. Keep pages focused and concise

Analytics

Track documentation usage via:
  • Google Analytics
  • Mintlify Dashboard
  • Custom tracking

Support and Resources

Next Steps

Please note that each CLI release is associated with a specific version of Mintlify. If your local preview does not align with the production version, please update the CLI:
npm mint update
The CLI can assist with validating links in your documentation. To identify any broken links, use the following command:
mint broken-links

Troubleshooting

This may be due to an outdated version of node. Try the following:
  1. Remove the currently-installed version of the CLI: npm remove -g mint
  2. Upgrade to Node v19 or higher.
  3. Reinstall the CLI: npm i -g mint