{"id":31656528,"url":"https://github.com/kubex-ecosystem/gobe","last_synced_at":"2025-10-15T17:18:11.596Z","repository":{"id":300382713,"uuid":"992502088","full_name":"kubex-ecosystem/gobe","owner":"kubex-ecosystem","description":"GoBE is a complete backend with MCP, CLI, GUI, API, and more for help you managing your technology stack","archived":false,"fork":false,"pushed_at":"2025-10-05T01:48:12.000Z","size":9086,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-05T03:49:18.516Z","etag":null,"topics":["authentication","authentication-backend","automated","automation","backend","discord-bot","golang","mcp-server","open-source","zero-configuration"],"latest_commit_sha":null,"homepage":"https://kubex-ecosystem.github.io/gobe/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kubex-ecosystem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":"support/.gitleaks.toml","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE.md","maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-05-29T09:00:31.000Z","updated_at":"2025-10-01T04:22:35.000Z","dependencies_parsed_at":"2025-07-27T03:06:41.471Z","dependency_job_id":"1fdcd8ae-56e9-467d-b39e-ab99ad2da509","html_url":"https://github.com/kubex-ecosystem/gobe","commit_stats":null,"previous_names":["rafa-mori/gobe","kubex-ecosystem/gobe"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/kubex-ecosystem/gobe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubex-ecosystem%2Fgobe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubex-ecosystem%2Fgobe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubex-ecosystem%2Fgobe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubex-ecosystem%2Fgobe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kubex-ecosystem","download_url":"https://codeload.github.com/kubex-ecosystem/gobe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubex-ecosystem%2Fgobe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279095187,"owners_count":26102256,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-15T02:00:07.814Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","authentication-backend","automated","automation","backend","discord-bot","golang","mcp-server","open-source","zero-configuration"],"created_at":"2025-10-07T14:14:42.358Z","updated_at":"2025-10-15T17:18:11.561Z","avatar_url":"https://github.com/kubex-ecosystem.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- ---\ntitle: GoBE - Modular \u0026 Secure Back-end\nversion: 1.3.5\nowner: kubex\naudience: dev\nlanguages: [en, pt-BR]\nsources: [internal/module/info/manifest.json, https://github.com/kubex-ecosystem/gobe]\nassumptions: []\n--- --\u003e\n\n\u003c!-- markdownlint-disable MD013 MD025 --\u003e\n# GoBE - Modular \u0026 Secure Back-end\n\n![GoBE Banner](docs/assets/top_banner_lg_b.png)\n\n[![Go](https://img.shields.io/badge/Go-1.25+-00ADD8?logo=go\u0026logoColor=white)](https://go.dev/)\n[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/kubex-ecosystem/gobe/blob/main/LICENSE)\n[![Automation](https://img.shields.io/badge/automation-zero%20config-blue)](#features)\n[![Modular](https://img.shields.io/badge/modular-yes-yellow)](#features)\n[![Security](https://img.shields.io/badge/security-high-red)](#features)\n[![MCP](https://img.shields.io/badge/MCP-enabled-orange)](#mcp-support)\n[![AI Providers](https://img.shields.io/badge/AI%20Providers-4-purple)](#ai-providers)\n[![Webhooks](https://img.shields.io/badge/webhooks-functional-green)](#webhooks)\n[![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)](https://github.com/kubex-ecosystem/gobe/blob/main/CONTRIBUTING.md)\n[![Build](https://github.com/kubex-ecosystem/gobe/actions/workflows/kubex_go_release.yml/badge.svg)](https://github.com/kubex-ecosystem/gobe/actions/workflows/kubex_go_release.yml)\n\n**Code Fast. Own Everything.** — A modular, secure, and zero-config backend for modern Go applications with full AI integration.\n\n## TL;DR\n\nGoBE is a modular Go backend that runs **with zero configuration** and provides ready-to-use REST APIs, AI providers, webhooks, and MCP (Model Context Protocol). One command = a complete server with authentication, database, 4 AI providers, and integrated system tools.\n\n```bash\nmake build \u0026\u0026 ./gobe start  # Zero config, instant backend with AI\ncurl http://localhost:3666/mcp/tools  # MCP tools ready\ncurl http://localhost:3666/providers  # OpenAI, Anthropic, Gemini, Groq ready\ncurl http://localhost:3666/v1/webhooks/health  # Webhook system ready\n```\n\n## **Table of Contents**\n\n1. [About the Project](#about-the-project)\n2. [Features](#features)\n3. [How to Run](#how-to-run)\n4. [AI Providers](#ai-providers)\n5. [MCP Support](#mcp-support)\n6. [Webhooks](#webhooks)\n7. [Usage](#usage)\n    - [CLI](#cli)\n    - [Configuration](#configuration)\n8. [API Reference](#api-reference)\n9. [Roadmap](#roadmap)\n10. [Contributing](#contributing)\n11. [Contact](#contact)\n\n---\n\n## **About the Project**\n\nGoBE is a modular backend built with Go that embodies the Kubex principle: **No Lock-in. No Excuses.** It delivers **security, automation, and flexibility** in a single binary that runs anywhere — from your laptop to enterprise clusters.\n\n### **Mission Alignment**\n\nFollowing Kubex's mission to democratize modular technology, GoBE provides:\n\n- **DX First:** One command starts everything — server, database, authentication, MCP tools\n- **Total Accessibility:** Runs without Kubernetes, Docker, or complex setup\n- **Module Independence:** Every component (CLI/HTTP/Jobs/Events) is a full citizen\n\n### **Current Status - Production Ready**\n\n✅ **Zero-config:** Auto-generates certificates, passwords, keyring storage\n✅ **AI Providers:** OpenAI, Anthropic Claude, Google Gemini, Groq with streaming support\n✅ **MCP Protocol:** Model Context Protocol with dynamic tool registry and shell commands\n✅ **Webhook System:** Functional webhook processing with AMQP integration and retry logic\n✅ **Discord Integration:** Real MCP tool execution via Discord bot with formatted responses\n✅ **Modular Architecture:** Clean interfaces, exportable via `factory/`\n✅ **Database Integration:** PostgreSQL/SQLite via `gdbase` Docker management\n✅ **REST API:** Authentication, users, products, clients, jobs, webhooks, AI chat\n✅ **Security Stack:** Dynamic certificates, JWT, keyring, rate limiting, whitelisted shell commands\n✅ **CLI Interface:** Complete management via Cobra commands\n✅ **Multi-platform:** Linux, macOS, Windows (AMD64, ARM64)\n✅ **Testing:** Unit tests + integration tests for MCP endpoints and providers\n✅ **CI/CD:** Automated builds and releases\n\n## **Project Evolution**\n\nGoBE has evolved from a simple backend server to a comprehensive AI-integrated platform. **Version 1.3.5** represents a significant milestone with the addition of:\n\n### **Recent Major Additions (v1.3.5)**\n\n- **🤖 Full AI Provider Ecosystem:** Complete integration with 4 major AI providers\n- **🔗 Real Discord MCP Integration:** Transform Discord bots from placeholder to functional AI tools\n- **📬 Production Webhooks:** Fully functional webhook system with persistence and retry logic\n- **⚡ Streaming AI Responses:** Real-time AI chat with Server-Sent Events\n- **🔧 Enhanced MCP Tools:** Shell command execution with security whitelisting\n\nThe system now serves as a **complete AI backend solution**, enabling developers to build AI-powered applications without complex infrastructure setup. The modular architecture makes it suitable for everything from personal projects to enterprise applications.\n\n---\n\n## **Features**\n\n### **🤖 AI Integration**\n\n✨ **4 AI Providers Ready**\n- **OpenAI** (GPT-3.5, GPT-4 series) with customizable base URLs\n- **Anthropic Claude** (3.5 Sonnet, Opus, Haiku) with streaming support\n- **Google Gemini** (1.5 Pro, Flash) with proper cost calculation\n- **Groq** (Llama, Mixtral models) with ultra-fast inference\n\n🎯 **Smart Provider Management**\n- Dynamic provider switching and availability checks\n- External API key support per request\n- Automatic cost estimation and usage tracking\n- Streaming responses with Server-Sent Events\n\n### **🔧 System Integration**\n\n✨ **MCP Protocol (Model Context Protocol)**\n- Dynamic tool registry with thread-safe execution\n- Built-in system monitoring tools\n- Shell command execution with security whitelisting\n- Discord bot integration with real tool functionality\n\n📬 **Production Webhook System**\n- AMQP/RabbitMQ integration for async processing\n- Persistent webhook storage with retry logic\n- Specialized handlers (GitHub, Discord, Stripe, etc.)\n- RESTful management API with pagination\n\n### **🏗️ Core Platform**\n\n✨ **Fully modular**\n- All logic follows well-defined interfaces, ensuring encapsulation\n- Can be used as a server or as a library/module\n- Factory pattern for all major components\n\n🔒 **Zero-config, but customizable**\n- Runs without initial configuration, but supports customization via files\n- Automatically generates certificates, passwords, and secure settings\n- Environment variable override support\n\n🔗 **Direct integration with `gdbase`**\n- Database management via Docker\n- Automatic optimizations for persistence and performance\n- Multi-database support (PostgreSQL, SQLite)\n\n🛡️ **Advanced authentication**\n- Dynamically generated certificates\n- Random passwords and secure keyring\n- JWT token management with refresh logic\n\n🌐 **Comprehensive REST API**\n- AI chat endpoints with streaming\n- Webhook management and monitoring\n- Authentication, user management, products, clients\n- System health and metrics\n\n📋 **Enterprise-grade monitoring**\n- Protected routes, secure storage, and request monitoring\n- Real-time system metrics via MCP tools\n- Connection health checks (DB, AMQP, webhooks)\n\n🧑‍💻 **Powerful CLI**\n- Commands to start, configure, and monitor the server\n- Zero-config startup with detailed logging\n\n---\n\n## **How to Run**\n\n**One Command. All the Power.**\n\n### Quick Start\n\n```bash\n# Clone and build\ngit clone https://github.com/kubex-ecosystem/gobe.git\ncd gobe\nmake build\n\n# Start everything (zero config)\n./gobe start\n\n# Server ready at http://localhost:3666\n# MCP endpoints: /mcp/tools, /mcp/exec\n# Health check: /health\n```\n\n### Requirements\n\n- **Go 1.25+** (for building from source)\n- **Docker** (optional, for advanced database features)\n- **API Keys** (optional, for AI providers - can be set per request)\n- **No Kubernetes, no complex setup required**\n\n### Build Options\n\n```bash\nmake build          # Production build\nmake build-dev      # Development build\nmake install        # Install binary + environment setup\nmake clean          # Clean artifacts\nmake test           # Run all tests\n```\n\n---\n\n## **AI Providers**\n\nGoBE includes **4 production-ready AI providers** with streaming support and cost tracking.\n\n### **Available Providers**\n\n| Provider | Models | Features | Pricing |\n|----------|--------|----------|---------|\n| **OpenAI** | GPT-3.5, GPT-4, GPT-4o | Streaming, custom base URL | $0.002-$0.03 per 1K tokens |\n| **Anthropic** | Claude 3.5 Sonnet, Opus, Haiku | Streaming, long context | $0.25-$75 per 1M tokens |\n| **Google Gemini** | Gemini 1.5 Pro, Flash | Streaming, multimodal | $0.075-$10.50 per 1M tokens |\n| **Groq** | Llama 3.1, Mixtral | Ultra-fast inference | $0.05-$0.79 per 1M tokens |\n\n### **Usage Examples**\n\n#### **List Available Providers**\n```bash\ncurl http://localhost:3666/providers\n```\n\n#### **Chat with Streaming**\n```bash\ncurl -X POST http://localhost:3666/chat \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"provider\": \"openai\",\n    \"model\": \"gpt-4\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"Hello!\"}],\n    \"stream\": true,\n    \"temperature\": 0.7\n  }'\n```\n\n#### **Provider Switching**\n```bash\n# Use different providers for different tasks\ncurl -X POST http://localhost:3666/chat \\\n  -d '{\"provider\": \"anthropic\", \"model\": \"claude-3-5-sonnet-20241022\", ...}'\n\ncurl -X POST http://localhost:3666/chat \\\n  -d '{\"provider\": \"groq\", \"model\": \"llama-3.1-70b-versatile\", ...}'\n```\n\n#### **External API Keys**\n```bash\n# Use your own API key for a specific request\ncurl -X POST http://localhost:3666/chat \\\n  -H \"X-External-API-Key: your-api-key-here\" \\\n  -d '{\"provider\": \"openai\", ...}'\n```\n\n### **Provider Configuration**\n\nConfigure providers via environment variables or config files:\n\n```bash\n# Environment Variables\nexport OPENAI_API_KEY=\"sk-...\"\nexport ANTHROPIC_API_KEY=\"sk-ant-...\"\nexport GEMINI_API_KEY=\"...\"\nexport GROQ_API_KEY=\"gsk_...\"\n\n# Custom Base URLs (for OpenAI-compatible endpoints)\nexport OPENAI_BASE_URL=\"https://api.groq.com\"\n```\n\n### **Cost Tracking**\n\nEach response includes cost estimation:\n\n```json\n{\n  \"content\": \"Response text...\",\n  \"usage\": {\n    \"prompt_tokens\": 10,\n    \"completion_tokens\": 20,\n    \"total_tokens\": 30,\n    \"latency_ms\": 1500,\n    \"cost_usd\": 0.0006,\n    \"provider\": \"openai\",\n    \"model\": \"gpt-4\"\n  }\n}\n```\n\n---\n\n## **MCP Support**\n\nGoBE implements the **Model Context Protocol (MCP)** for seamless AI tool integration.\n\n### Available Endpoints\n\n```bash\nGET  /mcp/tools     # List available tools\nPOST /mcp/exec      # Execute tools\n```\n\n### Built-in Tools\n\n| Tool | Description | Args | Features |\n|------|-------------|------|----------|\n| `system.status` | Comprehensive system status with metrics | `detailed: boolean` | Runtime stats, memory usage, connection health |\n| `shell.command` | Execute safe shell commands | `command: string, args: array` | Whitelisted commands, 10s timeout, output capture |\n\n### Example Usage\n\n#### **List Available Tools**\n```bash\ncurl http://localhost:3666/mcp/tools\n```\n\n#### **System Status (Basic)**\n```bash\ncurl -X POST http://localhost:3666/mcp/exec \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"tool\": \"system.status\", \"args\": {\"detailed\": false}}'\n```\n\n#### **System Status (Detailed)**\n```bash\ncurl -X POST http://localhost:3666/mcp/exec \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"tool\": \"system.status\", \"args\": {\"detailed\": true}}'\n```\n\n#### **Execute Shell Commands**\n```bash\n# List files\ncurl -X POST http://localhost:3666/mcp/exec \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"tool\": \"shell.command\", \"args\": {\"command\": \"ls\", \"args\": [\"-la\"]}}'\n\n# Check system info\ncurl -X POST http://localhost:3666/mcp/exec \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"tool\": \"shell.command\", \"args\": {\"command\": \"uname\", \"args\": [\"-a\"]}}'\n\n# Check disk usage\ncurl -X POST http://localhost:3666/mcp/exec \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"tool\": \"shell.command\", \"args\": {\"command\": \"df\", \"args\": [\"-h\"]}}'\n```\n\n### **Security Features**\n\n- **Whitelisted Commands:** Only safe commands are allowed (`ls`, `pwd`, `date`, `uname`, etc.)\n- **Timeout Protection:** All commands timeout after 10 seconds\n- **Error Handling:** Proper error capture and reporting\n- **Admin Authentication:** Shell commands require admin privileges\n\n### MCP Architecture\n\n- **Dynamic Registry:** Tools registered at runtime, no restart needed\n- **Thread-Safe:** Concurrent tool execution with RWMutex protection\n- **Extensible:** Add custom tools via the Registry interface\n- **Integrated:** Uses existing manage controllers for system data\n\n---\n\n## **Webhooks**\n\nGoBE provides a **production-ready webhook system** with persistence, retry logic, and AMQP integration.\n\n### **Features**\n\n- ✅ **Persistent Storage:** In-memory storage with plans for database persistence\n- ✅ **AMQP Integration:** Async processing via RabbitMQ\n- ✅ **Retry Logic:** Automatic retry of failed webhook events\n- ✅ **Specialized Handlers:** GitHub, Discord, Stripe, generic webhooks\n- ✅ **RESTful API:** Complete CRUD operations with pagination\n- ✅ **Real-time Stats:** Monitor webhook processing in real-time\n\n### **Available Endpoints**\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| `POST` | `/v1/webhooks` | Receive webhook events |\n| `GET` | `/v1/webhooks/health` | Webhook system health + stats |\n| `GET` | `/v1/webhooks/events` | List webhook events (paginated) |\n| `GET` | `/v1/webhooks/events/:id` | Get specific webhook event |\n| `POST` | `/v1/webhooks/retry` | Retry all failed webhook events |\n\n### **Usage Examples**\n\n#### **Receive Webhooks**\n```bash\n# Generic webhook\ncurl -X POST http://localhost:3666/v1/webhooks \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-Webhook-Source: github\" \\\n  -H \"X-Event-Type: push\" \\\n  -d '{\"repository\": \"my-repo\", \"commits\": [...]}'\n```\n\n#### **Check System Health**\n```bash\ncurl http://localhost:3666/v1/webhooks/health\n```\n**Response:**\n```json\n{\n  \"status\": \"ok\",\n  \"timestamp\": \"2025-01-20T12:00:00Z\",\n  \"stats\": {\n    \"total_events\": 150,\n    \"processed_events\": 145,\n    \"failed_events\": 3,\n    \"pending_events\": 2,\n    \"uptime_seconds\": 3600,\n    \"amqp_connected\": true\n  }\n}\n```\n\n#### **List Webhook Events**\n```bash\n# All events (paginated)\ncurl \"http://localhost:3666/v1/webhooks/events?limit=10\u0026offset=0\"\n\n# Filter by source\ncurl \"http://localhost:3666/v1/webhooks/events?source=github\u0026limit=20\"\n```\n\n#### **Get Event Details**\n```bash\ncurl http://localhost:3666/v1/webhooks/events/123e4567-e89b-12d3-a456-426614174000\n```\n\n#### **Retry Failed Events**\n```bash\ncurl -X POST http://localhost:3666/v1/webhooks/retry\n```\n**Response:**\n```json\n{\n  \"status\": \"success\",\n  \"retried_count\": 3,\n  \"timestamp\": \"2025-01-20T12:00:00Z\",\n  \"message\": \"failed events queued for retry\"\n}\n```\n\n### **Webhook Event Types**\n\nThe system provides specialized handling for different webhook types:\n\n| Source | Event Type | Handler Features |\n|--------|------------|------------------|\n| **GitHub** | `github.push` | Repository info, commit details, AMQP notifications |\n| **Discord** | `discord.message` | Channel logging, bot response triggers |\n| **Stripe** | `stripe.payment` | Payment processing, user billing updates |\n| **Generic** | `user.created` | Welcome emails, profile creation |\n\n### **Integration Examples**\n\n#### **GitHub Integration**\n```bash\n# Configure GitHub webhook to point to your GoBE instance\n# Webhook URL: https://your-server.com/v1/webhooks\n# Content-Type: application/json\n# Events: push, pull_request, issues\n\ncurl -X POST https://your-server.com/v1/webhooks \\\n  -H \"X-GitHub-Event: push\" \\\n  -H \"X-Webhook-Source: github\" \\\n  -d @github_push_payload.json\n```\n\n#### **Discord Bot Integration**\n```bash\n# Discord events are automatically processed and can trigger MCP tools\ncurl -X POST http://localhost:3666/v1/webhooks \\\n  -H \"X-Webhook-Source: discord\" \\\n  -H \"X-Event-Type: message\" \\\n  -d '{\"channel_id\": \"123\", \"content\": \"!system status\", \"author\": {...}}'\n```\n\n### **AMQP Integration**\n\nWebhooks are automatically published to RabbitMQ queues:\n\n- **Exchange:** `gobe.events`\n- **Routing Key:** `webhook.received`\n- **Queue Bindings:** `gobe.system.events`, `gobe.mcp.tasks`\n\n**AMQP Message Format:**\n```json\n{\n  \"id\": \"uuid\",\n  \"source\": \"github\",\n  \"event_type\": \"push\",\n  \"payload\": {...},\n  \"headers\": {...},\n  \"timestamp\": \"2025-01-20T12:00:00Z\",\n  \"processed\": false,\n  \"status\": \"received\"\n}\n```\n\n---\n\n## **Usage**\n\n### CLI\n\nStart the main server:\n\n```sh\n./gobe start -p 3666 -b \"0.0.0.0\"\n```\n\nThis starts the server, generates certificates, sets up databases, and begins listening for requests!\n\nSee all available commands:\n\n```sh\n./gobe --help\n```\n\n**Main commands:**\n\n| Command   | Function                                         |\n|-----------|--------------------------------------------------|\n| `start`   | Starts the server                                |\n| `stop`    | Safely stops the server                          |\n| `restart` | Restarts all services                            |\n| `status`  | Shows the status of the server and active services|\n| `config`  | Generates an initial configuration file          |\n| `logs`    | Displays server logs                             |\n\n---\n\n### Configuration\n\nGoBE can run without any initial configuration, but supports customization via YAML/JSON files. By default, everything is generated automatically on first use.\n\nExample configuration:\n\n```yaml\nport: 3666\nbindAddress: 0.0.0.0\ndatabase:\n  type: postgres\n  host: localhost\n  port: 5432\n  user: gobe\n  password: secure\n```\n\n#### Messaging Integrations\n\nWhatsApp and Telegram bots can be configured via the `config/discord_config.json` file under the `integrations` section:\n\n```json\n{\n  \"integrations\": {\n    \"whatsapp\": {\n      \"enabled\": true,\n      \"access_token\": \"\u003ctoken\u003e\",\n      \"verify_token\": \"\u003cverify\u003e\",\n      \"phone_number_id\": \"\u003cnumber\u003e\",\n      \"webhook_url\": \"https://your.server/whatsapp/webhook\"\n    },\n    \"telegram\": {\n      \"enabled\": true,\n      \"bot_token\": \"\u003cbot token\u003e\",\n      \"webhook_url\": \"https://your.server/telegram/webhook\",\n      \"allowed_updates\": [\"message\", \"callback_query\"]\n    }\n  }\n}\n```\n\nAfter setting up the file or environment variables, the server will expose the following endpoints:\n\n- `POST /api/v1/whatsapp/send` and `/api/v1/whatsapp/webhook`\n- `POST /api/v1/telegram/send` and `/api/v1/telegram/webhook`\n\nEach route also provides a `/ping` endpoint for health checks.\n\n---\n\n## **API Reference**\n\n### **Core Endpoints**\n\n| Category | Method | Endpoint | Description |\n|----------|--------|----------|-------------|\n| **Health** | `GET` | `/health` | Basic health check |\n| **Health** | `GET` | `/healthz` | Kubernetes-style health check |\n| **Health** | `GET` | `/status` | Detailed system status |\n| **Health** | `GET` | `/api/v1/health` | API health with metrics |\n\n### **AI Provider Endpoints**\n\n| Method | Endpoint | Description | Streaming |\n|--------|----------|-------------|-----------|\n| `GET` | `/providers` | List all AI providers and availability | ❌ |\n| `POST` | `/chat` | Chat with AI providers | ✅ SSE |\n| `POST` | `/v1/advise` | Get AI advice/recommendations | ✅ SSE |\n\n### **MCP (Model Context Protocol) Endpoints**\n\n| Method | Endpoint | Description | Auth |\n|--------|----------|-------------|------|\n| `GET` | `/mcp/tools` | List available MCP tools | Bearer |\n| `POST` | `/mcp/exec` | Execute MCP tool | Bearer |\n\n### **Webhook Endpoints**\n\n| Method | Endpoint | Description | Auth |\n|--------|----------|-------------|------|\n| `POST` | `/v1/webhooks` | Receive webhook events | Bearer |\n| `GET` | `/v1/webhooks/health` | Webhook system health | Bearer |\n| `GET` | `/v1/webhooks/events` | List webhook events (paginated) | Bearer |\n| `GET` | `/v1/webhooks/events/:id` | Get specific webhook event | Bearer |\n| `POST` | `/v1/webhooks/retry` | Retry failed webhook events | Bearer |\n\n### **System Monitoring Endpoints**\n\n| Method | Endpoint | Description | Auth |\n|--------|----------|-------------|------|\n| `GET` | `/api/v1/mcp/system/info` | System information | Bearer |\n| `GET` | `/api/v1/mcp/system/cpu-info` | CPU metrics | Bearer |\n| `GET` | `/api/v1/mcp/system/memory-info` | Memory metrics | Bearer |\n| `GET` | `/api/v1/mcp/system/disk-info` | Disk metrics | Bearer |\n\n### **Scheduler Endpoints**\n\n| Method | Endpoint | Description | Auth |\n|--------|----------|-------------|------|\n| `GET` | `/health/scheduler/stats` | Scheduler statistics | Bearer |\n| `POST` | `/health/scheduler/force` | Force scheduler run | Bearer |\n\n### **Web UI Endpoints**\n\n| Method | Endpoint | Description | Auth |\n|--------|----------|-------------|------|\n| `GET` | `/` | Serve web UI root | Public |\n| `GET` | `/app/*path` | Serve web UI application | Public |\n\n### **Authentication**\n\nGoBE uses **Bearer Token** authentication for protected endpoints:\n\n```bash\n# Get token (implementation depends on your auth setup)\nTOKEN=\"your-jwt-token-here\"\n\n# Use token in requests\ncurl -H \"Authorization: Bearer $TOKEN\" http://localhost:3666/mcp/tools\n```\n\n### **Response Formats**\n\n#### **Success Response**\n```json\n{\n  \"status\": \"success\",\n  \"data\": { ... },\n  \"timestamp\": \"2025-01-20T12:00:00Z\"\n}\n```\n\n#### **Error Response**\n```json\n{\n  \"status\": \"error\",\n  \"message\": \"Error description\",\n  \"code\": 400,\n  \"timestamp\": \"2025-01-20T12:00:00Z\"\n}\n```\n\n#### **Streaming Response (SSE)**\n```\ndata: {\"content\": \"Hello\", \"done\": false}\n\ndata: {\"content\": \" world!\", \"done\": false}\n\ndata: {\"done\": true, \"usage\": {\"total_tokens\": 10, \"cost_usd\": 0.0002}}\n```\n\n### **Rate Limiting**\n\n- **Default:** 100 requests per minute per IP\n- **AI Endpoints:** 30 requests per minute per API key\n- **Headers:** `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`\n\n### **CORS Support**\n\nCORS is enabled for web UI integration:\n\n```javascript\n// JavaScript frontend example\nfetch('http://localhost:3666/providers')\n  .then(response =\u003e response.json())\n  .then(providers =\u003e console.log(providers));\n```\n\n---\n\n## **Roadmap**\n\n### ✅ **Completed (v1.3.5)**\n\n- [x] Full modularization and pluggable interfaces\n- [x] Zero-config with automatic certificate generation\n- [x] Integration with system keyring\n- [x] REST API for authentication and management\n- [x] Authentication via certificates and secure passwords\n- [x] CLI for management and monitoring\n- [x] Integration with `gdbase` for database management via Docker\n- [x] **MCP Protocol implementation with dynamic tool registry**\n- [x] **Built-in system.status and shell.command tools**\n- [x] **Thread-safe tool execution with comprehensive testing**\n- [x] **4 AI Providers: OpenAI, Anthropic, Gemini, Groq**\n- [x] **Streaming AI responses with cost tracking**\n- [x] **Production webhook system with AMQP integration**\n- [x] **Discord bot integration with real MCP tools**\n- [x] **Complete API documentation with examples**\n- [x] Multi-database support (PostgreSQL, SQLite)\n- [x] Automated tests and CI/CD\n\n### 🚧 **In Progress (v1.4.0)**\n\n- [ ] Database persistence for webhook events\n- [ ] Extended MCP tool library (file operations, network tools)\n- [ ] WebSocket support for real-time MCP communication\n- [ ] Prometheus integration for monitoring\n\n### 📋 **Planned (v1.5.0+)**\n\n- [ ] Plugin system for external tool registration\n- [ ] Advanced security policies and RBAC\n- [ ] Grafana integration for metrics visualization\n- [ ] Multi-tenant support\n- [ ] Advanced AI workflow orchestration\n- [ ] Custom middleware support\n\n### 🎯 **Next Milestones**\n\n1. **v1.4.0** - Database persistence, WebSocket MCP, monitoring\n2. **v1.5.0** - Plugin system and advanced security\n3. **v2.0.0** - Multi-tenant platform with workflow orchestration\n\n---\n\n## **Contributing**\n\nContributions are welcome! Feel free to open issues or submit pull requests. See the [Contribution Guide](docs/CONTRIBUTING.md) for more details.\n\n---\n\n## **Contact**\n\n💌 **Developer**:\n[Rafael Mori](mailto:faelmori@gmail.com)\n💼 [Follow me on GitHub](https://github.com/kubex-ecosystem)\nI'm open to collaborations and new ideas. If you found the project interesting, get in touch!\n\n---\n\n## **Risks \u0026 Mitigations**\n\n• **Zero-config may hide necessary configurations** → Verbose logs + override documentation\n• **MCP registry thread-safety** → RWMutex implemented + concurrency tests\n• **Dependency on gdbase for DB** → Fallback SQLite always available\n• **Certificate auto-generation** → Keyring backup + automatic regeneration\n\n---\n\n## **Next Steps**\n\n1. **Extend MCP tools** - file operations, network diagnostics, database queries\n2. **WebSocket MCP** - real-time tool communication for AI agents\n3. **Plugin system** - external tool registration via shared libraries\n4. **Advanced monitoring** - Prometheus metrics + Grafana dashboards\n5. **Security hardening** - RBAC, audit logs, policy enforcement\n\n---\n\n## **Changelog**\n\n### v1.3.5 (2025-01-20)\n\n- ✅ **AI Provider Ecosystem:** Complete OpenAI, Anthropic, Gemini, Groq integration\n- ✅ **Streaming AI Responses:** Server-Sent Events with cost tracking\n- ✅ **Production Webhooks:** Full webhook system with AMQP and retry logic\n- ✅ **Enhanced MCP Tools:** Added shell.command with security whitelisting\n- ✅ **Discord Integration:** Real MCP tool execution via Discord bot\n- ✅ **Comprehensive API:** Complete REST API with detailed documentation\n\n### v1.3.4 (2024-12-23)\n\n- ✅ MCP Protocol implementation with dynamic registry\n- ✅ Built-in system.status tool with runtime metrics\n- ✅ Thread-safe tool execution with comprehensive tests\n- ✅ Documentation updated following Kubex standards\n- ✅ Zero-config MCP endpoints (/mcp/tools, /mcp/exec)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubex-ecosystem%2Fgobe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkubex-ecosystem%2Fgobe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubex-ecosystem%2Fgobe/lists"}