diff --git a/README.md b/README.md index bf5bed1..e9fff17 100644 --- a/README.md +++ b/README.md @@ -1,645 +1,426 @@ +
+ # ServiceHub -**The Forensic Debugger for Azure Service Bus Incidents** +### The Forensic Debugger for Azure Service Bus -When production breaks at 2 AM and you need to see **what's inside your queues** โ€” not just message counts. +**See what's inside your queues โ€” not just message counts.** -![ServiceHub Message Browser](docs/screenshots/05-main-message-display1.png) +![ServiceHub Demo](docs/screenshots/servicehub-demo.gif) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) -[![.NET 10.0](https://img.shields.io/badge/.NET-10.0-purple.svg)](https://dotnet.microsoft.com/download/dotnet/10.0) -[![React](https://img.shields.io/badge/React-18-blue.svg)](https://react.dev/) -[![TypeScript](https://img.shields.io/badge/TypeScript-5.0-blue.svg)](https://www.typescriptlang.org/) - ---- - -## โœจ What's New in v2.0 +[![.NET 10](https://img.shields.io/badge/.NET-10-purple.svg)](https://dotnet.microsoft.com/) +[![React 18](https://img.shields.io/badge/React-18-61dafb.svg)](https://react.dev/) +[![TypeScript](https://img.shields.io/badge/TypeScript-5-3178c6.svg)](https://www.typescriptlang.org/) -๐ŸŽฏ **DLQ Intelligence System** โ€” Persistent tracking of dead-letter messages with categorization and timeline -โšก **Auto-Replay Rules** โ€” Define conditional replay rules with live statistics (Pending/Replayed/Success) -๐Ÿ”„ **Batch Replay All** โ€” Replay multiple DLQ messages with one click (optimized for O(N) performance) -๐Ÿ“Š **Instant Scanning** โ€” "Scan Now" button for immediate DLQ polling (bypasses background schedule) -๐Ÿ“ **Export Capabilities** โ€” Download DLQ data as JSON/CSV for reporting -๐ŸŽจ **Enhanced UI** โ€” Improved message row display with better visual hierarchy +[Get Started](#-quick-start) ยท [Features](#-features) ยท [Screenshots](#-screenshots) ยท [API Docs](#-api-documentation) ยท [Contributing](#-contributing) -[See screenshots 26-35](#-dlq-intelligence--auto-replay-system) | [Read changelog](#roadmap) +
--- -## The Problem: Blind Incident Response +## Why ServiceHub? -You're troubleshooting a Service Bus incident. Azure Portal shows **5,000 messages in Dead-Letter Queue**, but: +Production breaks at 2 AM. Azure Portal shows **5,000 messages in Dead-Letter Queue** but you can't read them โ€” only counts and metadata. You manually sample messages one by one, spending hours on what should take minutes. -โŒ **Can't read message content** โ€” Portal only shows counts and basic metadata -โŒ **No search capability** โ€” Can't find messages by correlation ID or customer ID -โŒ **No pattern analysis** โ€” Can't identify which error types are dominating -โŒ **Manual investigation** โ€” Sample one message at a time with no bulk insight -โŒ **Limited DLQ context** โ€” Can't see failure reasons across all dead-lettered messages +**ServiceHub is a self-hosted web application that lets you browse, search, and analyze Azure Service Bus messages in real time** โ€” like email for your message queues. -**Result:** 2-hour incidents become 6-hour marathons of blind debugging. +| Capability | Azure Portal | ServiceHub | +|---|---|---| +| View message content | Count only | Full body + properties | +| Search messages | Not available | Full-text search | +| DLQ investigation | One at a time | Batch analysis + AI | +| Pattern detection | Not available | AI-powered clustering | +| Replay from DLQ | Not available | One-click replay | +| Access | Cloud portal | Any browser | --- -## ServiceHub vs. Azure Tools - -| **Capability** | **Azure Portal** | **Service Bus Explorer** | **ServiceHub** | -|----------------|------------------|--------------------------|----------------| -| **View Message Content** | โŒ Count only | โœ… Desktop only | โœ… Web-based | -| **Search Messages** | โŒ | โš ๏ธ Basic filtering | โœ… Full-text + properties | -| **DLQ Investigation** | โš ๏ธ One at a time | โš ๏ธ Manual inspection | โœ… Batch analysis + AI insights | -| **Pattern Detection** | โŒ | โŒ | โœ… AI-powered clustering | -| **Correlation Tracking** | โŒ | โš ๏ธ Manual | โœ… Search by any property | -| **Read-Only Safety** | โœ… | โš ๏ธ Can delete | โœ… Peek-only mode | -| **Multi-Message View** | โŒ | โš ๏ธ Limited | โœ… Browse 100s at once | -| **DLQ Replay** | โŒ | โŒ | โœ… One-click replay | -| **Deployment** | โ˜๏ธ Cloud | ๐Ÿ’ป Desktop app | ๐Ÿš€ Self-hosted web app | -| **Access During Incidents** | โœ… Always | โš ๏ธ Need .NET desktop | โœ… Browser only | - -### Why ServiceHub? - -โœ… **Built for incidents** โ€” Fast, web-based, read-only by design -โœ… **AI-powered insights** โ€” Automatically detect error patterns across thousands of messages -โœ… **Search at scale** โ€” Find needle-in-haystack messages by any property -โœ… **DLQ forensics** โ€” Understand failure patterns, not just individual messages -โœ… **Safe operations** โ€” Listen-only permissions, messages never leave the queue - ---- +## ๐Ÿ“ธ Screenshots -## Real-World Scenarios +### Connect to Azure Service Bus -### Scenario 1: Dead-Letter Queue Incident -**Problem:** 5,000 orders stuck in DLQ. Customer escalation at 2 AM. -**ServiceHub Solution:** -1. Browse all 5,000 DLQ messages in seconds -2. AI detects **3 error patterns**: "Payment Timeout" (40%), "Invalid Address" (35%), "Duplicate Order" (25%) -3. Search for specific customer orders by correlation ID -4. After fixing payment gateway, replay all "Payment Timeout" messages with one click - -**Time Saved:** 6 hours โ†’ 45 minutes - -### Scenario 2: Message Correlation Tracking -**Problem:** Customer reports "Order #12345 never processed." Find the message across 10,000 active messages. -**ServiceHub Solution:** -1. Search across message body, properties, and custom headers -2. Find order in 3 seconds -3. Review full message properties, delivery attempts, and processing timestamps - -**Time Saved:** 30 minutes โ†’ 30 seconds - -### Scenario 3: Integration Testing -**Problem:** Need to test error handling with 100 realistic failure scenarios. -**ServiceHub Solution:** -1. Use Message Generator with "Payment Gateway" scenario -2. Generate 100 messages with 30% anomaly rate -3. Verify error handling and DLQ behavior -4. Clean up test messages with one filter (tagged `ServiceHub-Generated`) +Enter your connection string and you're in. Supports Listen-only (read-only) or Manage (full access) policies. -**Time Saved:** Manual testing โ†’ Automated in 2 minutes +![Connect Page](docs/screenshots/01-connect-page.png) ---- +### Message Browser -## Feature Showcase +Browse active messages across queues and topic subscriptions. See message previews, status badges, and metadata at a glance. -### ๐ŸŽจ Enhanced Message Browser UI +![Messages Queue Active](docs/screenshots/02-messages-queue-active.png) -Improved message list with better visual hierarchy and information density: +### Message Detail โ€” Properties -![Row UI Enhancement](docs/screenshots/26-row-ui-new-feature.png) +Click any message to inspect every detail. System properties show Message ID, enqueue time, TTL, sequence number, delivery count, and content type. -**Improvements:** -- Clearer message metadata display -- Enhanced property visibility -- Better spacing and readability -- Optimized for long debugging sessions +![Message Properties](docs/screenshots/03-message-detail-properties.png) ---- +### Message Detail โ€” Body -### ๐Ÿ” Message Browser with Search +Full JSON body with syntax highlighting and copy button. Supports JSON, XML, and plain text formats. -Browse messages across queues and topic subscriptions with powerful filtering: +![Message Body](docs/screenshots/04-message-detail-body.png) -![Empty Queue](docs/screenshots/04-feature-message-browser-empty.png) +### Message Detail โ€” AI Insights -![Messages Loaded](docs/screenshots/05-main-message-display1.png) +AI-powered analysis detects patterns, anomalies, and error clusters across your messages. All processing happens in your browser โ€” no data leaves your environment. -**Features:** -- View 100+ messages at once (Azure Portal: count only) -- Real-time filtering by content, properties, message ID -- Event type badges, timestamps, delivery counts -- Active and Dead-Letter queue tabs in one view +![AI Insights](docs/screenshots/05-message-detail-ai-insights.png) ---- +### Message Detail โ€” Forensic View -### ๐Ÿ“Š Complete Message Details +Deep forensic analysis showing message lifecycle, delivery attempts, and processing timeline. -Click any message to inspect every detail: +![Forensic View](docs/screenshots/06-message-detail-forensic.png) -**System Properties** โ€” Message ID, enqueue time, TTL, sequence number: -![Message Properties](docs/screenshots/10-message-display.png) +### Message Detail โ€” Headers -**Custom Properties** โ€” Application headers, correlation IDs, business metadata: -![Custom Properties](docs/screenshots/13-feature-message-details-custom-props.png) +View all custom application properties and correlation headers. -**Message Body** โ€” Full JSON with syntax highlighting and copy button: -![Message Body](docs/screenshots/15-feature-message-details-JSON-prop.png) +![Headers View](docs/screenshots/07-message-detail-headers.png) ---- +### Dead-Letter Queue -### ๐Ÿค– AI-Powered Pattern Detection +Investigate failed messages with DLQ reason, error description, and AI-powered remediation guidance. Replay messages back to the original queue with one click. -ServiceHub analyzes **all messages** and automatically identifies error clusters: +![Dead Letter Queue](docs/screenshots/08-messages-deadletter-queue.png) -![AI Findings](docs/screenshots/19-feature-ai-findings-1.png) +### DLQ Message Detail with Replay -**What it detects:** -- Error message patterns (e.g., "Payment Timeout" across 500 messages) -- Anomaly rates and confidence scores -- Message groups by failure type -- Suggested remediation actions +See why messages failed and replay them after fixing the root cause. -![AI Insights](docs/screenshots/16-feature-message-details-AI-Insight.png) +![DLQ Message Detail](docs/screenshots/09-dlq-message-detail.png) -**Real-world example:** From 5,000 DLQ messages, AI instantly identifies: -- 40% failed due to "Payment Gateway Timeout" -- 35% failed due to "Invalid Shipping Address" -- 25% failed due to "Duplicate Order ID" +### DLQ AI Analysis ---- +AI automatically categorizes DLQ failures and suggests remediation steps. -### โš ๏ธ Dead-Letter Queue Forensics +![DLQ AI Insights](docs/screenshots/10-dlq-message-ai-insights.png) -Investigate DLQ failures with complete context: +### Topic Subscriptions -![DLQ Investigation](docs/screenshots/21-workflow-dlq-investigation-step1.png) +Browse messages from topic subscriptions with the same powerful inspection tools. -**See instantly:** -- Dead-letter reason (e.g., "MaxDeliveryCountExceeded") -- Error description from Azure Service Bus -- Delivery attempt history -- Original message timestamp vs. DLQ timestamp +![Topic Subscription](docs/screenshots/11-messages-topic-subscription.png) -![DLQ Guidance](docs/screenshots/22-workflow-dlq-investigation-step2.png) +### Quick Actions (FAB) -**ServiceHub provides actionable guidance:** -- Why the message failed -- Recommended fix based on failure type -- Whether to replay or discard -- Related messages with same failure pattern +Floating action button provides quick access to Send Message, Generate Messages, Test DLQ, and Refresh All. ---- +![FAB Quick Actions](docs/screenshots/12-fab-quick-actions-open.png) -### ๐Ÿ”„ DLQ Message Replay +### Send Message -After fixing the root cause, replay messages back to the original queue: +Send single messages to queues or topics for ad-hoc testing. Supports custom properties, content types, and advanced options. -![DLQ AI Insights](docs/screenshots/23-workflow-dlq-AI-Insight.png) +![Send Message](docs/screenshots/13-send-message-dialog.png) -![Replay Dialog](docs/screenshots/24-workflow-dlq-replay-step4.png) +### Generate Test Messages -**Use cases:** -- Payment gateway was down โ†’ Now restored โ†’ Replay all payment messages -- Bug in message processor โ†’ Bug fixed โ†’ Replay all failed messages -- Invalid configuration โ†’ Config corrected โ†’ Reprocess orders +Generate realistic test messages with built-in scenarios (Order Processing, Payment Gateway, Notification Service, and more). Configure volume and anomaly rate. ---- +![Generate Messages](docs/screenshots/14-generate-messages-dialog.png) -### ๐Ÿ”Ž Advanced Search +### DLQ Intelligence Dashboard -Find messages by any property โ€” something Azure Portal **cannot do**: +Persistent tracking and monitoring of dead-letter queue messages with trend chart, status breakdown, and category classification. -![Search](docs/screenshots/25-feature-find-feature.png) +![DLQ Intelligence](docs/screenshots/16-dlq-history-overview.png) -**Search across:** -- Message body content (JSON, XML, plain text) -- Custom properties (correlation ID, customer ID, order number) -- System properties (message ID, session ID) -- Event types and categories +### DLQ History Detail -**Example:** Find all messages for customer "C-12345" across 10,000 messages in 2 seconds. +Drill into individual DLQ records with forensic timeline, replay history, and status tracking. ---- +![DLQ History Detail](docs/screenshots/17-dlq-history-detail.png) -## Testing & Development Tools +### Auto-Replay Rules -### Message Generator +Define conditional replay rules with live statistics. Match messages by dead-letter reason, error description, entity name, content type, or body text. -Generate realistic test messages for integration testing: +![Auto-Replay Rules](docs/screenshots/19-rules-page.png) -![Generator](docs/screenshots/07-feature-message-generator-basic-single-message.png) +### Rule Template Gallery -![Generator Scenarios](docs/screenshots/08-feature-message-generator-scenarios.png) +Browse pre-built rule templates for common failure scenarios โ€” transient errors, max delivery exceeded, expired messages, and more. -**6 Built-in Scenarios:** -1. **Order Processing** โ€” E-commerce order flow -2. **Payment Gateway** โ€” Payment transactions with retries -3. **Notification Service** โ€” Email/SMS delivery events -4. **Inventory Management** โ€” Stock updates and alerts -5. **User Activity** โ€” Login, registration, profile updates -6. **Error Events** โ€” Simulated failures for testing +![Template Gallery](docs/screenshots/20-rules-template-gallery.png) -**Configuration:** -- Volume: 30, 50, 100, 150, 200 messages -- Anomaly rate: 0% to 50% (inject failures for testing) -- Auto-tagged with `ServiceHub-Generated` for easy cleanup +### Create Auto-Replay Rule -### Send Custom Messages +Build custom rules with field conditions, operators, actions, rate limiting, and target entity configuration. -Send single messages to queues or topics for ad-hoc testing: +![Create Rule](docs/screenshots/21-rules-create-dialog.png) -![Send Message](docs/screenshots/11-Generate-Single-Message-Topic.png) +### System Health -![Topic Messages](docs/screenshots/12-showing-message-topic.png) +Monitor API health, uptime, memory usage, thread count, GC collections, and server information. ---- +![System Health](docs/screenshots/22-health-page.png) -## Quick Start (Zero Configuration!) +### Help & Quick Reference -### ๐Ÿš€ Automated Setup (Recommended) +Searchable help guide covering every feature, Azure Service Bus concepts, and a guided tour. -**No manual prerequisites needed!** The setup script automatically installs everything: +![Help Page](docs/screenshots/23-help-page.png) -```bash -git clone https://github.com/debdevops/servicehub.git -cd servicehub -./run.sh -``` +### Message Search & Filter -The script will: -โœ… Auto-install .NET 8 SDK (if not present) -โœ… Auto-install Node.js 18+ (if not present) -โœ… Install all dependencies -โœ… Start both API and UI servers +Find messages by any property โ€” message ID, correlation ID, body content, custom headers. -**First run:** 5-10 minutes (includes installations) -**Subsequent runs:** 30-60 seconds +![Message Filter](docs/screenshots/28-message-filter.png) -Open **http://localhost:3000** +### Sidebar Navigation -> ๐Ÿ“˜ **Detailed Setup Guide:** See [SETUP.md](SETUP.md) for platform-specific details, troubleshooting, and manual installation options. +Namespace browser with live message counts, queue/topic tree, and Quick Access panel. -### Prerequisites (Auto-Installed) -The following are **automatically installed** by `run.sh`: -- โœ… .NET 8.0 SDK -- โœ… Node.js 18+ -- โœ… npm package manager -- โœ… Required utilities (curl, lsof) +![Sidebar Navigation](docs/screenshots/25-sidebar-navigation.png) -**Supports all major platforms:** -- macOS (Intel & Apple Silicon), Ubuntu/Debian, RHEL/CentOS/Fedora, Arch Linux, openSUSE, Alpine, WSL -- See [CROSS-PLATFORM-COMPATIBILITY.md](CROSS-PLATFORM-COMPATIBILITY.md) for complete list +### API Documentation (Scalar) -**You only need:** -- โš ๏ธ Azure Service Bus connection string (Listen permission only) +Interactive API documentation with Scalar โ€” test endpoints directly from the browser. -![Application Start](docs/screenshots/01-Start-The-App.png) +![API Docs](docs/screenshots/26-scalar-api-docs.png) -### Connect to Your Namespace +--- -1. Enter a display name for your connection -2. Paste your Service Bus connection string -3. Click "Connect" +## ๐Ÿš€ Features -![Connection Form](docs/screenshots/02-Connect-Service-Bus-With-Manage-ConnStr.png) +### Message Browser +- Browse **active** and **dead-letter** queue messages side by side +- View full message body with JSON syntax highlighting +- Inspect system properties, custom headers, and application properties +- Real-time search across message content and properties +- Auto-refresh with configurable polling intervals -Your queues and topics appear instantly: +### AI-Powered Analysis +- **Pattern detection** โ€” Identify error clusters across thousands of messages +- **Anomaly identification** โ€” Flag unusual messages automatically +- **Remediation suggestions** โ€” Actionable guidance for each failure type +- **Client-side processing** โ€” All analysis runs in your browser; no data leaves your environment -![Connected Namespace](docs/screenshots/03-Connected-ServiceBus.png) +### DLQ Intelligence System +- **Persistent tracking** โ€” DLQ messages stored in local SQLite database +- **Category classification** โ€” Auto-categorizes: Transient, MaxDelivery, Expired, DataQuality, Authorization +- **Trend chart** โ€” 30-day DLQ trend visualization (New vs. Resolved) +- **Instant scanning** โ€” "Scan Now" for immediate DLQ polling +- **Export** โ€” Download DLQ data as JSON or CSV +- **Status tracking** โ€” Active โ†’ Replayed โ†’ ReplayFailed โ†’ Resolved -**That's it!** Start browsing messages, investigating DLQs, and using AI insights. +### Auto-Replay Rules Engine +- **Conditional matching** โ€” Match messages by reason, error description, entity, delivery count, body text +- **Operators** โ€” Contains, Equals, StartsWith, EndsWith, Regex, GreaterThan, LessThan, In +- **Live statistics** โ€” Pending/Replayed/Success counts updated in real time +- **Rate limiting** โ€” Max replays per hour to prevent overwhelming downstream services +- **Batch replay** โ€” Replay all matching messages with one click +- **Template gallery** โ€” Pre-built rules for common failure scenarios +- **Circuit breaker** โ€” Auto-disables rules if success rate drops below threshold + +### Testing & Development Tools +- **Send Message** โ€” Send single messages to queues or topics with custom properties +- **Generate Messages** โ€” 6 built-in scenarios with configurable volume (30โ€“200) and anomaly rate (0โ€“50%) +- **Test DLQ** โ€” Move test messages to dead-letter queue for testing DLQ workflows +- **Tagged messages** โ€” All generated messages tagged with `ServiceHub-Generated` for easy cleanup + +### Security & Safety +- **Read-only by default** โ€” Uses Azure SDK PeekMessagesAsync; messages are never removed +- **Listen-only supported** โ€” Works with Listen permission for browse-only access +- **Encrypted at rest** โ€” Connection strings encrypted with AES-GCM +- **No external API calls** โ€” AI analysis runs entirely in the browser +- **No data persistence** โ€” Messages displayed in-memory only +- **Safe for production** โ€” Will not interfere with your consumers --- -## Architecture +## โšก Quick Start -``` -servicehub/ -โ”œโ”€โ”€ apps/web/ # React + TypeScript frontend -โ”‚ โ””โ”€โ”€ src/ -โ”‚ โ”œโ”€โ”€ components/ # UI components -โ”‚ โ”œโ”€โ”€ hooks/ # React Query hooks -โ”‚ โ””โ”€โ”€ lib/ # API client, utilities -โ”‚ -โ”œโ”€โ”€ services/api/ # ASP.NET Core backend -โ”‚ โ””โ”€โ”€ src/ -โ”‚ โ”œโ”€โ”€ ServiceHub.Api/ # REST API controllers -โ”‚ โ”œโ”€โ”€ ServiceHub.Core/ # Domain entities & DTOs -โ”‚ โ””โ”€โ”€ ServiceHub.Infrastructure/ # Azure SDK integration -โ”‚ -โ””โ”€โ”€ run.sh # One-command startup script -``` +### Automated Setup (Recommended) -**Tech Stack:** -- **Frontend:** React 18, TypeScript, Tailwind CSS, TanStack Query (React Query) -- **Backend:** ASP.NET Core 8, Azure.Messaging.ServiceBus SDK -- **AI Analysis:** Client-side pattern detection (no external API calls) -- **Database:** None (stateless, in-memory only) - ---- +```bash +git clone https://github.com/debdevops/servicehub.git +cd servicehub +./run.sh +``` -## Security & Compliance +The script automatically: +- Installs .NET 10 SDK (if not present) +- Installs Node.js 18+ (if not present) +- Builds and starts both API and UI servers -### Read-Only by Design +Open **http://localhost:3000** and connect with your Azure Service Bus connection string. -ServiceHub uses Azure SDK's **`PeekMessagesAsync`** โ€” messages are **never removed** from queues: +### Prerequisites -```csharp -// ServiceHub only reads โ€” never receives or deletes -await receiver.PeekMessagesAsync(maxMessages: 100); -``` +Auto-installed by `run.sh`: +- .NET 10.0 SDK +- Node.js 18+ -โœ… **Safe for production** โ€” Messages remain in queue for your actual consumers -โœ… **Audit-friendly** โ€” No message deletion or modification -โœ… **Incident-safe** โ€” Won't interfere with recovery processes +You provide: +- Azure Service Bus connection string (Listen permission minimum) -### Minimal Permissions Required - -Create a dedicated SAS policy with **Listen permission only**: +### Create a Service Bus Policy +For read-only browsing: ```bash -# Azure CLI az servicebus namespace authorization-rule create \ --namespace-name \ - --name servicehub-readonly \ + --resource-group \ + --name servicehub \ --rights Listen ``` -โŒ ServiceHub does NOT require: -- `Manage` permissions -- `Send` permissions (except for testing tools, optional) -- `Receive` permissions (never removes messages) - -### Data Privacy - -- **No external API calls** โ€” AI analysis runs in your browser -- **No data persistence** โ€” Messages displayed in-memory only -- **No logging of message content** โ€” API logs only metadata (message count, queue names) -- **Self-hosted** โ€” Deploy in your VPC/VNET, no SaaS dependencies - ---- - -## Use Cases by Role - -### DevOps Engineers -โœ… Investigate DLQ spikes during incidents -โœ… Validate message processing after deployments -โœ… Search for specific customer transactions -โœ… Monitor message flow across queues and topics - -### QA Engineers -โœ… Generate realistic test messages for integration testing -โœ… Verify message routing to correct topic subscriptions -โœ… Test error handling with controlled anomaly injection -โœ… Validate message transformations and enrichments - -### Support Teams -โœ… Find customer orders by correlation ID during escalations -โœ… Verify if customer message was received or dead-lettered -โœ… Provide timestamps and failure reasons to customers -โœ… Replay messages after incident resolution - -### Platform Engineers -โœ… Debug namespace-level message routing issues -โœ… Analyze message patterns for capacity planning -โœ… Investigate intermittent failures across multiple queues -โœ… Document incident timelines with actual message evidence - ---- - -## Key Differentiators - -| Feature | Impact | -|---------|--------| -| **Web-Based** | No desktop installation needed โ€” accessible from any browser during incidents | -| **Bulk Message View** | Browse 100s of messages at once vs. one-by-one in Azure Portal | -| **AI Pattern Detection** | Automatically identify root causes across thousands of DLQ messages | -| **Full-Text Search** | Find messages by correlation ID, customer ID, or any property | -| **DLQ Replay** | One-click message reprocessing after fixing issues | -| **Testing Tools** | Generate realistic scenarios for integration testing | -| **Read-Only Safety** | Listen-only permissions โ€” never removes messages from production | -| **Self-Hosted** | Deploy in your environment, no SaaS vendor dependency | - ---- - -## ๐ŸŽฏ DLQ Intelligence & Auto-Replay System - -ServiceHub includes a **production-ready DLQ management system** that goes far beyond simple message inspection. - -### ๐Ÿ“Š DLQ Intelligence Dashboard - -Persistent tracking and monitoring of dead-letter queue messages: - -![DLQ Enhancement](docs/screenshots/27-dlq-enhancement.png) - -![DLQ Intelligence](docs/screenshots/28-dlq-intelligence.png) - -**Features:** -- **Persistent history** โ€” All DLQ messages tracked in SQLite database -- **Instant scanning** โ€” "Scan Now" button triggers immediate DLQ poll (bypasses 10-15s background schedule) -- **Category classification** โ€” Auto-categorizes failures: Transient, MaxDelivery, Expired, DataQuality, Authorization, etc. -- **Export capabilities** โ€” Download DLQ data as JSON or CSV for reporting -- **Timeline view** โ€” Replay history with timestamps, outcomes, and error details -- **Status tracking** โ€” Active โ†’ Replayed โ†’ ReplayFailed โ†’ Resolved +For full access (send, generate, replay): +```bash +az servicebus namespace authorization-rule create \ + --namespace-name \ + --resource-group \ + --name servicehub \ + --rights Listen Send Manage +``` -![DLQ History Post-Replay](docs/screenshots/29-dlq-history-post-replay-message.png) +### URLs -**Background monitoring:** DLQ messages are automatically scanned every 10-15 seconds and stored for forensic analysis. +| Service | URL | +|---|---| +| UI | http://localhost:3000 | +| API | http://localhost:5153 | +| API Docs | http://localhost:5153/scalar/v1 | --- -### โšก Auto-Replay Rules Engine - -Define **conditional replay rules** that match DLQ messages and enable batch operations: - -![Auto-Replay Feature](docs/screenshots/30-auto-replay-feature.png) - -**Rule Components:** -- **Conditions** โ€” Match messages by reason, error description, entity name, delivery count, content type, body text, or custom properties -- **Operators** โ€” Contains, Equals, StartsWith, EndsWith, Regex, GreaterThan, LessThan, In -- **Target Entity** โ€” Optionally replay to a different queue/topic (not just original) -- **Rate Limiting** โ€” Max replays per hour to prevent overwhelming downstream services +## ๐Ÿ—๏ธ Architecture -**Rule Statistics (Live Evaluation):** -- **Pending** โ€” How many Active DLQ messages currently match this rule (evaluated in real-time) -- **Replayed** โ€” How many messages have been replayed using this rule -- **Success** โ€” Replay success count and percentage +``` +servicehub/ +โ”œโ”€โ”€ apps/web/ # React 18 + TypeScript + Vite frontend +โ”‚ โ””โ”€โ”€ src/ +โ”‚ โ”œโ”€โ”€ components/ # UI components (messages, DLQ, rules, FAB) +โ”‚ โ”œโ”€โ”€ hooks/ # React Query hooks for API communication +โ”‚ โ”œโ”€โ”€ lib/ # API client, utilities, help content +โ”‚ โ””โ”€โ”€ pages/ # Page components (Messages, Connect, Rules, Health, Help) +โ”‚ +โ”œโ”€โ”€ services/api/ # ASP.NET Core 10 backend +โ”‚ โ””โ”€โ”€ src/ +โ”‚ โ”œโ”€โ”€ ServiceHub.Api/ # REST controllers, middleware, auth +โ”‚ โ”œโ”€โ”€ ServiceHub.Core/ # Domain entities, DTOs, interfaces +โ”‚ โ”œโ”€โ”€ ServiceHub.Infrastructure/ # Azure SDK integration, SQLite +โ”‚ โ””โ”€โ”€ ServiceHub.Shared/ # Common types and utilities +โ”‚ +โ”œโ”€โ”€ scripts/ # Setup and utility scripts +โ””โ”€โ”€ run.sh # One-command startup +``` -![Auto-Relay Test Feature](docs/screenshots/31-auto-relay-test-feature.png) +**Tech Stack:** +| Layer | Technology | +|---|---| +| Frontend | React 18, TypeScript, Tailwind CSS, TanStack Query | +| Backend | ASP.NET Core 10, Azure.Messaging.ServiceBus SDK | +| AI Analysis | Client-side pattern detection (no external API) | +| Database | SQLite (DLQ Intelligence), in-memory cache | +| API Docs | Scalar (OpenAPI) | -**Test Before Replay:** Click "Test" to preview how many Active DLQ messages match your conditions before executing any replay. +For detailed backend architecture, see [services/api/ARCHITECTURE.md](services/api/ARCHITECTURE.md). --- -### ๐Ÿ”„ Batch Replay All System - -Replay **multiple matching messages** with a single click: - -![Replay All Messages](docs/screenshots/32-replay-all-messages.png) - -**Safety Features:** -- **Confirmation dialog with warnings** โ€” Red danger header, 3 safety warnings before executing -- **Real-time statistics** โ€” Shows how many messages will be affected -- **Cancel auto-focused** โ€” Safer default to prevent accidental clicks -- **Test first workflow** โ€” Encourages testing rules before bulk replay - -![Replay All Process](docs/screenshots/33-replay-all-process.png) - -**Performance:** Optimized batch replay using **single DLQ receiver per entity** (not per message). Tested with 7 messages across 2 subscriptions โ†’ **9 seconds** (vs. 30s+ timeout before optimization). - -![Post-Replay All Messages](docs/screenshots/34-post-replay-all-messages.png) - -**Outcome Tracking:** -- Messages matched: 7 -- Successfully replayed: 7 -- Failed: 0 -- Skipped: 0 - -![DLQ Intelligence History Post-Replay All](docs/screenshots/35-rdlq-intelligence-history-post-replay-all.png) +## ๐Ÿ’ก Real-World Scenarios -**History Audit:** Every replay attempt is recorded in the DLQ Intelligence history with: -- Timestamp -- Rule name or "Manual Replay" -- Outcome (Success/Failed) -- Target entity -- Error details (if failed) - ---- +### Scenario 1: Dead-Letter Queue Incident +**Problem:** 5,000 orders stuck in DLQ at 2 AM. -### Real-World DLQ Scenario +**With ServiceHub:** +1. Browse all 5,000 DLQ messages instantly +2. AI detects 3 error patterns: Payment Timeout (40%), Invalid Address (35%), Duplicate Order (25%) +3. Search for specific customer orders by correlation ID +4. Create auto-replay rule for Payment Timeout โ€” replay all 2,000 messages -**Situation:** 1,500 order messages dead-lettered due to payment gateway outage. +**Time saved:** 6 hours โ†’ 45 minutes -**ServiceHub Workflow:** -1. Open **DLQ Intelligence** โ†’ See 1,500 Active messages categorized as "Transient" failures -2. Create **Auto-Replay Rule**: - - Condition: `Reason contains "Payment Gateway Timeout"` - - Target: Original subscription - - Rate limit: 500/hour -3. Click **Test** โ†’ Confirms 1,500 messages match -4. Click **Replay All** โ†’ Review warnings โ†’ Confirm -5. Result: **All 1,500 messages replayed in ~3 minutes** -6. Check **DLQ Intelligence History** โ†’ See replay audit trail with success/failure counts +### Scenario 2: Message Correlation +**Problem:** Customer reports order never processed. -**Why it's safe:** -- โœ… Messages removed from DLQ only after successful send to target -- โœ… Failed replays remain in DLQ with error description -- โœ… Rate limiting prevents overwhelming downstream services -- โœ… Full audit trail for compliance/debugging +**With ServiceHub:** +1. Search across message body and properties +2. Find order in 3 seconds across 10,000 messages +3. Review full message properties and delivery history ---- +**Time saved:** 30 minutes โ†’ 30 seconds -## Roadmap - -**Completed Features** โœ… +### Scenario 3: Integration Testing +**Problem:** Need to test error handling with 100 realistic failure scenarios. -- โœ… **Bulk DLQ Replay** โ€” Replay multiple messages with rule-based filters -- โœ… **DLQ Intelligence** โ€” Persistent tracking, categorization, and history -- โœ… **Auto-Replay Rules** โ€” Conditional replay with rate limiting -- โœ… **Batch Optimization** โ€” O(N) performance with single receiver per entity +**With ServiceHub:** +1. Select Payment Gateway scenario in Message Generator +2. Generate 100 messages with 30% anomaly rate +3. Verify error handling and DLQ behavior +4. Clean up test messages filtered by ServiceHub-Generated tag -**Community Requests:** [Open an issue](https://github.com/debdevops/servicehub/issues) to suggest features! +**Time saved:** Manual testing โ†’ Automated in 2 minutes --- -## Comparison: ServiceHub vs. Alternatives +## ๐Ÿ” Permissions Guide -### vs. Azure Portal +| Permission Level | Capabilities | +|---|---| +| **Listen only** | Browse messages, inspect DLQ, search, AI insights, view health | +| **Listen + Send** | All above + replay from DLQ + send test messages | +| **Manage** | All above + generate messages, test DLQ, full management | -**Azure Portal Strengths:** -- Always available, no installation -- Basic metrics and alerting -- Namespace management - -**Azure Portal Limitations:** -- โŒ Cannot view message **content** (only metadata) -- โŒ No search or filtering capabilities -- โŒ DLQ investigation requires manual sampling -- โŒ No pattern detection or bulk analysis - -**When to use ServiceHub:** When you need to see **what's inside messages** during incidents. +> **Tip:** Create a dedicated `servicehub` policy instead of using `RootManageSharedAccessKey`. --- -### vs. Azure Service Bus Explorer (Desktop) - -**Service Bus Explorer Strengths:** -- Rich feature set for power users -- Message management (send, receive, delete) -- Detailed property inspection - -**Service Bus Explorer Limitations:** -- โš ๏ธ Desktop application (Windows .NET required) -- โš ๏ธ Limited multi-message view -- โŒ No AI pattern detection -- โŒ No bulk DLQ analysis -- โš ๏ธ Can accidentally delete production messages +## ๐Ÿ“– API Documentation -**When to use ServiceHub:** -- Web-based access from any device -- Read-only safety for production -- AI-powered pattern detection -- Bulk message analysis +ServiceHub exposes a REST API documented with Scalar (OpenAPI). Access interactive docs at: ---- - -### vs. Custom Scripts +**http://localhost:5153/scalar/v1** -**Custom Scripts (PowerShell/CLI) Strengths:** -- Automation potential -- Scriptable workflows +![API Documentation](docs/screenshots/26-scalar-api-docs.png) -**Custom Scripts Limitations:** -- โš ๏ธ Requires scripting expertise -- โŒ No UI for visual exploration -- โŒ Limited to technical users -- โš ๏ธ Time-consuming to build and maintain - -**When to use ServiceHub:** -- Ready-to-use web UI -- Accessible to non-developers (support teams, QA) -- Zero maintenance required +Key endpoints: +- `GET /api/v1/namespaces` โ€” List connected namespaces +- `GET /api/v1/namespaces/{id}/queues` โ€” List queues with message counts +- `GET /api/v1/namespaces/{id}/topics` โ€” List topics with subscription counts +- `GET /api/v1/namespaces/{id}/queues/{name}/messages` โ€” Browse messages +- `POST /api/v1/namespaces/{id}/queues/{name}/messages` โ€” Send a message +- `GET /api/v1/dlq-history` โ€” DLQ Intelligence records +- `GET /api/v1/replay-rules` โ€” Auto-replay rules --- -## FAQ - -**Q: Does ServiceHub remove messages from queues?** -A: No. ServiceHub uses Azure SDK's **`PeekMessagesAsync`** which only reads messages without removing them. Your consumers continue processing normally. +## โ“ FAQ -**Q: Can I use ServiceHub in production?** -A: Yes. ServiceHub only requires **Listen** permission and operates in read-only mode (except for optional testing tools). Messages remain in queues for your actual consumers. +**Q: Does ServiceHub remove messages from queues?** +No. ServiceHub uses PeekMessagesAsync which reads messages without removing them. Your consumers continue processing normally. -**Q: How does AI pattern detection work?** -A: ServiceHub analyzes message content, properties, and error descriptions using heuristic algorithms **in your browser**. No data leaves your environment โ€” no external AI API calls. +**Q: Is it safe for production?** +Yes. ServiceHub only requires Listen permission and operates in read-only mode. Messages remain in queues for your actual consumers. -**Q: What about sensitive data in messages?** -A: ServiceHub displays messages only in your browser session (not persisted). Deploy ServiceHub in your private network and restrict access via your identity provider. API logs do not capture message content. +**Q: How does AI analysis work?** +ServiceHub analyzes message content using heuristic algorithms entirely in your browser. No data leaves your environment. -**Q: Can I deploy ServiceHub to Azure App Service / Kubernetes?** -A: Yes. ServiceHub is a standard ASP.NET Core + React app. You can containerize it with Docker and deploy to any platform supporting .NET 8 and Node.js. +**Q: What about sensitive data?** +Messages are displayed only in your browser session โ€” not persisted. Deploy ServiceHub in your private network and restrict access. -**Q: Does ServiceHub support topics with subscriptions?** -A: Yes. ServiceHub browses messages from both queues and topic subscriptions. You can view messages for each subscription independently. +**Q: Can I deploy to Azure App Service / Kubernetes?** +Yes. ServiceHub is a standard ASP.NET Core + React SPA. Containerize with Docker and deploy anywhere supporting .NET 10. -**Q: What about message sessions?** -A: Session-aware browsing is on the roadmap. Currently, you can view session-enabled messages but not group them by session ID. - -**Q: Can I contribute?** -A: Absolutely! ServiceHub is open source (MIT license). Fork the repository, make your changes, and submit a pull request. +**Q: Does it support topics with subscriptions?** +Yes. Browse messages from both queues and topic subscriptions independently. --- -## Contributing - -We welcome contributions! Whether it's bug fixes, new features, or documentation improvements. +## ๐Ÿค Contributing -**How to contribute:** +We welcome contributions! Bug fixes, features, and documentation improvements. 1. Fork the repository 2. Create a feature branch (`git checkout -b feature/amazing-feature`) 3. Make your changes with tests -4. Commit your changes (`git commit -m 'Add amazing feature'`) -5. Push to the branch (`git push origin feature/amazing-feature`) -6. Open a Pull Request +4. Commit and push +5. Open a Pull Request --- @@ -647,43 +428,14 @@ We welcome contributions! Whether it's bug fixes, new features, or documentation MIT License โ€” see [LICENSE](LICENSE) for details. -**TL;DR:** Use ServiceHub freely in your organization, modify as needed, no attribution required in your deployment. - ---- - -## Links & Resources - -- **๐Ÿ  Repository:** https://github.com/debdevops/servicehub -- **๐Ÿ› Report Issues:** https://github.com/debdevops/servicehub/issues -- **๐Ÿ“– Full Documentation:** [docs/COMPREHENSIVE-GUIDE.md](docs/COMPREHENSIVE-GUIDE.md) -- **๏ฟฝ Screenshots Guide:** [docs/SCREENSHOTS.md](docs/SCREENSHOTS.md) -- **๐Ÿ’ฌ Discussions:** https://github.com/debdevops/servicehub/discussions - ---- - -## Support - -**Need help?** -- ๐Ÿ“– Check the [documentation](docs/) -- ๐Ÿ’ฌ Start a [discussion](https://github.com/debdevops/servicehub/discussions) -- ๐Ÿ› Report a [bug](https://github.com/debdevops/servicehub/issues) - -**Enterprise support:** For production deployment assistance, custom features, or training โ€” open an issue with `[Enterprise]` tag. - ---- - -## Star History - -If ServiceHub saved you time during an incident, give it a โญ on GitHub! - ---
-**ServiceHub** โ€” Because your Service Bus messages shouldn't be invisible during incidents. +**ServiceHub** โ€” Because your Service Bus messages should not be invisible during incidents. -Built with โค๏ธ for DevOps and Platform Engineers +Built for DevOps, Platform, and SRE Engineers. -[Get Started](#quick-start-5-minutes) โ€ข [View Features](#feature-showcase) โ€ข [Report Issue](https://github.com/debdevops/servicehub/issues) +[Get Started](#-quick-start) ยท [View Features](#-features) ยท [Report Issue](https://github.com/debdevops/servicehub/issues)
diff --git a/REMOTE_ACCESS.md b/REMOTE_ACCESS.md deleted file mode 100644 index 257a483..0000000 --- a/REMOTE_ACCESS.md +++ /dev/null @@ -1,174 +0,0 @@ -# ServiceHub โ€” Remote Server Access Guide - -This guide explains how to run ServiceHub on a Linux server and access it -from a different machine (laptop, another server, etc.). - ---- - -## How It Works - -ServiceHub uses a Vite development proxy to route browser API calls: - -``` -Your Browser โ†’ http://linuxhost:3000/api/v1/... - โ†“ (Vite proxy, same server) - http://localhost:5153/api/v1/... (ASP.NET Core API) -``` - -By keeping the proxy on the server, the browser never needs to reach port 5153 -directly โ€” it just calls port 3000 (the UI port) for everything. This means: - -- **No CORS issues** โ€” the browser sees all requests as same-origin (port 3000). -- **Firewall simplicity** โ€” you only need to open one port (3000) to the outside world. -- **No hardcoded IP addresses** in client code. - ---- - -## Quick Start (Remote Server) - -### 1. Start ServiceHub - -```bash -cd /path/to/servicehub -bash run.sh -``` - -The startup banner will show all access URLs automatically: - -``` -๐ŸŒ Web UI: - โ€ข http://localhost:3000 โ† from this machine - โ€ข http://192.168.1.50:3000 โ† from remote machines (by IP) - โ€ข http://linuxhost:3000 โ† from remote machines (by hostname) - -๐Ÿ“ API Endpoints: - โ€ข HTTP: http://localhost:5153 - โ€ข Remote: http://192.168.1.50:5153 - โ€ข API Docs: http://localhost:5153/scalar/v1 -``` - -### 2. Access from Your Laptop - -Open a browser on your laptop and navigate to: - -``` -http://linuxhost:3000 -``` - -Replace `linuxhost` with the server's hostname or IP address. - ---- - -## Firewall Configuration - -If the connection is refused, open the UI port on the server's firewall. -You only need port **3000** (API calls are proxied through it). - -**Ubuntu / Debian (ufw):** -```bash -sudo ufw allow 3000/tcp -sudo ufw reload -``` - -**RHEL / CentOS / Fedora (firewalld):** -```bash -sudo firewall-cmd --add-port=3000/tcp --permanent -sudo firewall-cmd --reload -``` - -**Quick test** (from your laptop): -```bash -curl http://linuxhost:3000/health -``` - ---- - -## Supporting Additional CORS Origins (Advanced) - -The Vite proxy eliminates CORS for browser calls. However, if you are making -**direct API calls** from another backend service or tool (e.g. curl, Postman, -another server-side app), you need to tell the .NET API which origins to allow. - -Use the `SERVICEHUB_ALLOWED_ORIGINS` environment variable โ€” no config-file edits needed: - -```bash -export SERVICEHUB_ALLOWED_ORIGINS="http://192.168.1.50:3000,http://linuxhost:3000" -bash run.sh -``` - -Multiple origins are comma-separated. This variable is read at startup by -`CorsConfiguration.cs` and merged into the allowed origins list alongside any -values already in `appsettings.json`. - ---- - -## Environment Variable Reference - -| Variable | Purpose | Example | -|---|---|---| -| `SERVICEHUB_ALLOWED_ORIGINS` | Extra CORS origins (comma-separated) | `http://192.168.1.50:3000` | -| `VITE_API_BASE_URL` | Override API base URL in the browser client | `http://192.168.1.50:5153/api/v1` | - -> **Note:** `VITE_API_BASE_URL` is only needed if you want the browser to call the API -> **directly** (bypassing the proxy). With the default proxy configuration you do -> not need to set this. - ---- - -## Troubleshooting - -### "Connection Refused" on port 3000 - -1. Confirm Vite started with `--host 0.0.0.0`: - ```bash - grep "host" /tmp/servicehub_ui_startup.log - ``` -2. Check the firewall rules (see above). -3. Verify the process is listening: - ```bash - ss -tlnp | grep 3000 - ``` - -### "Network Error" / API Can't Be Reached - -The browser is talking to the Vite proxy on port 3000, which forwards to the API -on port 5153 (loopback). If you see API errors: - -1. Check the API is running: - ```bash - curl http://localhost:5153/health - ``` -2. Check API logs: - ```bash - tail -50 /tmp/servicehub_api_startup.log - ``` - -### CORS Errors in Browser Dev Tools - -If you see `Access-Control-Allow-Origin` errors, it means requests are bypassing -the Vite proxy and hitting the API directly. Ensure: - -- `VITE_API_BASE_URL` is **not** set to an absolute URL pointing at a different - host. Clear it or leave it unset to use the proxy. -- The browser is loading the UI from the same origin it's making API calls to. - ---- - -## Production Deployment - -For a production Linux deployment (no Vite dev server), build the React app and -serve it from the .NET API's wwwroot folder: - -```bash -# Build the React app (outputs to services/api/src/ServiceHub.Api/wwwroot) -cd apps/web -npm run build - -# Run the .NET API (it serves both the SPA and the API) -cd services/api -dotnet run --project src/ServiceHub.Api/ServiceHub.Api.csproj \ - --urls "http://0.0.0.0:5153" \ - --environment Production -``` - -Then open `http://linuxhost:5153` โ€” only one port needed in production. diff --git a/docs/PERMISSIONS.md b/docs/PERMISSIONS.md deleted file mode 100644 index a99126f..0000000 --- a/docs/PERMISSIONS.md +++ /dev/null @@ -1,86 +0,0 @@ -# ServiceHub โ€” Azure Permissions Guide - -ServiceHub requires appropriate permissions to access your Azure Service Bus resources. This guide explains the permissions needed for different features. - ---- - -## Recommended Setup: Shared Access Policy - -**For full ServiceHub functionality, create a dedicated Shared Access Policy with:** -- โœ… **Manage** permission -- โœ… **Send** permission -- โœ… **Listen** permission - -**How to create:** -1. Go to Azure Portal โ†’ Your Service Bus Namespace -2. Navigate to **Shared Access Policies** -3. Click **+ Add** -4. Name: `ServiceHub-FullAccess` (or your preferred name) -5. Check: โœ… **Manage**, โœ… **Send**, โœ… **Listen** -6. Click **Create** -7. Copy the **Primary Connection String** - -โš ๏ธ **Do NOT use RootManageSharedAccessKey** โ€” Always create a dedicated policy for ServiceHub. - ---- - -## Alternative: Limited Permissions (Read-Only) - -If you only need to browse messages without replay or testing capabilities: - -**Required Role (using Azure RBAC):** -- `Azure Service Bus Data Receiver` - -**Or create a Shared Access Policy with:** -- โœ… **Listen** permission only - -**Permissions Granted:** -- โœ… Peek/browse messages from queues and subscriptions -- โœ… View message metadata, properties, and bodies -- โœ… View queue and topic metrics -- โŒ Cannot replay messages from DLQ -- โŒ Cannot create test DLQ messages - ---- - -## Feature-Specific Requirements - -### ๐Ÿ” Read-Only Investigation - -**Permissions Required:** -- Listen (peek messages) - -**What You Can Do:** -- Browse active and dead-letter queue messages -- View message details and properties -- Search and filter messages -- View queue/topic metrics - -### ๐Ÿ”„ Replay Messages from DLQ - -**Permissions Required:** -- Listen (read from DLQ) -- Send (write to active queue) - -**What You Can Do:** -- All read-only features -- Move messages from DLQ back to main queue - -### ๐Ÿงช Create Test DLQ Messages - -**Permissions Required:** -- Listen (read from queue) -- Send (move messages to DLQ) - -**What You Can Do:** -- All read-only features -- Manually dead-letter messages for testing - -### ๐Ÿ› ๏ธ Full Management - -**Permissions Required:** -- Manage (full control) - -**What You Can Do:** -- All features above -- Future management operations \ No newline at end of file diff --git a/docs/SCREENSHOTS.md b/docs/SCREENSHOTS.md deleted file mode 100644 index 2695438..0000000 --- a/docs/SCREENSHOTS.md +++ /dev/null @@ -1,331 +0,0 @@ -# ServiceHub Screenshots Guide - -This guide explains the 35 screenshots used in the README and how they demonstrate ServiceHub capabilities. - ---- - -## ๐Ÿ“ธ Screenshot Organization - -All screenshots are located in `docs/screenshots/` with descriptive filenames that indicate their purpose and placement in the documentation. - -### Screenshot Mapping - -| # | Filename | Shows | Used In Section | -|---|----------|-------|-----------------| -| 1 | 01-Start-The-App.png | Application startup | Quick Start | -| 2 | 02-Connect-Service-Bus-With-Manage-ConnStr.png | Connection form with connection string | Quick Start | -| 3 | 03-Connected-ServiceBus.png | Connected namespace view | Quick Start | -| 4 | 04-feature-message-browser-empty.png | Message browser (empty) | Features | -| 5 | 05-main-message-display1.png | Message browser with loaded messages | Features - Message Browser | -| 6 | 06-feature-message-generator.png | Message generator basic form | Testing Tools | -| 7 | 07-feature-message-generator-basic-single-message.png | Single message generator | Testing Tools | -| 8 | 08-feature-message-generator-scenarios.png | Generator scenarios selection | Testing Tools | -| 9 | 09-feature-send-message.png | Send message form | Testing Tools | -| 10 | 10-message-display.png | Message details view | Features - Message Details | -| 11 | 11-Generate-Single-Message-Topic.png | Generate message to topic | Testing Tools | -| 12 | 12-showing-message-topic.png | Topic messages display | Features | -| 13 | 13-feature-message-details-custom-props.png | Custom properties tab | Features - Message Details | -| 14 | 14-feature-ai-findings.png | AI findings indicator | Features - AI Insights | -| 15 | 15-feature-message-details-JSON-prop.png | Message body JSON | Features - Message Details | -| 16 | 16-feature-message-details-AI-Insight.png | AI insights in message details | Features - AI Insights | -| 17 | 17-feature-ai-patterns-popup.png | AI patterns summary popup | Features - AI Insights | -| 18 | 18-feature-dlq-tab-with-ai.png | DLQ tab with AI indicators | Features - DLQ | -| 19 | 19-feature-ai-findings-1.png | AI findings detection | Features - AI Insights | -| 20 | 20-workflow-dlq-investigation-step1.png | DLQ investigation step 1 | Workflows - DLQ | -| 21 | 21-workflow-dlq-investigation-step1.png | DLQ investigation detailed | Workflows - DLQ | -| 22 | 22-workflow-dlq-investigation-step2.png | DLQ AI insights view | Workflows - DLQ | -| 23 | 23-workflow-dlq-AI-Insight.png | DLQ AI guidance | Workflows - DLQ | -| 24 | 24-workflow-dlq-replay-step4.png | Replay confirmation dialog | Workflows - DLQ | -| 25 | 25-feature-find-feature.png | Advanced search functionality | Features - Search | -| 26 | 26-row-ui-new-feature.png | Enhanced message row UI | Features - Message Browser | -| 27 | 27-dlq-enhancement.png | DLQ enhancements | Features - DLQ Intelligence | -| 28 | 28-dlq-intelligence.png | DLQ Intelligence dashboard | Features - DLQ Intelligence | -| 29 | 29-dlq-history-post-replay-message.png | DLQ history after single replay | Features - DLQ Intelligence | -| 30 | 30-auto-replay-feature.png | Auto-Replay Rules page with rule cards | Features - Auto-Replay System | -| 31 | 31-auto-relay-test-feature.png | Rule test dialog with matched messages | Features - Auto-Replay System | -| 32 | 32-replay-all-messages.png | Replay All confirmation with warnings | Features - Batch Replay | -| 33 | 33-replay-all-process.png | Batch replay in progress | Features - Batch Replay | -| 34 | 34-post-replay-all-messages.png | Results after batch replay | Features - Batch Replay | -| 35 | 35-rdlq-intelligence-history-post-replay-all.png | DLQ history audit trail after bulk replay | Features - DLQ Intelligence | - -**Total screenshots: 35 files** - ---- - -## ๐ŸŽฏ Key Screenshots Explained - -### DLQ Intelligence System (Screenshots 26-35) - -**New Feature Area:** DLQ Intelligence & Auto-Replay System - -#### Enhanced Message UI (Screenshot 26) -**File:** `26-row-ui-new-feature.png` -- Improved message list visual hierarchy -- Better property visibility -- Enhanced spacing and readability - -#### DLQ Intelligence Dashboard (Screenshots 27-28) -**Files:** `27-dlq-enhancement.png`, `28-dlq-intelligence.png` -- Persistent DLQ message tracking in SQLite database -- Category classification (Transient, MaxDelivery, Expired, DataQuality, etc.) -- "Scan Now" button for instant DLQ polling -- Export capabilities (JSON/CSV) -- Timeline view with replay history - -#### Replay History Tracking (Screenshot 29) -**File:** `29-dlq-history-post-replay-message.png` -- Shows DLQ message status after replay -- Timestamps and outcome tracking -- Audit trail for compliance - -#### Auto-Replay Rules System (Screenshots 30-31) -**Files:** `30-auto-replay-feature.png`, `31-auto-relay-test-feature.png` -- Rule cards with live statistics (Pending/Replayed/Success) -- Conditions builder (field, operator, value) -- "Test" button to preview matched messages -- Real-time evaluation against Active DLQ messages - -#### Batch Replay All (Screenshots 32-35) -**Files:** `32-replay-all-messages.png`, `33-replay-all-process.png`, `34-post-replay-all-messages.png`, `35-rdlq-intelligence-history-post-replay-all.png` -- Confirmation dialog with red danger header and 3 safety warnings -- Shows matched message count before execution -- Real-time progress indicator -- Post-replay statistics (matched/replayed/failed/skipped) -- Complete audit trail in DLQ Intelligence history - ---- - -### Hero Image (Most Important) -**File:** `05-main-message-display1.png` - -**Shows:** -- ServiceHub message browser with loaded messages -- Active (50) and Dead-Letter (0) tabs -- AI Findings: 2 indicator -- Auto-refresh toggle (ON, 7s ago) -- Filter, Search, and Refresh buttons -- Message list with preview text and timestamps - -**Why it's the hero:** This single screenshot demonstrates ServiceHub's complete value proposition - browsing real messages with AI insights during an incident. - -**Used in 7+ sections:** -- Hero (top of README) -- Problem section (after state) -- Quick Start Step 4 -- Features - Message Browser -- Roadmap current capabilities -- Get Started CTA -- Comparison sections - ---- - -### Critical Workflow Screenshots - -#### DLQ Investigation (4-step workflow) -1. **Step 1:** `18-feature-dlq-tab-with-ai.png` - Shows 3 messages in DLQ with AI badges -2. **Step 2:** `19-workflow-dlq-investigation-step1.png` - DLQ message Properties showing TestingDLQ reason -3. **Step 3:** `20-workflow-dlq-investigation-step2.png` - AI Insights showing 88% confidence pattern -4. **Step 4:** `21-workflow-dlq-replay-step3.png` - Replay confirmation dialog -5. **Step 5:** `22-workflow-dlq-replay-step4.png` - After replay (message counts increased) - -#### Message Inspection (3-tab view) -1. **Properties:** `11-feature-message-details-properties.png` - Message ID, timestamps, delivery count -2. **Custom Props:** `12-feature-message-details-custom-props.png` - Application headers -3. **Body:** `13-feature-message-details-body.png` - JSON message content - ---- - -## ๐Ÿ“ README Structure & Screenshot Usage - -### Hero Section (Line 1-15) -- **1 screenshot:** `08-hero-message-browser-loaded.png` -- **Purpose:** Immediate visual impact showing full capabilities - -### The Problem (Line 32-75) -- **2 screenshots:** - - `01-problem-empty-state.png` (Azure Portal limitations) - - `08-hero-message-browser-loaded.png` (ServiceHub solution) -- **Purpose:** Visual before/after comparison - -### Quick Start (Line 77-125) -- **5 screenshots:** - - `02-quickstart-connection-form.png` (Step 3) - - `03-quickstart-connected-namespace.png` (Step 3) - - `08-hero-message-browser-loaded.png` (Step 4) - - `07-feature-message-generator-scenarios.png` (Step 4) -- **Purpose:** Visual step-by-step setup guide - -### Key Features (Line 127-550) -- **15+ screenshots** demonstrating: - - Message browser (`08-hero...`) - - Message details (3 tabs: `11`, `12`, `13`) - - Search (`23-feature-search...`) - - DLQ forensics (`18`, `24`) - - AI insights (4 screenshots: `14`, `15`, `16`, `17`) - - Message generator (`06`, `07`) - - Send message (`09`) - - Replay (`21`, `22`) - -### Investigation Workflows (Line 552-650) -- **8 screenshots** showing: - - DLQ investigation (5 screenshots) - - Topic delivery (`10-workflow...`) - - Search functionality (`23-feature...`) - -### Comparison (Line 652-750) -- **2 screenshots:** - - `01-problem-empty-state.png` (Portal) - - `08-hero-message-browser-loaded.png` (ServiceHub) - -### Security & Trust (Line 752-850) -- **1 screenshot:** - - `02-quickstart-connection-form.png` (Security guidance) - -### Roadmap (Line 900-950) -- **1 screenshot:** - - `08-hero-message-browser-loaded.png` (Current capabilities) - -### Get Started (Line 1000-1100) -- **1 screenshot:** - - `08-hero-message-browser-loaded.png` (CTA) - ---- - -## โœ… Verification Checklist - -Use this to verify screenshots display correctly on GitHub: - -- [ ] **Hero image** loads immediately at top -- [ ] **Problem section** shows before/after comparison -- [ ] **Quick Start** shows connection flow (4 steps) -- [ ] **Features** demonstrates each capability with real screenshot -- [ ] **DLQ workflow** shows clear 4-step progression -- [ ] **AI insights** displays pattern detection screenshots -- [ ] **Message details** shows all 3 tabs (Properties, Custom, Body) -- [ ] **Comparison** shows Portal vs ServiceHub side-by-side -- [ ] All images load in <2 seconds -- [ ] No broken image icons (๐Ÿ–ผ๏ธโŒ) - ---- - -## ๐Ÿ”ง Maintenance - -### Adding New Screenshots - -1. Take screenshot of new feature -2. Save to `docs/screenshots/` with naming convention: - - Format: `XX-category-description.png` - - Categories: `feature`, `workflow`, `comparison`, `security` - - Example: `25-feature-bulk-replay.png` - -3. Update README.md with new image reference: - ```markdown - ![Descriptive alt text](docs/screenshots/25-feature-bulk-replay.png) - *Caption explaining what screenshot shows* - ``` - -4. Commit and push: - ```bash - git add docs/screenshots/25-feature-bulk-replay.png README.md - git commit -m "docs: Add bulk replay feature screenshot" - git push origin main - ``` - -### Updating Existing Screenshots - -1. Replace file in `docs/screenshots/` (keep same filename) -2. Commit and push: - ```bash - git add docs/screenshots/08-hero-message-browser-loaded.png - git commit -m "docs: Update hero image with latest UI" - git push origin main - ``` - -3. GitHub will automatically display updated image - ---- - -## ๐Ÿ“Š Screenshot Statistics - -| Metric | Value | -|--------|-------| -| **Total screenshots** | 35 files | -| **Most used screenshot** | `05-main-message-display1.png` (message browser) | -| **Total size** | ~6.8 MB (estimated) | -| **Average file size** | ~195 KB | -| **Largest file** | ~350 KB | -| **Smallest file** | ~85 KB | -| **Recommended max size** | 500 KB per file | - ---- - -## ๐ŸŽจ Screenshot Best Practices - -### When Taking Screenshots - -1. **Full window** (not partial crops) -2. **Realistic data** (show 10-50 messages, not 1000s) -3. **No sensitive data** (use test namespaces, generated messages) -4. **Consistent resolution** (1200-1600px width) -5. **Clean UI** (close unnecessary panels) - -### File Format - -- **Format:** PNG (for crisp UI text) -- **Compression:** Use pngquant (65-80% quality) -- **Max size:** 500 KB per file -- **Naming:** Descriptive (`feature-name.png`, not `Screenshot 1.png`) - -### Alt Text - -Write descriptive alt text for accessibility: - -```markdown - -![ServiceHub message browser showing 50 active messages with AI findings indicator](...) - - -![Screenshot](...) -![Message browser](...) -``` - ---- - -## ๐Ÿš€ Quick Commands - -```bash -# View all screenshots -ls -lh docs/screenshots/ - -# Count screenshots -ls -1 docs/screenshots/ | wc -l - -# Check file sizes -ls -lh docs/screenshots/*.png | sort -k5 -hr - -# Find large files (>500KB) -find docs/screenshots -name "*.png" -size +500k - -# Optimize all screenshots -cd docs/screenshots -for img in *.png; do - pngquant --quality=65-80 --ext .png --force "$img" -done -``` - ---- - -## ๐ŸŒ View on GitHub - -**Repository:** https://github.com/debdevops/servicehub - -**Branch:** dglocal-110126 - -**README:** https://github.com/debdevops/servicehub/blob/dglocal-110126/README.md - -All 24 screenshots should display inline without broken image icons. - ---- - -**Last updated:** February 15, 2026 -**Screenshots version:** v2.0 (DLQ Intelligence & Auto-Replay System added) diff --git a/docs/screenshots/01-connect-page.png b/docs/screenshots/01-connect-page.png new file mode 100644 index 0000000..2be589c Binary files /dev/null and b/docs/screenshots/01-connect-page.png differ diff --git a/docs/screenshots/02-messages-queue-active.png b/docs/screenshots/02-messages-queue-active.png new file mode 100644 index 0000000..b5d3cb5 Binary files /dev/null and b/docs/screenshots/02-messages-queue-active.png differ diff --git a/docs/screenshots/03-message-detail-properties.png b/docs/screenshots/03-message-detail-properties.png new file mode 100644 index 0000000..7d59e21 Binary files /dev/null and b/docs/screenshots/03-message-detail-properties.png differ diff --git a/docs/screenshots/04-message-detail-body.png b/docs/screenshots/04-message-detail-body.png new file mode 100644 index 0000000..b508234 Binary files /dev/null and b/docs/screenshots/04-message-detail-body.png differ diff --git a/docs/screenshots/05-message-detail-ai-insights.png b/docs/screenshots/05-message-detail-ai-insights.png new file mode 100644 index 0000000..c6da6ce Binary files /dev/null and b/docs/screenshots/05-message-detail-ai-insights.png differ diff --git a/docs/screenshots/06-message-detail-forensic.png b/docs/screenshots/06-message-detail-forensic.png new file mode 100644 index 0000000..c868455 Binary files /dev/null and b/docs/screenshots/06-message-detail-forensic.png differ diff --git a/docs/screenshots/07-message-detail-headers.png b/docs/screenshots/07-message-detail-headers.png new file mode 100644 index 0000000..4fbab67 Binary files /dev/null and b/docs/screenshots/07-message-detail-headers.png differ diff --git a/docs/screenshots/08-messages-deadletter-queue.png b/docs/screenshots/08-messages-deadletter-queue.png new file mode 100644 index 0000000..43cf03b Binary files /dev/null and b/docs/screenshots/08-messages-deadletter-queue.png differ diff --git a/docs/screenshots/09-dlq-message-detail.png b/docs/screenshots/09-dlq-message-detail.png new file mode 100644 index 0000000..71334d7 Binary files /dev/null and b/docs/screenshots/09-dlq-message-detail.png differ diff --git a/docs/screenshots/10-dlq-message-ai-insights.png b/docs/screenshots/10-dlq-message-ai-insights.png new file mode 100644 index 0000000..7ee2e4f Binary files /dev/null and b/docs/screenshots/10-dlq-message-ai-insights.png differ diff --git a/docs/screenshots/11-messages-topic-subscription.png b/docs/screenshots/11-messages-topic-subscription.png new file mode 100644 index 0000000..546d1d8 Binary files /dev/null and b/docs/screenshots/11-messages-topic-subscription.png differ diff --git a/docs/screenshots/12-fab-quick-actions-open.png b/docs/screenshots/12-fab-quick-actions-open.png new file mode 100644 index 0000000..2f84f2f Binary files /dev/null and b/docs/screenshots/12-fab-quick-actions-open.png differ diff --git a/docs/screenshots/13-send-message-dialog.png b/docs/screenshots/13-send-message-dialog.png new file mode 100644 index 0000000..83efccd Binary files /dev/null and b/docs/screenshots/13-send-message-dialog.png differ diff --git a/docs/screenshots/14-generate-messages-dialog.png b/docs/screenshots/14-generate-messages-dialog.png new file mode 100644 index 0000000..58c82e4 Binary files /dev/null and b/docs/screenshots/14-generate-messages-dialog.png differ diff --git a/docs/screenshots/15-test-dlq-dialog.png b/docs/screenshots/15-test-dlq-dialog.png new file mode 100644 index 0000000..cc4051e Binary files /dev/null and b/docs/screenshots/15-test-dlq-dialog.png differ diff --git a/docs/screenshots/16-dlq-history-overview.png b/docs/screenshots/16-dlq-history-overview.png new file mode 100644 index 0000000..92c7969 Binary files /dev/null and b/docs/screenshots/16-dlq-history-overview.png differ diff --git a/docs/screenshots/17-dlq-history-detail.png b/docs/screenshots/17-dlq-history-detail.png new file mode 100644 index 0000000..41502df Binary files /dev/null and b/docs/screenshots/17-dlq-history-detail.png differ diff --git a/docs/screenshots/18-dlq-history-full.png b/docs/screenshots/18-dlq-history-full.png new file mode 100644 index 0000000..1e36fd3 Binary files /dev/null and b/docs/screenshots/18-dlq-history-full.png differ diff --git a/docs/screenshots/19-rules-page.png b/docs/screenshots/19-rules-page.png new file mode 100644 index 0000000..1d44aea Binary files /dev/null and b/docs/screenshots/19-rules-page.png differ diff --git a/docs/screenshots/20-rules-template-gallery.png b/docs/screenshots/20-rules-template-gallery.png new file mode 100644 index 0000000..569da37 Binary files /dev/null and b/docs/screenshots/20-rules-template-gallery.png differ diff --git a/docs/screenshots/21-rules-create-dialog.png b/docs/screenshots/21-rules-create-dialog.png new file mode 100644 index 0000000..431d487 Binary files /dev/null and b/docs/screenshots/21-rules-create-dialog.png differ diff --git a/docs/screenshots/22-health-page.png b/docs/screenshots/22-health-page.png new file mode 100644 index 0000000..1f47853 Binary files /dev/null and b/docs/screenshots/22-health-page.png differ diff --git a/docs/screenshots/23-help-page.png b/docs/screenshots/23-help-page.png new file mode 100644 index 0000000..4039e9f Binary files /dev/null and b/docs/screenshots/23-help-page.png differ diff --git a/docs/screenshots/24-help-page-full.png b/docs/screenshots/24-help-page-full.png new file mode 100644 index 0000000..4039e9f Binary files /dev/null and b/docs/screenshots/24-help-page-full.png differ diff --git a/docs/screenshots/25-sidebar-navigation.png b/docs/screenshots/25-sidebar-navigation.png new file mode 100644 index 0000000..7cf6a3f Binary files /dev/null and b/docs/screenshots/25-sidebar-navigation.png differ diff --git a/docs/screenshots/26-scalar-api-docs.png b/docs/screenshots/26-scalar-api-docs.png new file mode 100644 index 0000000..3fb33bd Binary files /dev/null and b/docs/screenshots/26-scalar-api-docs.png differ diff --git a/docs/screenshots/27-full-app-overview.png b/docs/screenshots/27-full-app-overview.png new file mode 100644 index 0000000..d91d8d5 Binary files /dev/null and b/docs/screenshots/27-full-app-overview.png differ diff --git a/docs/screenshots/28-message-filter.png b/docs/screenshots/28-message-filter.png new file mode 100644 index 0000000..c681613 Binary files /dev/null and b/docs/screenshots/28-message-filter.png differ diff --git a/docs/screenshots/01-Start-The-App.png b/docs/screenshots/archive/01-Start-The-App.png similarity index 100% rename from docs/screenshots/01-Start-The-App.png rename to docs/screenshots/archive/01-Start-The-App.png diff --git a/docs/screenshots/archive/01-connect-page-full.png b/docs/screenshots/archive/01-connect-page-full.png new file mode 100644 index 0000000..3f5aa72 Binary files /dev/null and b/docs/screenshots/archive/01-connect-page-full.png differ diff --git a/docs/screenshots/archive/01-connect-page.png b/docs/screenshots/archive/01-connect-page.png new file mode 100644 index 0000000..a149fd8 Binary files /dev/null and b/docs/screenshots/archive/01-connect-page.png differ diff --git a/docs/screenshots/02-Connect-Service-Bus-With-Manage-ConnStr.png b/docs/screenshots/archive/02-Connect-Service-Bus-With-Manage-ConnStr.png similarity index 100% rename from docs/screenshots/02-Connect-Service-Bus-With-Manage-ConnStr.png rename to docs/screenshots/archive/02-Connect-Service-Bus-With-Manage-ConnStr.png diff --git a/docs/screenshots/archive/02-connect-page-namespace-connected.png b/docs/screenshots/archive/02-connect-page-namespace-connected.png new file mode 100644 index 0000000..5f68338 Binary files /dev/null and b/docs/screenshots/archive/02-connect-page-namespace-connected.png differ diff --git a/docs/screenshots/archive/02-messages-overview.png b/docs/screenshots/archive/02-messages-overview.png new file mode 100644 index 0000000..4ca934a Binary files /dev/null and b/docs/screenshots/archive/02-messages-overview.png differ diff --git a/docs/screenshots/03-Connected-ServiceBus.png b/docs/screenshots/archive/03-Connected-ServiceBus.png similarity index 100% rename from docs/screenshots/03-Connected-ServiceBus.png rename to docs/screenshots/archive/03-Connected-ServiceBus.png diff --git a/docs/screenshots/archive/03-messages-page-overview.png b/docs/screenshots/archive/03-messages-page-overview.png new file mode 100644 index 0000000..a494e15 Binary files /dev/null and b/docs/screenshots/archive/03-messages-page-overview.png differ diff --git a/docs/screenshots/archive/03-messages-queue-browser.png b/docs/screenshots/archive/03-messages-queue-browser.png new file mode 100644 index 0000000..196209c Binary files /dev/null and b/docs/screenshots/archive/03-messages-queue-browser.png differ diff --git a/docs/screenshots/04-feature-message-browser-empty.png b/docs/screenshots/archive/04-feature-message-browser-empty.png similarity index 100% rename from docs/screenshots/04-feature-message-browser-empty.png rename to docs/screenshots/archive/04-feature-message-browser-empty.png diff --git a/docs/screenshots/archive/04-message-detail-properties.png b/docs/screenshots/archive/04-message-detail-properties.png new file mode 100644 index 0000000..b35ce89 Binary files /dev/null and b/docs/screenshots/archive/04-message-detail-properties.png differ diff --git a/docs/screenshots/archive/04-messages-queue-browser.png b/docs/screenshots/archive/04-messages-queue-browser.png new file mode 100644 index 0000000..ec14baf Binary files /dev/null and b/docs/screenshots/archive/04-messages-queue-browser.png differ diff --git a/docs/screenshots/05-main-message-display1.png b/docs/screenshots/archive/05-main-message-display1.png similarity index 100% rename from docs/screenshots/05-main-message-display1.png rename to docs/screenshots/archive/05-main-message-display1.png diff --git a/docs/screenshots/archive/05-message-detail-body.png b/docs/screenshots/archive/05-message-detail-body.png new file mode 100644 index 0000000..7250aec Binary files /dev/null and b/docs/screenshots/archive/05-message-detail-body.png differ diff --git a/docs/screenshots/06-main-message-display2.png b/docs/screenshots/archive/06-main-message-display2.png similarity index 100% rename from docs/screenshots/06-main-message-display2.png rename to docs/screenshots/archive/06-main-message-display2.png diff --git a/docs/screenshots/archive/06-message-detail-ai-insights.png b/docs/screenshots/archive/06-message-detail-ai-insights.png new file mode 100644 index 0000000..0017ac7 Binary files /dev/null and b/docs/screenshots/archive/06-message-detail-ai-insights.png differ diff --git a/docs/screenshots/07-feature-message-generator-basic-single-message.png b/docs/screenshots/archive/07-feature-message-generator-basic-single-message.png similarity index 100% rename from docs/screenshots/07-feature-message-generator-basic-single-message.png rename to docs/screenshots/archive/07-feature-message-generator-basic-single-message.png diff --git a/docs/screenshots/archive/07-message-detail-forensic.png b/docs/screenshots/archive/07-message-detail-forensic.png new file mode 100644 index 0000000..5b13d52 Binary files /dev/null and b/docs/screenshots/archive/07-message-detail-forensic.png differ diff --git a/docs/screenshots/08-feature-message-generator-scenarios.png b/docs/screenshots/archive/08-feature-message-generator-scenarios.png similarity index 100% rename from docs/screenshots/08-feature-message-generator-scenarios.png rename to docs/screenshots/archive/08-feature-message-generator-scenarios.png diff --git a/docs/screenshots/archive/08-message-detail-headers.png b/docs/screenshots/archive/08-message-detail-headers.png new file mode 100644 index 0000000..07987a3 Binary files /dev/null and b/docs/screenshots/archive/08-message-detail-headers.png differ diff --git a/docs/screenshots/archive/09-dead-letter-queue.png b/docs/screenshots/archive/09-dead-letter-queue.png new file mode 100644 index 0000000..1783f20 Binary files /dev/null and b/docs/screenshots/archive/09-dead-letter-queue.png differ diff --git a/docs/screenshots/09-feature-message-generator-scenarios1.png b/docs/screenshots/archive/09-feature-message-generator-scenarios1.png similarity index 100% rename from docs/screenshots/09-feature-message-generator-scenarios1.png rename to docs/screenshots/archive/09-feature-message-generator-scenarios1.png diff --git a/docs/screenshots/archive/10-dead-letter-queue.png b/docs/screenshots/archive/10-dead-letter-queue.png new file mode 100644 index 0000000..63e7e9b Binary files /dev/null and b/docs/screenshots/archive/10-dead-letter-queue.png differ diff --git a/docs/screenshots/archive/10-dlq-message-detail-replay.png b/docs/screenshots/archive/10-dlq-message-detail-replay.png new file mode 100644 index 0000000..076135a Binary files /dev/null and b/docs/screenshots/archive/10-dlq-message-detail-replay.png differ diff --git a/docs/screenshots/10-message-display.png b/docs/screenshots/archive/10-message-display.png similarity index 100% rename from docs/screenshots/10-message-display.png rename to docs/screenshots/archive/10-message-display.png diff --git a/docs/screenshots/11-Generate-Single-Message-Topic.png b/docs/screenshots/archive/11-Generate-Single-Message-Topic.png similarity index 100% rename from docs/screenshots/11-Generate-Single-Message-Topic.png rename to docs/screenshots/archive/11-Generate-Single-Message-Topic.png diff --git a/docs/screenshots/archive/11-messages-topic-subscription.png b/docs/screenshots/archive/11-messages-topic-subscription.png new file mode 100644 index 0000000..937ed99 Binary files /dev/null and b/docs/screenshots/archive/11-messages-topic-subscription.png differ diff --git a/docs/screenshots/archive/11-topic-subscription-messages.png b/docs/screenshots/archive/11-topic-subscription-messages.png new file mode 100644 index 0000000..4d64572 Binary files /dev/null and b/docs/screenshots/archive/11-topic-subscription-messages.png differ diff --git a/docs/screenshots/archive/12-fab-quick-actions-menu.png b/docs/screenshots/archive/12-fab-quick-actions-menu.png new file mode 100644 index 0000000..06f2975 Binary files /dev/null and b/docs/screenshots/archive/12-fab-quick-actions-menu.png differ diff --git a/docs/screenshots/archive/12-fab-quick-actions-open.png b/docs/screenshots/archive/12-fab-quick-actions-open.png new file mode 100644 index 0000000..7186bd1 Binary files /dev/null and b/docs/screenshots/archive/12-fab-quick-actions-open.png differ diff --git a/docs/screenshots/12-showing-message-topic.png b/docs/screenshots/archive/12-showing-message-topic.png similarity index 100% rename from docs/screenshots/12-showing-message-topic.png rename to docs/screenshots/archive/12-showing-message-topic.png diff --git a/docs/screenshots/archive/13-fab-send-message-dialog.png b/docs/screenshots/archive/13-fab-send-message-dialog.png new file mode 100644 index 0000000..6d82462 Binary files /dev/null and b/docs/screenshots/archive/13-fab-send-message-dialog.png differ diff --git a/docs/screenshots/13-feature-message-details-custom-props.png b/docs/screenshots/archive/13-feature-message-details-custom-props.png similarity index 100% rename from docs/screenshots/13-feature-message-details-custom-props.png rename to docs/screenshots/archive/13-feature-message-details-custom-props.png diff --git a/docs/screenshots/archive/13-send-message-dialog.png b/docs/screenshots/archive/13-send-message-dialog.png new file mode 100644 index 0000000..132f10d Binary files /dev/null and b/docs/screenshots/archive/13-send-message-dialog.png differ diff --git a/docs/screenshots/archive/14-fab-generate-messages-dialog.png b/docs/screenshots/archive/14-fab-generate-messages-dialog.png new file mode 100644 index 0000000..937ed99 Binary files /dev/null and b/docs/screenshots/archive/14-fab-generate-messages-dialog.png differ diff --git a/docs/screenshots/14-feature-message-details-custom-props1.png b/docs/screenshots/archive/14-feature-message-details-custom-props1.png similarity index 100% rename from docs/screenshots/14-feature-message-details-custom-props1.png rename to docs/screenshots/archive/14-feature-message-details-custom-props1.png diff --git a/docs/screenshots/archive/14-generate-messages-dialog.png b/docs/screenshots/archive/14-generate-messages-dialog.png new file mode 100644 index 0000000..977b093 Binary files /dev/null and b/docs/screenshots/archive/14-generate-messages-dialog.png differ diff --git a/docs/screenshots/archive/15-dlq-history-page.png b/docs/screenshots/archive/15-dlq-history-page.png new file mode 100644 index 0000000..8a3a58e Binary files /dev/null and b/docs/screenshots/archive/15-dlq-history-page.png differ diff --git a/docs/screenshots/archive/15-fab-test-dlq-dialog.png b/docs/screenshots/archive/15-fab-test-dlq-dialog.png new file mode 100644 index 0000000..937ed99 Binary files /dev/null and b/docs/screenshots/archive/15-fab-test-dlq-dialog.png differ diff --git a/docs/screenshots/15-feature-message-details-JSON-prop.png b/docs/screenshots/archive/15-feature-message-details-JSON-prop.png similarity index 100% rename from docs/screenshots/15-feature-message-details-JSON-prop.png rename to docs/screenshots/archive/15-feature-message-details-JSON-prop.png diff --git a/docs/screenshots/archive/15-test-dlq-dialog.png b/docs/screenshots/archive/15-test-dlq-dialog.png new file mode 100644 index 0000000..61ddfe3 Binary files /dev/null and b/docs/screenshots/archive/15-test-dlq-dialog.png differ diff --git a/docs/screenshots/archive/16-dlq-history-detail.png b/docs/screenshots/archive/16-dlq-history-detail.png new file mode 100644 index 0000000..6d4a91a Binary files /dev/null and b/docs/screenshots/archive/16-dlq-history-detail.png differ diff --git a/docs/screenshots/archive/16-dlq-history-page.png b/docs/screenshots/archive/16-dlq-history-page.png new file mode 100644 index 0000000..ab98620 Binary files /dev/null and b/docs/screenshots/archive/16-dlq-history-page.png differ diff --git a/docs/screenshots/16-feature-message-details-AI-Insight.png b/docs/screenshots/archive/16-feature-message-details-AI-Insight.png similarity index 100% rename from docs/screenshots/16-feature-message-details-AI-Insight.png rename to docs/screenshots/archive/16-feature-message-details-AI-Insight.png diff --git a/docs/screenshots/archive/17-dlq-history-detail.png b/docs/screenshots/archive/17-dlq-history-detail.png new file mode 100644 index 0000000..41a1703 Binary files /dev/null and b/docs/screenshots/archive/17-dlq-history-detail.png differ diff --git a/docs/screenshots/17-feature-message-details-AI-Insight1.png b/docs/screenshots/archive/17-feature-message-details-AI-Insight1.png similarity index 100% rename from docs/screenshots/17-feature-message-details-AI-Insight1.png rename to docs/screenshots/archive/17-feature-message-details-AI-Insight1.png diff --git a/docs/screenshots/archive/17-rules-page.png b/docs/screenshots/archive/17-rules-page.png new file mode 100644 index 0000000..763cb45 Binary files /dev/null and b/docs/screenshots/archive/17-rules-page.png differ diff --git a/docs/screenshots/18-feature-message-details-AI-Insight2.png b/docs/screenshots/archive/18-feature-message-details-AI-Insight2.png similarity index 100% rename from docs/screenshots/18-feature-message-details-AI-Insight2.png rename to docs/screenshots/archive/18-feature-message-details-AI-Insight2.png diff --git a/docs/screenshots/archive/18-rules-page.png b/docs/screenshots/archive/18-rules-page.png new file mode 100644 index 0000000..9518134 Binary files /dev/null and b/docs/screenshots/archive/18-rules-page.png differ diff --git a/docs/screenshots/archive/18-rules-template-gallery.png b/docs/screenshots/archive/18-rules-template-gallery.png new file mode 100644 index 0000000..2938f45 Binary files /dev/null and b/docs/screenshots/archive/18-rules-template-gallery.png differ diff --git a/docs/screenshots/19-feature-ai-findings-1.png b/docs/screenshots/archive/19-feature-ai-findings-1.png similarity index 100% rename from docs/screenshots/19-feature-ai-findings-1.png rename to docs/screenshots/archive/19-feature-ai-findings-1.png diff --git a/docs/screenshots/archive/19-health-page.png b/docs/screenshots/archive/19-health-page.png new file mode 100644 index 0000000..0b0b225 Binary files /dev/null and b/docs/screenshots/archive/19-health-page.png differ diff --git a/docs/screenshots/archive/19-rules-template-gallery.png b/docs/screenshots/archive/19-rules-template-gallery.png new file mode 100644 index 0000000..ae54146 Binary files /dev/null and b/docs/screenshots/archive/19-rules-template-gallery.png differ diff --git a/docs/screenshots/20-feature-ai-findings-2.png b/docs/screenshots/archive/20-feature-ai-findings-2.png similarity index 100% rename from docs/screenshots/20-feature-ai-findings-2.png rename to docs/screenshots/archive/20-feature-ai-findings-2.png diff --git a/docs/screenshots/archive/20-health-page.png b/docs/screenshots/archive/20-health-page.png new file mode 100644 index 0000000..3d2d837 Binary files /dev/null and b/docs/screenshots/archive/20-health-page.png differ diff --git a/docs/screenshots/archive/20-help-page.png b/docs/screenshots/archive/20-help-page.png new file mode 100644 index 0000000..5b865da Binary files /dev/null and b/docs/screenshots/archive/20-help-page.png differ diff --git a/docs/screenshots/archive/21-help-page-full.png b/docs/screenshots/archive/21-help-page-full.png new file mode 100644 index 0000000..a71b884 Binary files /dev/null and b/docs/screenshots/archive/21-help-page-full.png differ diff --git a/docs/screenshots/archive/21-help-page.png b/docs/screenshots/archive/21-help-page.png new file mode 100644 index 0000000..a71b884 Binary files /dev/null and b/docs/screenshots/archive/21-help-page.png differ diff --git a/docs/screenshots/21-workflow-dlq-investigation-step1.png b/docs/screenshots/archive/21-workflow-dlq-investigation-step1.png similarity index 100% rename from docs/screenshots/21-workflow-dlq-investigation-step1.png rename to docs/screenshots/archive/21-workflow-dlq-investigation-step1.png diff --git a/docs/screenshots/archive/22-scalar-api-docs.png b/docs/screenshots/archive/22-scalar-api-docs.png new file mode 100644 index 0000000..fd9ffba Binary files /dev/null and b/docs/screenshots/archive/22-scalar-api-docs.png differ diff --git a/docs/screenshots/22-workflow-dlq-investigation-step2.png b/docs/screenshots/archive/22-workflow-dlq-investigation-step2.png similarity index 100% rename from docs/screenshots/22-workflow-dlq-investigation-step2.png rename to docs/screenshots/archive/22-workflow-dlq-investigation-step2.png diff --git a/docs/screenshots/23-workflow-dlq-AI-Insight.png b/docs/screenshots/archive/23-workflow-dlq-AI-Insight.png similarity index 100% rename from docs/screenshots/23-workflow-dlq-AI-Insight.png rename to docs/screenshots/archive/23-workflow-dlq-AI-Insight.png diff --git a/docs/screenshots/24-workflow-dlq-replay-step4.png b/docs/screenshots/archive/24-workflow-dlq-replay-step4.png similarity index 100% rename from docs/screenshots/24-workflow-dlq-replay-step4.png rename to docs/screenshots/archive/24-workflow-dlq-replay-step4.png diff --git a/docs/screenshots/25-feature-find-feature.png b/docs/screenshots/archive/25-feature-find-feature.png similarity index 100% rename from docs/screenshots/25-feature-find-feature.png rename to docs/screenshots/archive/25-feature-find-feature.png diff --git a/docs/screenshots/archive/25-scalar-api-docs.png b/docs/screenshots/archive/25-scalar-api-docs.png new file mode 100644 index 0000000..fd9ffba Binary files /dev/null and b/docs/screenshots/archive/25-scalar-api-docs.png differ diff --git a/docs/screenshots/26-row-ui-new-feature.png b/docs/screenshots/archive/26-row-ui-new-feature.png similarity index 100% rename from docs/screenshots/26-row-ui-new-feature.png rename to docs/screenshots/archive/26-row-ui-new-feature.png diff --git a/docs/screenshots/27-dlq-enhancement.png b/docs/screenshots/archive/27-dlq-enhancement.png similarity index 100% rename from docs/screenshots/27-dlq-enhancement.png rename to docs/screenshots/archive/27-dlq-enhancement.png diff --git a/docs/screenshots/28-dlq-intelligence.png b/docs/screenshots/archive/28-dlq-intelligence.png similarity index 100% rename from docs/screenshots/28-dlq-intelligence.png rename to docs/screenshots/archive/28-dlq-intelligence.png diff --git a/docs/screenshots/29-dlq-history-post-replay-message.png b/docs/screenshots/archive/29-dlq-history-post-replay-message.png similarity index 100% rename from docs/screenshots/29-dlq-history-post-replay-message.png rename to docs/screenshots/archive/29-dlq-history-post-replay-message.png diff --git a/docs/screenshots/30-auto-replay-feature.png b/docs/screenshots/archive/30-auto-replay-feature.png similarity index 100% rename from docs/screenshots/30-auto-replay-feature.png rename to docs/screenshots/archive/30-auto-replay-feature.png diff --git a/docs/screenshots/31-auto-relay-test-feature.png b/docs/screenshots/archive/31-auto-relay-test-feature.png similarity index 100% rename from docs/screenshots/31-auto-relay-test-feature.png rename to docs/screenshots/archive/31-auto-relay-test-feature.png diff --git a/docs/screenshots/32-replay-all-messages.png b/docs/screenshots/archive/32-replay-all-messages.png similarity index 100% rename from docs/screenshots/32-replay-all-messages.png rename to docs/screenshots/archive/32-replay-all-messages.png diff --git a/docs/screenshots/33-replay-all-process.png b/docs/screenshots/archive/33-replay-all-process.png similarity index 100% rename from docs/screenshots/33-replay-all-process.png rename to docs/screenshots/archive/33-replay-all-process.png diff --git a/docs/screenshots/34-post-replay-all-messages.png b/docs/screenshots/archive/34-post-replay-all-messages.png similarity index 100% rename from docs/screenshots/34-post-replay-all-messages.png rename to docs/screenshots/archive/34-post-replay-all-messages.png diff --git a/docs/screenshots/35-rdlq-intelligence-history-post-replay-all.png b/docs/screenshots/archive/35-rdlq-intelligence-history-post-replay-all.png similarity index 100% rename from docs/screenshots/35-rdlq-intelligence-history-post-replay-all.png rename to docs/screenshots/archive/35-rdlq-intelligence-history-post-replay-all.png diff --git a/docs/screenshots/servicehub-demo.gif b/docs/screenshots/servicehub-demo.gif new file mode 100644 index 0000000..f5cdef0 Binary files /dev/null and b/docs/screenshots/servicehub-demo.gif differ diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..08646aa --- /dev/null +++ b/package-lock.json @@ -0,0 +1,59 @@ +{ + "name": "servicehub", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "devDependencies": { + "playwright": "^1.58.2" + } + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/playwright": { + "version": "1.58.2", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.58.2.tgz", + "integrity": "sha512-vA30H8Nvkq/cPBnNw4Q8TWz1EJyqgpuinBcHET0YVJVFldr8JDNiU9LaWAE1KqSkRYazuaBhTpB5ZzShOezQ6A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright-core": "1.58.2" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "fsevents": "2.3.2" + } + }, + "node_modules/playwright-core": { + "version": "1.58.2", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.58.2.tgz", + "integrity": "sha512-yZkEtftgwS8CsfYo7nm0KE8jsvm6i/PTgVtB8DL726wNf6H2IMsDuxCpJj59KDaxCtSnrWan2AeDqM7JBaultg==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=18" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..b6559de --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "devDependencies": { + "playwright": "^1.58.2" + } +} diff --git a/services/api/DOCUMENTATION_INDEX.md b/services/api/DOCUMENTATION_INDEX.md deleted file mode 100644 index f32fb34..0000000 --- a/services/api/DOCUMENTATION_INDEX.md +++ /dev/null @@ -1,450 +0,0 @@ -# ServiceHub API Documentation Index - -Complete architectural documentation with deep-dive diagrams, implementation patterns, and operational guides. - ---- - -## ๐Ÿ“š Documentation Overview - -| Document | Purpose | Audience | Time to Read | -|----------|---------|----------|--------------| -| [README.md](./README.md) | Quick start & API overview | Everyone | 15 min | -| **[ARCHITECTURE.md](./ARCHITECTURE.md)** | System design & diagrams | Architects, Senior devs | 45 min | -| **[IMPLEMENTATION_PATTERNS.md](./IMPLEMENTATION_PATTERNS.md)** | Code patterns & best practices | Developers | 40 min | -| **[DEPLOYMENT_OPERATIONS.md](./DEPLOYMENT_OPERATIONS.md)** | Deployment & troubleshooting | DevOps, Site reliability | 35 min | - ---- - -## ๐Ÿ—๏ธ Architecture Documentation - -### [ARCHITECTURE.md](./ARCHITECTURE.md) - 12 Detailed Diagrams - -The primary architectural document with comprehensive Mermaid diagrams: - -#### 1. **Architecture Overview - Layered Design** - - 4-layer architecture visualization - - Clean Architecture principles - - Component relationships - - [โ†’ View Diagram](./ARCHITECTURE.md#1-architecture-overview---layered-design-diagram) - -#### 2. **Sequential Flow Diagram** - - HTTP request lifecycle - - Middleware processing - - Business logic execution - - Response generation - - [โ†’ View Diagram](./ARCHITECTURE.md#2-requestresponse-sequential-flow) - -#### 3. **Class & Dependency Injection Diagram** - - Service interfaces & implementations - - DI container configuration - - Service relationships - - Factory patterns - - [โ†’ View Diagram](./ARCHITECTURE.md#3-detailed-class--dependency-injection-diagram) - -#### 4. **Request Processing Pipeline - Flow** - - 11-step middleware pipeline - - Decision points & error handling - - Request/response flow - - Color-coded steps - - [โ†’ View Diagram](./ARCHITECTURE.md#4-api-request-processing-pipeline---flow-diagram) - -#### 5. **Data Flow Example** - - Create namespace to access messages - - Step-by-step operation flow - - Cache interaction - - Response building - - [โ†’ View Diagram](./ARCHITECTURE.md#5-data-flow-create-namespace-to-access-messages) - -#### 6. **Security Architecture - Defense in Depth** - - Encryption layer (AES-GCM) - - Authentication layer (API keys) - - Security headers - - Input validation - - Monitoring & logging - - [โ†’ View Diagram](./ARCHITECTURE.md#6-security-architecture---defense-in-depth) - -#### 7. **Middleware Pipeline Execution Order** - - 11 middleware steps in order - - Request/response flow through each middleware - - Key responsibilities - - [โ†’ View Diagram](./ARCHITECTURE.md#7-middleware-pipeline-execution-order) - -#### 8. **Entity Relationship & Domain Model** - - Namespace, Queue, Topic, Subscription entities - - Message relationships - - Connection string encryption - - Database schema - - [โ†’ View Diagram](./ARCHITECTURE.md#8-entity-relationship--domain-model) - -#### 9. **Exception Handling Flow** - - Exception types mapping - - HTTP status codes - - Error response format - - Logging & response building - - [โ†’ View Diagram](./ARCHITECTURE.md#9-exception-handling-flow) - -#### 10. **Caching Strategy - In-Memory Cache Lifecycle** - - Cache lookup flow - - Cache types per entity - - Cache invalidation strategies - - TTL management - - [โ†’ View Diagram](./ARCHITECTURE.md#10-caching-strategy---in-memory-cache-lifecycle) - -#### 11. **Configuration Hierarchy** - - Environment variable precedence - - Configuration sections - - Settings per environment - - [โ†’ View Diagram](./ARCHITECTURE.md#11-configuration-hierarchy) - -#### 12. **Deployment Architecture** - - Development environment - - Staging environment - - Production environment - - Infrastructure components - - [โ†’ View Diagram](./ARCHITECTURE.md#12-deployment-architecture) - ---- - -## ๐Ÿ’ป Implementation Patterns - -### [IMPLEMENTATION_PATTERNS.md](./IMPLEMENTATION_PATTERNS.md) - Code Patterns & Best Practices - -Deep-dive into how the codebase is structured and patterns used: - -#### 1. **Result Pattern for Error Handling** - - Why Result Pattern over exceptions - - Implementation details - - Usage in controllers - - Benefits & trade-offs - - [โ†’ Read More](./IMPLEMENTATION_PATTERNS.md#1-result-pattern-for-error-handling) - -#### 2. **Dependency Injection Container Setup** - - Service registration patterns - - Service lifetime decisions - - Factory pattern usage - - Configuration binding - - [โ†’ Read More](./IMPLEMENTATION_PATTERNS.md#2-dependency-injection-container-setup) - -#### 3. **Middleware Pipeline Design** - - Custom middleware architecture - - Execution order (CRITICAL) - - Why the order matters - - Performance considerations - - [โ†’ Read More](./IMPLEMENTATION_PATTERNS.md#3-middleware-pipeline-design) - -#### 4. **Repository Pattern & Caching** - - Repository interface & implementation - - Current: In-memory repository - - Future: SQL Server repository - - Cache invalidation strategies - - [โ†’ Read More](./IMPLEMENTATION_PATTERNS.md#4-repository-pattern--caching) - -#### 5. **Security Implementation** - - Encryption: AES-GCM pattern - - API Key authentication flow - - Security headers strategy - - Prod vs Dev configurations - - [โ†’ Read More](./IMPLEMENTATION_PATTERNS.md#5-security-implementation) - -#### 6. **Configuration Management** - - Configuration precedence - - appsettings structure - - Options Pattern usage - - Environment-specific configs - - [โ†’ Read More](./IMPLEMENTATION_PATTERNS.md#6-configuration-management) - -#### 7. **Logging & Observability** - - Structured logging pattern - - Log redaction for security - - Correlation ID flow - - Request tracing - - [โ†’ Read More](./IMPLEMENTATION_PATTERNS.md#7-logging--observability) - -#### 8. **Validation Strategy** - - Validation layers - - FluentValidation examples - - Error response format - - [โ†’ Read More](./IMPLEMENTATION_PATTERNS.md#8-validation-strategy) - -#### 9. **API Response Format** - - Success response structure - - Paginated responses - - Error responses (RFC 7231) - - Response headers - - [โ†’ Read More](./IMPLEMENTATION_PATTERNS.md#9-api-response-format) - -#### 10. **Testing Approach** - - Unit testing patterns - - Integration testing patterns - - Mock frameworks - - Test structure - - [โ†’ Read More](./IMPLEMENTATION_PATTERNS.md#10-testing-approach) - -#### Plus: - - Performance optimization tips - - Common mistakes to avoid - - Best practices summary - ---- - -## ๐Ÿš€ Deployment & Operations - -### [DEPLOYMENT_OPERATIONS.md](./DEPLOYMENT_OPERATIONS.md) - Operational Runbooks - -Comprehensive guide for deploying and operating the API: - -#### 1. **Environment Configurations** - - Development environment settings - - Staging environment settings - - Production environment settings - - Key characteristics per environment - - [โ†’ View Configs](./DEPLOYMENT_OPERATIONS.md#1-environment-configurations) - -#### 2. **Deployment Strategies** - - Local development deployment - - Docker container deployment - - Kubernetes deployment with YAML - - Health checks & probes - - Resource limits & requests - - [โ†’ View Strategies](./DEPLOYMENT_OPERATIONS.md#2-deployment-strategies) - -#### 3. **Operational Checklists** - - Pre-deployment checklist - - Health check verification - - Post-deployment verification - - Configuration review - - [โ†’ View Checklist](./DEPLOYMENT_OPERATIONS.md#3-operational-checklists) - -#### 4. **Monitoring & Alerting** - - Key metrics to monitor - - Alert threshold matrix - - Availability metrics - - Performance metrics - - Security metrics - - Business metrics - - Log analytics queries - - [โ†’ View Monitoring](./DEPLOYMENT_OPERATIONS.md#4-monitoring--alerting) - -#### 5. **Troubleshooting Guide** - - Common issues & solutions - - 401 Unauthorized debugging - - Connection string decryption failures - - Rate limiting issues - - High memory usage - - Slow response times - - Diagnostic procedures - - [โ†’ View Troubleshooting](./DEPLOYMENT_OPERATIONS.md#5-troubleshooting-guide) - -#### 6. **Performance Tuning** - - Response time optimization - - Cache hit ratio improvement - - Connection pooling - - Message batching - - [โ†’ View Tuning](./DEPLOYMENT_OPERATIONS.md#6-performance-tuning) - -#### 7. **Disaster Recovery** - - Backup strategy - - Recovery procedures - - RTO/RPO targets - - Failover procedures - - [โ†’ View DR Plan](./DEPLOYMENT_OPERATIONS.md#7-disaster-recovery) - -#### 8. **API Versioning Strategy** - - Current v1 implementation - - Future v2 plans - - Versioning headers - - Migration strategy - - [โ†’ View Versioning](./DEPLOYMENT_OPERATIONS.md#8-api-versioning-strategy) - -#### Plus: - - Production deployment runbook - - Step-by-step procedures - - Rollback procedures - - Incident response - ---- - -## ๐ŸŽฏ Quick Navigation by Role - -### For **Architects & Tech Leads** -1. Start: [ARCHITECTURE.md](./ARCHITECTURE.md) - Diagrams 1-4 -2. Deep-dive: All 12 diagrams in ARCHITECTURE.md -3. Review: Section "Architectural Principles" -4. Plan: [DEPLOYMENT_OPERATIONS.md](./DEPLOYMENT_OPERATIONS.md) - Deployment strategies -5. Evaluate: [IMPLEMENTATION_PATTERNS.md](./IMPLEMENTATION_PATTERNS.md) - All sections - -### For **Backend Developers** -1. Start: [README.md](./README.md) - Quick start -2. Learn: [IMPLEMENTATION_PATTERNS.md](./IMPLEMENTATION_PATTERNS.md) - All sections -3. Study: [ARCHITECTURE.md](./ARCHITECTURE.md) - Diagrams 3, 4, 8, 9 -4. Build: Reference code in `src/` directory -5. Debug: [DEPLOYMENT_OPERATIONS.md](./DEPLOYMENT_OPERATIONS.md) - Troubleshooting - -### For **DevOps / Site Reliability** -1. Start: [DEPLOYMENT_OPERATIONS.md](./DEPLOYMENT_OPERATIONS.md) - Section 1-3 -2. Deploy: Docker/Kubernetes sections -3. Monitor: Monitoring & alerting section -4. Troubleshoot: Troubleshooting guide -5. Prepare: Disaster recovery & runbooks - -### For **QA / Test Engineers** -1. Start: [ARCHITECTURE.md](./ARCHITECTURE.md) - Diagram 2 (Sequential Flow) -2. Understand: Data flow (Diagram 5) -3. Test Plan: [IMPLEMENTATION_PATTERNS.md](./IMPLEMENTATION_PATTERNS.md) - Section 10 (Testing) -4. Edge Cases: Diagram 9 (Exception Handling) -5. Scenarios: [DEPLOYMENT_OPERATIONS.md](./DEPLOYMENT_OPERATIONS.md) - Disaster recovery - ---- - -## ๐Ÿ“Š Key Architectural Decisions - -### 1. Clean Architecture with 4 Layers -- **Why**: Clear separation of concerns, testability, maintainability -- **Details**: [ARCHITECTURE.md](./ARCHITECTURE.md#architectural-principles) -- **Implementation**: [IMPLEMENTATION_PATTERNS.md](./IMPLEMENTATION_PATTERNS.md) - -### 2. Result Pattern Instead of Exceptions -- **Why**: Explicit error handling, better performance, clearer contracts -- **Details**: [IMPLEMENTATION_PATTERNS.md](./IMPLEMENTATION_PATTERNS.md#1-result-pattern-for-error-handling) -- **Usage**: Throughout service layer - -### 3. In-Memory Repository (MVP) -- **Why**: Fast development, no database setup needed initially -- **Future**: SQL Server for persistence -- **Plan**: [IMPLEMENTATION_PATTERNS.md](./IMPLEMENTATION_PATTERNS.md#4-repository-pattern--caching) - -### 4. AES-GCM Encryption for Secrets -- **Why**: Authenticated encryption, industry standard, tamper detection -- **Details**: [IMPLEMENTATION_PATTERNS.md](./IMPLEMENTATION_PATTERNS.md#5-security-implementation) -- **Diagram**: [ARCHITECTURE.md](./ARCHITECTURE.md#6-security-architecture---defense-in-depth) - -### 5. Configuration-Driven Everything -- **Why**: Environment-specific behavior, secrets management, flexibility -- **Details**: [IMPLEMENTATION_PATTERNS.md](./IMPLEMENTATION_PATTERNS.md#6-configuration-management) -- **Hierarchy**: [ARCHITECTURE.md](./ARCHITECTURE.md#11-configuration-hierarchy) - -### 6. Custom Middleware Pipeline -- **Why**: Control over request processing, security layers, observability -- **Order**: [ARCHITECTURE.md](./ARCHITECTURE.md#7-middleware-pipeline-execution-order) -- **CRITICAL**: Order matters! [IMPLEMENTATION_PATTERNS.md](./IMPLEMENTATION_PATTERNS.md#3-middleware-pipeline-design) - ---- - -## ๐Ÿ“– Reading Order by Learning Goal - -### Goal: Understand the Complete System -1. [README.md](./README.md) - Overview (15 min) -2. [ARCHITECTURE.md](./ARCHITECTURE.md) - Section 1: Overview (10 min) -3. [ARCHITECTURE.md](./ARCHITECTURE.md) - Diagrams 2, 4, 5 (15 min) -4. [IMPLEMENTATION_PATTERNS.md](./IMPLEMENTATION_PATTERNS.md) - Section 1-3 (15 min) -5. [ARCHITECTURE.md](./ARCHITECTURE.md) - Remaining diagrams (20 min) - -### Goal: Implement New Features -1. [IMPLEMENTATION_PATTERNS.md](./IMPLEMENTATION_PATTERNS.md) - Section 1, 4, 8 (25 min) -2. [ARCHITECTURE.md](./ARCHITECTURE.md) - Diagram 3, 9 (15 min) -3. Browse relevant code in `src/ServiceHub.Api/` -4. Study existing service implementations -5. Follow patterns in new code - -### Goal: Deploy to Production -1. [DEPLOYMENT_OPERATIONS.md](./DEPLOYMENT_OPERATIONS.md) - Section 1-3 (20 min) -2. Review environment-specific configs -3. Read deployment strategy (Docker/K8s) -4. Follow pre-deployment checklist -5. Study runbook and rollback procedures - -### Goal: Debug Issues -1. [DEPLOYMENT_OPERATIONS.md](./DEPLOYMENT_OPERATIONS.md) - Troubleshooting (20 min) -2. [ARCHITECTURE.md](./ARCHITECTURE.md) - Diagrams 2, 4, 7 (15 min) -3. Check logs and correlation IDs -4. Use monitoring queries -5. Follow diagnostic procedures - ---- - -## ๐Ÿ”— External References - -### .NET & Architecture -- [Microsoft Clean Architecture Guide](https://github.com/ardalis/CleanArchitecture) -- [ASP.NET Core Dependency Injection](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/dependency-injection) -- [Middleware in ASP.NET Core](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/middleware) - -### Azure Services -- [Azure Service Bus](https://docs.microsoft.com/en-us/azure/service-bus-messaging/) -- [Azure Key Vault](https://docs.microsoft.com/en-us/azure/key-vault/) -- [Azure Application Insights](https://docs.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview) - -### Security -- [OWASP Top 10](https://owasp.org/www-project-top-ten/) -- [NIST Cybersecurity Framework](https://www.nist.gov/cyberframework/) -- [RFC 7231 - HTTP Semantics](https://tools.ietf.org/html/rfc7231) - -### Operational Excellence -- [12-Factor App Methodology](https://12factor.net/) -- [SRE Golden Signals](https://sre.google/books/) -- [Kubernetes Best Practices](https://kubernetes.io/docs/concepts/configuration/overview/) - ---- - -## ๐Ÿ“ Document Versions - -| Document | Version | Last Updated | Status | -|----------|---------|--------------|--------| -| ARCHITECTURE.md | 1.0 | 2026-01-17 | โœ… Current | -| IMPLEMENTATION_PATTERNS.md | 1.0 | 2026-01-17 | โœ… Current | -| DEPLOYMENT_OPERATIONS.md | 1.0 | 2026-01-17 | โœ… Current | -| README.md | 1.0 | 2025-12-10 | โœ… Current | - ---- - -## ๐Ÿ’ก Tips for Using This Documentation - -1. **Use Mermaid Diagrams**: Click on diagram links to view interactive diagrams (many tools support zooming, filtering) - -2. **Search Effectively**: Use Ctrl+F to search across documents for specific patterns (e.g., "cache", "encryption", "middleware") - -3. **Reference Often**: Keep architecture diagrams visible when coding to stay aligned with design - -4. **Update Documentation**: If you change architecture/patterns, update relevant diagrams and docs - -5. **Share with Team**: These docs are great for onboarding new team members - -6. **Generate HTML**: Use tools like `mdbook` or `pandoc` to generate prettier HTML versions - ---- - -## โ“ FAQ - -**Q: Where do I start if I'm new to this codebase?** -A: Start with [README.md](./README.md), then read [ARCHITECTURE.md](./ARCHITECTURE.md) diagrams 1-4, then explore the code. - -**Q: How do I add a new feature?** -A: Read [IMPLEMENTATION_PATTERNS.md](./IMPLEMENTATION_PATTERNS.md) sections 1-5, study existing services, follow same patterns. - -**Q: How do I deploy to production?** -A: Follow [DEPLOYMENT_OPERATIONS.md](./DEPLOYMENT_OPERATIONS.md) deployment strategy and pre-deployment checklist. - -**Q: What if the API is slow?** -A: See [DEPLOYMENT_OPERATIONS.md](./DEPLOYMENT_OPERATIONS.md) Performance Tuning section and [ARCHITECTURE.md](./ARCHITECTURE.md) diagram 10 (Caching). - -**Q: How is security handled?** -A: See [ARCHITECTURE.md](./ARCHITECTURE.md) diagram 6 (Security Architecture) and [IMPLEMENTATION_PATTERNS.md](./IMPLEMENTATION_PATTERNS.md) section 5 (Security Implementation). - -**Q: Are there example requests?** -A: Yes! See [README.md](./README.md) section "First API Calls" with curl examples, or use the API docs at `/scalar/v1` - ---- - -## ๐Ÿ“ž Support & Questions - -For questions about: -- **Architecture**: Review relevant diagrams in [ARCHITECTURE.md](./ARCHITECTURE.md) -- **Implementation**: Check [IMPLEMENTATION_PATTERNS.md](./IMPLEMENTATION_PATTERNS.md) -- **Operations**: See [DEPLOYMENT_OPERATIONS.md](./DEPLOYMENT_OPERATIONS.md) -- **Getting Started**: Read [README.md](./README.md) - ---- - -**Last Updated**: 2026-01-17 -**Version**: 1.0 -**Status**: Complete & Ready for Use ๐ŸŽ‰ diff --git a/services/api/README.md b/services/api/README.md index 1236df3..5aecde8 100644 --- a/services/api/README.md +++ b/services/api/README.md @@ -4,8 +4,7 @@ > This README provides quick start instructions and API reference. For complete documentation with architecture diagrams, design patterns, and detailed flows, see: > - **[Comprehensive Guide](../../docs/COMPREHENSIVE-GUIDE.md)** โ€” Complete guide with Mermaid diagrams -> - **[Architecture Details](ARCHITECTURE.md)** โ€” 805 lines of architectural documentation -> - **[Documentation Index](DOCUMENTATION_INDEX.md)** โ€” Index of all API documentation +> - **[Architecture Details](ARCHITECTURE.md)** โ€” Architectural documentation with Mermaid diagrams --- @@ -14,11 +13,9 @@ | Document | Purpose | Audience | |----------|---------|----------| | **[Comprehensive Guide](../../docs/COMPREHENSIVE-GUIDE.md)** | Complete guide with diagrams | Everyone (novices to experts) | -| [ARCHITECTURE.md](ARCHITECTURE.md) | Deep architectural details (805 lines) | Architects, senior developers | -| [DOCUMENTATION_INDEX.md](DOCUMENTATION_INDEX.md) | Index of 12 architectural diagrams | All developers | +| [ARCHITECTURE.md](ARCHITECTURE.md) | Deep architectural details | Architects, senior developers | | [IMPLEMENTATION_PATTERNS.md](IMPLEMENTATION_PATTERNS.md) | Code patterns & conventions | Backend developers | | [DEPLOYMENT_OPERATIONS.md](DEPLOYMENT_OPERATIONS.md) | Production deployment guide | DevOps, SREs | -| [FIXES_APPLIED.md](FIXES_APPLIED.md) | Applied fixes history | Maintainers | ---