📚 Plugin Development Guide

Build powerful plugins for the Field Service Management system

📥 Download Complete Guide

🚀 Quick Start

A plugin requires just two files to get started:

your-plugin/
├── plugin.json    # Plugin metadata
└── index.js       # Backend logic

Minimal plugin.json:

{
  "id": "your-plugin",
  "name": "your-plugin",
  "displayName": "Your Plugin Name",
  "version": "1.0.0",
  "author": "Your Company",
  "main": "index.js"
}

Minimal index.js:

module.exports = {
  id: 'your-plugin',
  name: 'your-plugin',
  version: '1.0.0',
  
  async onInstall(context) {
    // Setup database tables
  },
  
  routes: [
    // Your API endpoints
  ]
};

Key Features

🔌

Lifecycle Hooks

onInstall, onEnable, onUninstall for full plugin lifecycle control

🌐

Custom API Routes

Add REST endpoints under /api/plugins/your-plugin/

🗄️

Database Integration

Create tables, access core schema, full SQL support

⚛️

Frontend Components

React/TypeScript components with auto-registration

📊

Navigation Tabs

Add custom tabs to the main navigation bar

🏢

Multi-Tenant

Automatic company code isolation for data security

🎯 Core Concepts

  • Plugin lifecycle management
  • Company code isolation (multi-tenant)
  • RESTful API routes
  • Navigation integration
  • Frontend component system

💾 Database Access

  • Access to Users, Customers, Sites tables
  • Tickets, Assets, Vendors schemas
  • Create custom tables with CompanyCode
  • SQL Server connection pool
  • Transaction support

🔐 Security & Isolation

  • Automatic company code filtering
  • User context in all requests
  • Role-based access control
  • SQL injection prevention
  • Secure API endpoints

🛠️ Development Tools

  • Hot reload development mode
  • Console logging & debugging
  • Example plugins included
  • Plugin templates available
  • Error handling patterns

📦 Packaging & Deployment

  • Simple ZIP file upload
  • One-click installation
  • Enable/disable toggle
  • Version management
  • Clean uninstall process

✅ Best Practices

  • Always filter by CompanyCode
  • Use parameterized queries
  • Index CompanyCode columns
  • Log important operations
  • Handle errors gracefully

Ready to Build?

Download the complete guide with examples, code samples, and detailed documentation

📥 Download Complete Guide (60KB)

📖 What's in the Complete Guide?

• Complete Examples
Working tracker plugin with frontend & backend
• Database Schema
All core tables with integration patterns
• API Reference
Available endpoints and usage examples
• Component Guide
React/TypeScript component patterns
• Troubleshooting
Common issues and solutions
• Best Practices
Security, performance, and architecture tips