Skip to content

📄 Contributing to the Documentation

Welcome! This guide will help you contribute to the Tellia documentation. Our docs are built with VitePress, making it easy to write and maintain high-quality documentation.

Quick Start

Prerequisites

  • Node.js 22+ installed (we recommend using NVM)
  • Basic knowledge of Markdown
  • The repository cloned locally

Running the Documentation Locally

  1. Navigate to the backend repository:

    bash
    cd agri_backend
  2. Install dependencies (if not already done):

    bash
    npm install
  3. Start the VitePress dev server:

    bash
    npm run docs:dev
  4. Open your browser to http://localhost:5173 (or the port shown in your terminal)

The documentation will hot-reload as you make changes!

Documentation Structure

Our documentation is organized in the /docs folder:

docs/
├── .vitepress/          # VitePress configuration
│   └── config.mts       # Site config, navigation, and sidebar
├── getting-started/     # Onboarding guides
├── infrastructure/      # Deployment and infrastructure docs
├── observability/       # Logging, APM, and monitoring
├── coding-guides/       # Development best practices
└── index.md            # Documentation homepage

Writing Documentation

Creating a New Page

  1. Create a new .md file in the appropriate folder:

    bash
    # Example: Adding a new coding guide
    touch docs/coding-guides/my-new-guide.md
  2. Add frontmatter and content:

    markdown
    # My New Guide
    
    Brief introduction to what this guide covers.
    
    ## Section 1
    
    Content here...
  3. Add the page to the sidebar in docs/.vitepress/config.mts:

    typescript
    {
      text: '🥷🏿 Coding Guides',
      items: [
        { text: 'My New Guide', link: '/coding-guides/my-new-guide' },
        // ... other guides
      ]
    }

Markdown Features

VitePress supports extended Markdown features, read their documentation ! Ò

Deploying changes

bash
npm run docs:build && npm run docs:deploy

Configuration

The main configuration file is docs/.vitepress/config.mts. This controls:

  • Site metadata (title, description)
  • Navigation (top nav bar)
  • Sidebar (left sidebar structure)
  • Theme customization
  • Plugins (we use Mermaid for diagrams)

Tips and Best Practices

  • Preview your changes before submitting a PR
  • Check for broken links - VitePress will warn you about dead links
  • Use consistent formatting - follow the style of existing docs
  • Keep it maintainable - documentation should be easy to update
  • Cross-reference related documentation pages
  • Version-specific info - note if a feature is version-specific

Getting Help