TriLuna Try it free

webhook-tools-admin-ui

Webhook Tools Admin UI

Overview

Admin interface for managing webhook tools at https://triluna.app/admin/tools

Features

Database Schema

Added to webhook_tools table:

  • stage - ENUM(‘pilot’, ‘beta’, ‘production’) - Tracks development phase
  • enabled_by_default - BOOLEAN - Whether tool is on by default for new users

API Endpoints

All endpoints require admin authentication: Authorization: Bearer <token>

GET /api/admin/webhook-tools

List all webhook tools with usage statistics.

Response:

{
  "tools": [
    {
      "id": 1,
      "tool_name": "sms",
      "display_name": "SMS Messages",
      "stage": "production",
      "is_active": true,
      "enabled_by_default": false,
      "enabled_user_count": 5,
      "agent_config_count": 12,
      ...
    }
  ]
}

GET /api/admin/webhook-tools/:id

Get detailed information about a specific tool.

PATCH /api/admin/webhook-tools/:id

Update tool settings.

Supported fields:

  • display_name
  • description
  • webhook_url
  • method
  • default_headers
  • default_body_template
  • required_permissions
  • configuration_schema
  • is_active
  • stage - Must be ‘pilot’, ‘beta’, or ‘production’
  • enabled_by_default

POST /api/admin/webhook-tools

Create a new webhook tool.

Required fields:

  • tool_name
  • display_name
  • webhook_url

DELETE /api/admin/webhook-tools/:id

Delete a webhook tool (only if not in use).

UI Components

AdminWebhookToolsPage

Main page at /admin/tools

Features:

  • Summary cards showing total tools, active tools, production tools, and total users
  • Sortable table of all webhook tools
  • Inline editing for stage, active status, and default-on status
  • Usage statistics (user count, agent count)

WebhookToolsManagement

Core management component with:

  • Real-time updates
  • Toggle controls for is_active and enabled_by_default
  • Stage selector (pilot → beta → production)
  • Color-coded stage badges
  • Usage metrics display

Stage Workflow

  1. Pilot (Yellow badge)

    • New experimental features
    • Limited testing
    • Not enabled by default
  2. Beta (Blue badge)

    • Broader testing phase
    • More stable than pilot
    • May be enabled selectively
  3. Production (Green badge)

    • Fully tested and stable
    • Available for general use
    • Can be enabled by default

Access

URL: https://triluna.app/admin/tools

Requirements:

  • Admin role required
  • Authenticated session

Files Modified/Created

Backend

  • /webapp/server/migrations/add_stage_to_webhook_tools.sql - Database migration
  • /webapp/server/routes/adminWebhookToolsRoutes.js - API routes
  • /webapp/server/server.js - Added routes registration

Frontend

  • /webapp/client/src/pages/AdminWebhookToolsPage.tsx - Page component
  • /webapp/client/src/components/admin/WebhookToolsManagement.tsx - Management UI
  • /webapp/client/src/App.tsx - Added route

Current Tools

All tools currently set to:

  • stage: production
  • enabled_by_default: false

Available tools:

  1. SMS Messages
  2. Google Sheets
  3. GitHub Integration
  4. Calendar Integration
  5. Email Integration
  6. CRM Integration
  7. Payment Processing
  8. Custom Webhook