Cover image for project: NEXUS Slack IN PROGRESS

Technical summary

NEXUS Slack connects the panel to Slack through Incoming Webhooks and the Web API (Bot Token), letting you send messages, Block Kit cards and operational notifications to team channels. The plugin offers dual configuration (webhook or bot), delivery audit with channel caching, /slack slash commands and automatic task notifications, with credential masking and an integrated connection test.

Executed scope

  • Plugin registration in plugin.php: registerTab('slack', tab.php) with the message-circle icon (Communication category), registerDoc('slack', doc.md) and 11 API actions via registerApiAction.
  • Database: MySQL tables slack_history (id, type, target, message_preview, status, http_code, response_data, task_id, created_at) and slack_cache (kind, query_key, data, status, updated_at with UNIQUE uk_kind_key) — created with CREATE TABLE IF NOT EXISTS in slack_install(); no install.sql.
  • Centralized configuration in slack_settings (via DB::getConfig): webhook_url, bot_token, default_channel (#general), bot_username, bot_icon_emoji (:shield:) and the auto_notify_tasks/auto_notify_alerts toggles; slack_public_config() only exposes masked values (slack_mask_secret).
  • Incoming Webhook delivery (slack_send_webhook): POST to hooks.slack.com/services/... with support for text, blocks (Block Kit) and attachments, short cURL timeouts and full history logging.
  • Slack Web API delivery (slack_send_bot_message): chat.postMessage with Authorization: Bearer xoxb-..., hybrid mode in slack_send_message (auto mode uses the bot when channel + token are configured) and colored cards via attachment (default Aubergine #4A154B).
  • Bot lookups: slack_auth_test() (auth.test — identifies team and bot) and slack_get_channels() (conversations.list filtering public/private channels) with a 1-hour TTL cache (SLACK_CACHE_TTL).
  • Connection test (slack_test_connection): validates the webhook and/or bot authentication, returning per-mode details.
  • Status and history: slack_status (totals, successes, errors and mode — Webhook, Web API or Hybrid), slack_history (limit 1–100) and slack_history_clear (TRUNCATE).
  • Task auto-dispatch: slack_handle_task_event() wired into the core via webhook_async.php — automatic cards for task.created, task.updated (start, review and completion) and task.deleted, with state-based colors (blue #36C5F0, green #2EB67D, amber #ECB22E, red #E01E5A), <!here> mention on critical priority, direct link (SITE_URL + /index.php?view=) and respect for the auto_notify_tasks/auto_notify_alerts toggles.
  • Fast Responses: fastr.json manifest with /slack (status, ping/test, send <message>) plus slack_fastr_suggest for suggestions.
  • MCP tool nexus_slack_send_message: exposed in the nexus-mcp-server (schema text/title/description/color/channel/task_id) calling the slack_send action via Bearer — AI agents send operational alerts directly.
  • Intel Hub: nx_intel_register_enricher('slack', ['_text'], 'slack_intel_enrich', 51) — exposes the notification channel as configured/not configured.
  • Interface (tab.php, 764 lines): 4 tabs (Send, History, Bot/Channels, Settings) with 4 KPIs, quick presets (Security Incident, Deploy/Release, Daily Standup, Maintenance and Task Test) and a real-time Live Preview in Slack message style.
  • Critical CI security alerts can use the Slack webhook via notify.php (notifications.slack_webhook_url).

Stack and tools

  • PHP 8 backend (no framework) + MySQL (slack_history, slack_cache)
  • Slack Incoming Webhooks + Slack Web API (chat.postMessage, auth.test, conversations.list)
  • Block Kit (blocks) + attachments (cards with colored side bar)
  • Alpine.js + Tailwind CSS (tab with 4 tabs, KPIs, presets and live preview)
  • Internal Plugin API (PluginManager tabs/docs/actions + fastr.json + intel enricher)
  • cURL with timeouts and NEXUS API Bearer token authentication

Operational tags

  • Slack
  • Notifications
  • Webhooks
  • Web API
  • Block Kit
  • Messages
  • Alerts
  • Communication
  • NEXUS Plugin

Operational result

  • Two delivery modes: Incoming Webhook (fast, no app) or Slack Web API (multi-channel with bot), with automatic hybrid mode.
  • Rich messages: plain text, structured Block Kit or cards with colored side bar and fields.
  • Full audit trail: every delivery records HTTP code, preview, response payload and optional task_id in slack_history.
  • Slash commands: /slack status, /slack ping and /slack send <message> straight from the Fastr terminal.
  • Auto-dispatch: automatic cards for task creation, update and deletion with state-based colors and direct link.
  • Security: credentials masked in the UI and in API responses; short cURL timeouts; TTL cache to avoid rate limits.

GitHub progress (issues)

Real-time panel with latest repository issues.

abertas (amostra): -- fechadas (amostra): -- base: -- ultimas issues

carregando andamento...

Real results

NEXUS Slack connects the panel to Slack through Incoming Webhooks and the Web API (Bot Token), letting you send messages, Block Kit cards and operational notifications to team channels. The plugin offers dual configuration (webhook or bot), delivery audit with channel caching, /slack slash commands and automatic task notifications, with credential masking and an integrated connection test.

Architecture and organization

Execution and operations

The project follows reproducible execution flow with technical validation in production-like environments.

Screenshots

Talk about this project

Apply this implementation pattern in your environment and accelerate delivery with technical consistency.