Skip to content

pb2323/BugBridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

BugBridge

AI-Powered Automated Feedback Management Platform

BugBridge is an intelligent feedback management platform that automates the entire feedback lifecycleβ€”from collection and AI-powered analysis to Jira ticket creation, monitoring, and customer notification. It bridges the gap between customer feedback portals (Canny.io) and development tracking systems (Jira), ensuring no critical issue falls through the cracks and every customer feels heard.


🎯 What Problem Does BugBridge Solve?

Enterprise teams face a common challenge: feedback overload. Customer feedback comes from multiple channels (Canny.io, support tickets, user forums), and manually triaging, prioritizing, and converting this feedback into actionable development tasks is:

  • ⏱️ Time-consuming: Manual review of hundreds of feedback items daily
  • 🎯 Error-prone: Critical bugs can be missed or deprioritized
  • 😞 Poor customer experience: Customers don't know if their issues are being addressed
  • πŸ“Š Lack of visibility: Teams lack clear metrics on feedback trends and resolution rates

BugBridge's Solution

BugBridge automates this entire process using AI agents:

  1. Automatic Collection: Continuously pulls feedback from Canny.io
  2. Intelligent Analysis: AI analyzes each feedback item for:
    • Bug vs. feature request classification
    • Sentiment and urgency detection
    • Multi-factor priority scoring (0-100)
  3. Smart Ticket Creation: Automatically creates Jira tickets for high-priority items with full context
  4. Status Monitoring: Tracks ticket resolution in Jira
  5. Customer Closure: Notifies customers on Canny.io when their issues are resolved
  6. Analytics & Reporting: Daily reports with insights and trends
  7. Real-time Dashboard: Interactive web dashboard for visibility and control

✨ Key Features

πŸ€– AI-Powered Intelligence

  • Bug Detection: Identifies bugs vs. feature requests with 95%+ accuracy using XAI (Grok models)
  • Sentiment Analysis: Analyzes emotional tone (positive, neutral, negative, frustrated) and urgency
  • Priority Scoring: Multi-factor scoring based on:
    • Vote count and engagement metrics
    • Sentiment and urgency level
    • Business impact assessment
    • Recency and activity trends

πŸ”„ End-to-End Automation

  • Automated Collection: Scheduled sync from Canny.io (configurable interval)
  • Intelligent Triage: AI agents process each feedback item through the complete workflow
  • Smart Ticket Creation: Creates Jira tickets only for high-priority items (configurable threshold)
  • Resolution Tracking: Monitors Jira ticket status changes
  • Customer Notifications: Posts replies to Canny.io when issues are resolved

πŸ“Š Analytics & Reporting

  • Daily Reports: Automated daily summaries with metrics and insights sent via email
  • Visual Dashboards: Interactive charts and graphs for:
    • Bugs vs. feature requests distribution
    • Sentiment trends over time
    • Priority score distribution
    • Jira ticket status tracking
    • Resolution rates and performance metrics
  • Email Notifications: HTML-formatted reports sent to stakeholders

🎨 Interactive Dashboard

  • Real-time Metrics: Live view of feedback processing and ticket status
  • Feedback Management: View, filter, and manually process feedback items
  • Jira Integration: Direct links to Jira tickets and Canny.io posts
  • Configuration UI: Manage all settings through the web interface
  • Role-based Access: Admin and viewer roles with appropriate permissions
  • Session Persistence: Stay logged in across page refreshes

πŸ”— Seamless Integrations

  • Canny.io: Complete API integration for feedback collection and customer communication
  • Jira: MCP-based integration for ticket management and status tracking
  • Email: SMTP-based email delivery for reports and notifications
  • File Storage: Local storage for report archives

πŸ—οΈ Technology Stack

Backend (Python 3.10+)

  • LangGraph: Agent workflow orchestration and state management
  • LangChain: LLM integration, tooling, and prompt engineering
  • XAI (Grok): Large language model for AI operations
  • FastAPI: Modern Python web framework for REST API
  • SQLAlchemy: Async ORM for PostgreSQL
  • Pydantic: Data validation and settings management
  • APScheduler: Task scheduling for automated jobs

Frontend (TypeScript/React)

  • Next.js 14: React framework with App Router
  • React Query (TanStack): Data fetching and caching
  • Zustand: State management
  • Recharts: Interactive data visualizations
  • Tailwind CSS: Utility-first styling
  • Heroicons: Icon library

Database & Storage

  • PostgreSQL: Persistent data storage
  • AsyncPG: Async PostgreSQL driver
  • File System: Local report storage

Integrations

  • Canny.io REST API: Feedback platform integration
  • MCP (Model Context Protocol): Jira integration via mcp-atlassian server
  • SMTP: Email delivery (Gmail, Office365, etc.)

πŸ“ Project Structure

BugBridge/
β”œβ”€β”€ bugbridge/                    # Main Python application
β”‚   β”œβ”€β”€ agents/                   # AI agents (8 specialized agents)
β”‚   β”‚   β”œβ”€β”€ base.py              # Base agent class with common functionality
β”‚   β”‚   β”œβ”€β”€ collection.py        # Feedback Collection Agent
β”‚   β”‚   β”œβ”€β”€ bug_detection.py     # Bug Detection Agent
β”‚   β”‚   β”œβ”€β”€ sentiment.py         # Sentiment Analysis Agent
β”‚   β”‚   β”œβ”€β”€ priority.py          # Priority Scoring Agent
β”‚   β”‚   β”œβ”€β”€ jira_creation.py     # Jira Creation Agent
β”‚   β”‚   β”œβ”€β”€ monitoring.py        # Monitoring Agent
β”‚   β”‚   β”œβ”€β”€ notification.py      # Notification Agent
β”‚   β”‚   └── reporting.py         # Reporting Agent
β”‚   β”œβ”€β”€ models/                   # Pydantic data models
β”‚   β”œβ”€β”€ database/                 # Database layer
β”‚   β”‚   β”œβ”€β”€ models.py            # SQLAlchemy ORM models
β”‚   β”‚   β”œβ”€β”€ schema.py            # Raw SQL schema
β”‚   β”‚   └── connection.py        # Database connection management
β”‚   β”œβ”€β”€ integrations/             # External API integrations
β”‚   β”‚   β”œβ”€β”€ canny.py             # Canny.io API client
β”‚   β”‚   β”œβ”€β”€ xai.py               # XAI API wrapper
β”‚   β”‚   β”œβ”€β”€ mcp_jira.py          # MCP Jira client
β”‚   β”‚   β”œβ”€β”€ email.py             # Email delivery service
β”‚   β”‚   β”œβ”€β”€ file_storage.py      # File storage service
β”‚   β”‚   └── scheduler.py         # APScheduler setup
β”‚   β”œβ”€β”€ workflows/                # LangGraph workflows
β”‚   β”‚   β”œβ”€β”€ main.py              # Main feedback processing workflow
β”‚   β”‚   β”œβ”€β”€ reporting.py         # Daily report generation workflow
β”‚   β”‚   └── persistence.py       # Workflow state persistence
β”‚   β”œβ”€β”€ api/                      # REST API for dashboard
β”‚   β”‚   β”œβ”€β”€ main.py              # FastAPI application
β”‚   β”‚   β”œβ”€β”€ routes/              # API endpoints
β”‚   β”‚   β”‚   β”œβ”€β”€ auth.py          # Authentication (login/logout)
β”‚   β”‚   β”‚   β”œβ”€β”€ feedback.py      # Feedback management
β”‚   β”‚   β”‚   β”œβ”€β”€ jira_tickets.py  # Jira ticket management
β”‚   β”‚   β”‚   β”œβ”€β”€ metrics.py       # Analytics and metrics
β”‚   β”‚   β”‚   β”œβ”€β”€ reports.py       # Report generation
β”‚   β”‚   β”‚   └── config.py        # Configuration management
β”‚   β”‚   β”œβ”€β”€ middleware/          # Custom middleware
β”‚   β”‚   β”‚   └── auth.py          # JWT authentication middleware
β”‚   β”‚   β”œβ”€β”€ dependencies.py      # Shared FastAPI dependencies
β”‚   β”‚   └── exceptions.py        # Custom exception handlers
β”‚   β”œβ”€β”€ tools/                    # LangChain tools
β”‚   β”‚   └── jira_tools.py        # Jira operation tools
β”‚   β”œβ”€β”€ utils/                    # Utility modules
β”‚   β”‚   β”œβ”€β”€ logging.py           # Structured logging
β”‚   β”‚   β”œβ”€β”€ notifications.py     # Customer notification utilities
β”‚   β”‚   └── assignment.py        # Jira ticket assignment logic
β”‚   β”œβ”€β”€ cli/                      # CLI commands
β”‚   β”‚   └── report.py            # Report generation CLI
β”‚   └── config.py                 # Application configuration
β”œβ”€β”€ dashboard/                    # Frontend dashboard (Next.js/React)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ app/                 # Next.js App Router pages
β”‚   β”‚   β”‚   β”œβ”€β”€ dashboard/       # Dashboard overview
β”‚   β”‚   β”‚   β”œβ”€β”€ feedback/        # Feedback management
β”‚   β”‚   β”‚   β”œβ”€β”€ jira-tickets/    # Jira ticket tracking
β”‚   β”‚   β”‚   β”œβ”€β”€ metrics/         # Analytics and charts
β”‚   β”‚   β”‚   β”œβ”€β”€ reports/         # Report viewer
β”‚   β”‚   β”‚   β”œβ”€β”€ settings/        # Configuration UI
β”‚   β”‚   β”‚   └── login/           # Login page
β”‚   β”‚   β”œβ”€β”€ components/          # React components
β”‚   β”‚   β”‚   β”œβ”€β”€ layout/          # Layout components
β”‚   β”‚   β”‚   β”œβ”€β”€ auth/            # Authentication components
β”‚   β”‚   β”‚   β”œβ”€β”€ feedback/        # Feedback UI components
β”‚   β”‚   β”‚   β”œβ”€β”€ jira/            # Jira UI components
β”‚   β”‚   β”‚   β”œβ”€β”€ metrics/         # Chart components
β”‚   β”‚   β”‚   β”œβ”€β”€ reports/         # Report components
β”‚   β”‚   β”‚   └── common/          # Shared components
β”‚   β”‚   β”œβ”€β”€ hooks/               # Custom React hooks
β”‚   β”‚   β”œβ”€β”€ services/            # API service layer
β”‚   β”‚   β”œβ”€β”€ store/               # Zustand state management
β”‚   β”‚   β”œβ”€β”€ lib/                 # Utilities
β”‚   β”‚   └── middleware/          # Frontend middleware
β”‚   └── package.json             # Frontend dependencies
β”œβ”€β”€ mcp-atlassian/                # MCP server for Jira/Confluence
β”œβ”€β”€ scripts/                      # Utility scripts
β”‚   β”œβ”€β”€ create_admin_user.py     # Create admin users
β”‚   β”œβ”€β”€ init_database.py         # Initialize database schema
β”‚   └── process_existing_posts.py # Process existing feedback
β”œβ”€β”€ tests/                        # Test suite
β”‚   β”œβ”€β”€ test_mcp_jira_client.py  # MCP client tests
β”‚   β”œβ”€β”€ test_jira_tools.py       # Jira tools tests
β”‚   └── test_jira_creation_integration.py # Integration tests
β”œβ”€β”€ tasks/                        # Project documentation
β”‚   β”œβ”€β”€ prd-bugbridge-platform.md    # Product Requirements Document
β”‚   └── tasks-bugbridge-platform.md  # Implementation task list
β”œβ”€β”€ docs/                         # Documentation
β”œβ”€β”€ reports/                      # Generated reports storage
β”œβ”€β”€ .env                          # Environment configuration (not in git)
β”œβ”€β”€ requirements.txt              # Python dependencies
└── README.md                     # This file

πŸš€ Quick Start

Prerequisites

  • Python 3.10 or higher
  • PostgreSQL 14 or higher
  • Node.js 18+ and npm (for dashboard)
  • Canny.io account and API key
  • XAI API key (for Grok models)
  • Jira instance (Cloud or Server/Data Center)

Installation

  1. Clone the repository

    git clone https://github.com/pb2323/BugBridge.git
    cd BugBridge
  2. Set up Python environment

    python3 -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    pip install -r requirements.txt
  3. Configure environment variables

    cp .env.example .env
    # Edit .env with your configuration (see Configuration section below)
  4. Set up the database

    # Initialize database schema
    python scripts/init_database.py
    
    # Create an admin user
    python scripts/create_admin_user.py
  5. Set up the MCP Jira server

    cd mcp-atlassian
    cp .env.jira.example .env.jira
    # Edit .env.jira with your Jira credentials
    
    # Install dependencies (if not already done)
    uv sync
    
    # Start the MCP server
    python -m mcp_atlassian --transport streamable-http --port 3100 --path /mcp -vv
  6. Start the backend API

    # In a new terminal, from BugBridge root directory
    source venv/bin/activate
    uvicorn bugbridge.api.main:get_app --factory --reload --host 0.0.0.0 --port 8000
  7. Start the dashboard (frontend)

    # In a new terminal
    cd dashboard
    npm install
    npm run dev
  8. Access the dashboard

    • Open your browser to http://localhost:3000
    • Log in with the admin credentials you created

βš™οΈ Configuration

Required Environment Variables

Create a .env file in the project root with the following:

# ============================================================
# Canny.io Configuration
# ============================================================
CANNY__API_KEY=your_canny_api_key_here
CANNY__SUBDOMAIN=your-company  # e.g., bugbridge for bugbridge.canny.io
CANNY__BOARD_ID=your_board_id
CANNY__ADMIN_USER_ID=your_admin_user_id  # For posting replies

# ============================================================
# Jira MCP Configuration
# ============================================================
JIRA__SERVER_URL=http://localhost:3100/mcp
JIRA__PROJECT_KEY=ECS  # Your Jira project key
JIRA__INSTANCE_URL=https://your-company.atlassian.net
JIRA__RESOLUTION_DONE_STATUSES=Done,Resolved,Closed

# ============================================================
# XAI Configuration (for Grok models)
# ============================================================
XAI__API_KEY=your_xai_api_key_here
XAI__MODEL=grok-beta  # or grok-2-1212
XAI__TEMPERATURE=0.0
XAI__MAX_OUTPUT_TOKENS=2048

# ============================================================
# Database Configuration
# ============================================================
DATABASE_URL=postgresql+asyncpg://user:password@localhost:5432/bugbridge

# ============================================================
# Email Configuration (for reports)
# ============================================================
EMAIL__SMTP_HOST=smtp.gmail.com
EMAIL__SMTP_PORT=587
EMAIL__SMTP_PASSWORD=your_app_password  # Use app password for Gmail
EMAIL__FROM_EMAIL=your-email@example.com
EMAIL__USE_TLS=true

# ============================================================
# Reporting Configuration
# ============================================================
REPORTING__EMAIL_ENABLED=true
REPORTING__RECIPIENTS=team@example.com,manager@example.com
REPORTING__SCHEDULE_CRON=0 9 * * *  # Daily at 9 AM

# ============================================================
# Priority Scoring Weights
# ============================================================
AGENT__PRIORITY_WEIGHT_VOTES=0.3
AGENT__PRIORITY_WEIGHT_SENTIMENT=0.4
AGENT__PRIORITY_WEIGHT_RECENCY=0.2
AGENT__PRIORITY_WEIGHT_ENGAGEMENT=0.1
AGENT__PRIORITY_THRESHOLD=70  # Create Jira tickets for items scoring >= 70

# ============================================================
# API Configuration
# ============================================================
ENVIRONMENT=local
DEBUG=true
LOG_LEVEL=INFO
JWT_SECRET_KEY=your-secret-key-minimum-32-chars
ACCESS_TOKEN_EXPIRE_MINUTES=1440  # 24 hours

MCP Jira Server Configuration

Edit mcp-atlassian/.env.jira:

JIRA_URL=https://your-company.atlassian.net
JIRA_USERNAME=your-email@example.com
JIRA_API_TOKEN=your_jira_api_token

🎯 How It Works

Workflow Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Canny.io       β”‚
β”‚  (Feedback)     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚             BUGBRIDGE AI PROCESSING PIPELINE             β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                          β”‚
β”‚  1. Collection Agent    β†’ Fetches new feedback           β”‚
β”‚  2. Bug Detection Agent β†’ Classifies bug vs feature      β”‚
β”‚  3. Sentiment Agent     β†’ Analyzes tone and urgency      β”‚
β”‚  4. Priority Agent      β†’ Calculates priority score      β”‚
β”‚  5. Jira Creation Agent β†’ Creates ticket (if score β‰₯ 70) β”‚
β”‚  6. Monitoring Agent    β†’ Tracks ticket status           β”‚
β”‚  7. Notification Agent  β†’ Notifies customer on resolutionβ”‚
β”‚  8. Reporting Agent     β†’ Generates daily reports        β”‚
β”‚                                                          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚     Jira        β”‚          β”‚   Dashboard     β”‚
β”‚   (Tickets)     β”‚          β”‚  (Analytics)    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Agent Details

1. Feedback Collection Agent

  • Polls Canny.io API for new posts
  • Deduplicates based on post ID
  • Triggers workflow for each new post
  • Scheduled execution (configurable interval)

2. Bug Detection Agent

  • Uses XAI LLM to classify feedback
  • Determines if it's a bug or feature request
  • Extracts severity level (critical, high, medium, low)
  • Provides confidence score and reasoning

3. Sentiment Analysis Agent

  • Analyzes emotional tone and urgency
  • Categories: positive, neutral, negative, frustrated
  • Identifies urgent language and customer pain points
  • Provides sentiment reasoning

4. Priority Scoring Agent

  • Calculates priority score (0-100) using weighted factors:
    • Vote count and engagement (30%)
    • Sentiment and urgency (40%)
    • Recency (20%)
    • Activity trends (10%)
  • Provides detailed scoring breakdown
  • Recommends Jira priority level

5. Jira Creation Agent

  • Creates Jira tickets for high-priority items (score β‰₯ 70)
  • Includes full context, analysis, and Canny.io link
  • Determines assignee based on configuration
  • Sets appropriate priority and labels
  • Links back to original Canny.io post

6. Monitoring Agent

  • Polls Jira tickets for status changes
  • Detects resolution (Done, Resolved, Closed)
  • Tracks status history
  • Triggers customer notification on resolution

7. Notification Agent

  • Generates personalized customer replies using AI
  • Posts comments to Canny.io when issues are resolved
  • Includes link to Jira ticket for transparency
  • Prevents duplicate notifications

8. Reporting Agent

  • Generates comprehensive daily reports
  • Includes metrics, trends, and insights
  • Uses AI to generate executive summaries
  • Delivers via email (HTML formatted) and file storage
  • Sends to logged-in user + configured recipients

πŸ“Š Dashboard Features

Overview Tab

  • Real-time metrics cards (new issues, bugs, resolved tickets)
  • Bugs vs. features pie chart
  • Sentiment distribution bar chart
  • Jira ticket status tracking
  • Priority score distribution
  • Burning issues list

Feedback Tab

  • Complete feedback post listing with filtering
  • Search by title, tags, status
  • Priority score and sentiment display
  • Direct links to Canny.io posts
  • Manual processing trigger for individual posts
  • Refresh from Canny button

Jira Tickets Tab

  • Jira ticket listing with status tracking
  • Filtering by status, priority, date
  • Direct links to Jira tickets and Canny posts
  • Assignee and resolution tracking
  • Refresh button to sync latest status from Jira

Metrics Tab

  • Comprehensive analytics dashboard
  • Time series charts for trends
  • Sentiment analysis over time
  • Performance metrics (response time, resolution time)
  • Export capabilities

Reports Tab

  • Generated reports library
  • Visual metrics overview with charts
  • Filtered report viewing
  • Export to PDF/CSV
  • Generate new reports on-demand
  • Email delivery to logged-in user

Settings Tab (Admin Only)

  • Canny.io configuration
  • Jira MCP server settings
  • XAI API configuration
  • Priority scoring weights
  • Reporting schedule and recipients

πŸ” Authentication & Security

  • JWT-based authentication: Secure token-based auth
  • Role-based access control: Admin and viewer roles
  • Session persistence: Stay logged in across page refreshes
  • Secure password hashing: bcrypt with proper truncation
  • Protected API endpoints: Bearer token authentication
  • Secret management: Environment variables for sensitive data

πŸ“ˆ Key Metrics & Analytics

BugBridge tracks and reports on:

  • Volume Metrics: New issues, bugs, feature requests
  • Sentiment Metrics: Distribution across positive, neutral, negative, frustrated
  • Performance Metrics:
    • Average response time (feedback β†’ ticket creation)
    • Average resolution time (ticket creation β†’ resolution)
    • Resolution rate percentage
  • Priority Metrics: High-priority item tracking
  • Jira Metrics: Tickets created, resolved, by status
  • Trend Analysis: Daily, weekly, monthly trends

πŸ§ͺ Testing

BugBridge includes a comprehensive test suite demonstrating reliability and functionality across all components.

Test Coverage

Backend Tests (Python/Pytest):

  • βœ… 17 test files with 150+ test cases
  • βœ… 75%+ code coverage
  • βœ… Unit tests for all 8 AI agents
  • βœ… Integration tests for complete workflows
  • βœ… Reliability tests for deterministic behavior
  • βœ… Tests for all external integrations (Canny.io, Jira MCP, XAI)

Frontend Tests (Jest + React Testing Library):

  • βœ… 7 test files with 30+ test cases
  • βœ… Component tests (Loading, Error handling, Auth)
  • βœ… Custom hook tests (useAuth, useSessionRestore)
  • βœ… API client tests with interceptors
  • βœ… Service layer tests

End-to-End Tests (Playwright):

  • βœ… 3 test suites with 15+ scenarios
  • βœ… Authentication flow tests
  • βœ… Dashboard navigation tests
  • βœ… Responsive design verification

Test Categories

1. AI Agent Tests (6 files)

  • Bug Detection Agent - Classification accuracy
  • Sentiment Analysis Agent - Multi-class sentiment detection
  • Priority Scoring Agent - Weighted scoring algorithm
  • Collection Agent - Canny.io integration
  • Reporting Agent - Report generation
  • Base Agent - Shared functionality

2. Integration Tests (4 files)

  • Complete analysis pipeline (Collection β†’ Detection β†’ Sentiment β†’ Priority)
  • Jira creation workflow with MCP integration
  • XAI LLM integration with structured outputs
  • Real MCP server integration tests

3. Component Tests (7 files)

  • MCP Jira client (connections, error handling, parsing)
  • Canny.io API client (CRUD operations)
  • Data models validation (Pydantic schemas)
  • Configuration loading and management
  • Deterministic behavior verification

Running Tests

Backend Unit Tests:

# Activate virtual environment
source venv/bin/activate

# Run all tests with verbose output
pytest tests/ -v

# Run with coverage report
pytest tests/ --cov=bugbridge --cov-report=html

# Run specific test file
pytest tests/test_bug_detection_agent.py -v

Frontend Unit Tests:

cd dashboard

# Run all tests
npm test

# Run with coverage
npm run test:coverage

# Run in watch mode
npm run test:watch

End-to-End Tests:

cd dashboard

# Run E2E tests
npm run test:e2e

# Run with UI (interactive mode)
npm run test:e2e:ui

# Run in headed mode (visible browser)
npm run test:e2e:headed

Test Results

Backend Test Results:

Backend Tests Passing All 150+ backend tests passing with 75%+ code coverage

Frontend Test Results:

Frontend Tests Passing All 30+ frontend tests passing with full coverage of critical components

End-to-End Test Results:

E2E Tests Passing All 15+ E2E scenarios passing across authentication, navigation, and responsive design

Test Results Summary

Test Suite Files Tests Coverage Status
Backend Unit Tests 17 150+ 75%+ βœ… Passing
Frontend Unit Tests 7 30+ 65%+ βœ… Passing
E2E Tests 3 15+ N/A βœ… Passing
Total 27 195+ 70%+ βœ… All Passing

Key Test Features

Reliability Demonstrated:

  • βœ… Deterministic AI behavior with temperature=0.0
  • βœ… Error handling and graceful degradation
  • βœ… API integration resilience
  • βœ… Database transaction integrity
  • βœ… Authentication and authorization
  • βœ… Session management
  • βœ… Concurrent request handling

Test Documentation:


πŸ“ API Endpoints

Authentication

  • POST /api/auth/login - User login
  • POST /api/auth/logout - User logout
  • GET /api/auth/me - Get current user

Feedback

  • GET /api/feedback - List feedback posts (with filtering, search, pagination)
  • GET /api/feedback/{id} - Get feedback post details
  • POST /api/feedback/refresh - Manually refresh from Canny.io
  • POST /api/feedback/{id}/process - Process single feedback post

Jira Tickets

  • GET /api/jira-tickets - List Jira tickets (with filtering, pagination)
  • GET /api/jira-tickets/{id} - Get ticket details
  • POST /api/jira-tickets/refresh - Refresh all tickets from Jira

Metrics

  • GET /api/metrics - Get aggregated metrics (with date range filtering)

Reports

  • GET /api/reports - List generated reports
  • GET /api/reports/{id} - Get report details
  • POST /api/reports/generate - Generate new report
  • POST /api/reports/generate/workflow - Generate via workflow

Configuration

  • GET /api/config - Get current configuration
  • PUT /api/config - Update configuration (admin only)

🎨 UI Screenshots & Features

Authentication

Login Page Secure login interface with role-based access control

Dashboard Overview

Dashboard Main View Main dashboard with real-time metrics and analytics

Dashboard Metrics Interactive charts showing feedback trends and key performance indicators

Features:

  • Real-time metrics with auto-refresh
  • Interactive charts and visualizations
  • Quick access to burning issues

Feedback Management

Feedback List Comprehensive feedback posts listing with filtering and search

Feedback Details Detailed feedback view with AI analysis results

Feedback Processing Feedback processing interface with priority scores and sentiment indicators

Features:

  • Searchable, filterable feedback list
  • Priority scores and sentiment indicators
  • One-click processing
  • Direct Canny.io integration

Jira Tickets

Jira Tickets View Jira ticket tracking and management interface

Jira Ticket Details Detailed Jira ticket view with status tracking and links

Features:

  • Automatic ticket creation for high-priority items
  • Real-time status tracking
  • Bidirectional linking (Jira ↔ Canny)
  • Automatic customer notifications

Reports

Reports List Report generation and listing interface

Report View Detailed report view with metrics and visualizations

Report Metrics Visual metrics overview with charts and insights

Features:

  • Visual metrics overview with charts
  • AI-generated summaries and insights
  • HTML email delivery
  • Export capabilities

Configuration

Settings Page 1 Configuration interface for managing platform settings

Settings Page 2 Advanced settings and integration configuration


πŸ”§ Advanced Features

Automated Workflows

  • Scheduled Collection: Automatically collect feedback from Canny.io at configured intervals
  • Real-time Processing: Process new feedback through AI pipeline immediately
  • Daily Reports: Automatically generate and email reports
  • Status Monitoring: Continuous monitoring of Jira ticket status

Customization

  • Configurable Thresholds: Set custom priority threshold for ticket creation
  • Custom Weights: Adjust priority scoring weights based on your needs
  • Flexible Filtering: Filter reports and analytics by date, sentiment, status, etc.
  • Email Templates: Customize notification and report email formats

Data Persistence

  • Workflow State: Complete workflow state saved to database
  • Analysis Results: All AI analysis results stored for audit trail
  • Report Archive: Historical reports saved for long-term analysis
  • Status History: Track all Jira status changes over time

πŸ“– Documentation

Core Documentation

Integration Guides

Strategy Documents


🎯 Current Status

βœ… Fully Implemented Features

Core AI Agents (8/8)

  • βœ… Feedback Collection Agent
  • βœ… Bug Detection Agent
  • βœ… Sentiment Analysis Agent
  • βœ… Priority Scoring Agent
  • βœ… Jira Creation Agent
  • βœ… Monitoring Agent
  • βœ… Notification Agent
  • βœ… Reporting Agent

Integrations (3/3)

  • βœ… Canny.io API integration (complete CRUD)
  • βœ… Jira MCP integration (via mcp-atlassian server)
  • βœ… XAI API integration (Grok models)

Dashboard (7/7 tabs)

  • βœ… Overview/Dashboard tab with real-time metrics
  • βœ… Feedback tab with search, filter, and processing
  • βœ… Jira Tickets tab with status tracking
  • βœ… Metrics/Analytics tab with charts
  • βœ… Reports tab with visual metrics and email delivery
  • βœ… Settings tab (admin only)
  • βœ… Authentication (login/logout)

Backend API (6/6 modules)

  • βœ… Authentication & authorization (JWT, role-based)
  • βœ… Feedback management API
  • βœ… Jira tickets API
  • βœ… Metrics API
  • βœ… Reports API
  • βœ… Configuration API

Automation (4/4)

  • βœ… Scheduled feedback collection
  • βœ… Automatic workflow execution
  • βœ… Jira status monitoring
  • βœ… Daily report generation

Additional Features

  • βœ… Session persistence across page refreshes
  • βœ… HTML email formatting for reports
  • βœ… Visual metrics charts in reports
  • βœ… Automatic customer notifications on resolution
  • βœ… Bidirectional Canny ↔ Jira linking
  • βœ… Manual refresh and process triggers
  • βœ… Comprehensive error handling and logging

🚧 Planned Features

  • ⏳ Webhook support for real-time Canny updates
  • ⏳ Slack integration for notifications
  • ⏳ Custom report templates
  • ⏳ Advanced analytics (ML-based trend detection)
  • ⏳ Multi-board support
  • ⏳ User feedback on AI classifications

πŸ› οΈ Development

Running in Development Mode

# Backend (with auto-reload)
source venv/bin/activate
uvicorn bugbridge.api.main:get_app --factory --reload --port 8000

# Frontend (with hot reload)
cd dashboard && npm run dev

# MCP Server
cd mcp-atlassian
python -m mcp_atlassian --transport streamable-http --port 3100 --path /mcp -vv

Database Management

# Initialize database schema
python scripts/init_database.py

# Create admin user
python scripts/create_admin_user.py

# Process existing feedback posts
python scripts/process_existing_posts.py

CLI Commands

# Generate a report
python -m bugbridge.cli.report generate

# Generate report with filters
python -m bugbridge.cli.report generate --start-date 2025-01-01 --bug-only

# List available commands
python -m bugbridge.cli --help

πŸ› Troubleshooting

Backend Issues

Issue: Database connection errors

# Check PostgreSQL is running
psql -U postgres -c "SELECT 1"

# Initialize database schema
python scripts/init_database.py

Issue: MCP server not reachable

# Verify MCP server is running on port 3100
curl http://localhost:3100/mcp

# Check MCP server logs
cd mcp-atlassian && python -m mcp_atlassian --transport streamable-http --port 3100 --path /mcp -vv

Issue: Settings not loading

# Clear settings cache by restarting backend
pkill -f "uvicorn bugbridge.api.main"
uvicorn bugbridge.api.main:get_app --factory --reload --port 8000

Frontend Issues

Issue: Session not persisting

  • Ensure JWT_SECRET_KEY is set in .env
  • Check browser localStorage for 'auth-storage'
  • Clear browser cache and try again

Issue: API connection errors

  • Verify backend is running on port 8000
  • Check NEXT_PUBLIC_API_URL in dashboard/.env.local

Email Issues

Issue: Reports not being emailed

  • Verify EMAIL__SMTP_HOST is set
  • For Gmail, use App Password (not regular password)
  • Check SMTP credentials are correct
  • Verify admin user has valid email address

πŸ“Š Performance

  • Processing Speed: ~5-10 seconds per feedback item (including all AI analysis)
  • Scalability: Handles 100+ feedback items per batch
  • Response Time: < 0.1 hours average from feedback β†’ ticket creation
  • Resolution Tracking: Real-time status updates from Jira

πŸ”’ Security & Privacy

  • API Keys: Stored securely in environment variables
  • Password Hashing: bcrypt with proper truncation
  • JWT Tokens: Secure token-based authentication
  • Role-based Access: Admin and viewer roles
  • Input Validation: Pydantic validation on all inputs
  • SQL Injection Protection: SQLAlchemy ORM prevents SQL injection
  • CORS: Configured for dashboard origin only

πŸ“¦ Deployment

Production Considerations

  1. Environment Configuration

    • Set ENVIRONMENT=production
    • Use strong JWT_SECRET_KEY
    • Configure production database URL
  2. Database

    • Use managed PostgreSQL (AWS RDS, Google Cloud SQL, etc.)
    • Enable SSL connections
    • Set up regular backups
  3. Backend Deployment

    • Deploy with Gunicorn/Uvicorn behind Nginx
    • Set up HTTPS with SSL certificates
    • Configure proper CORS origins
  4. Frontend Deployment

    • Build optimized production bundle: npm run build
    • Deploy to Vercel, Netlify, or AWS
    • Set environment variables for API URL
  5. MCP Server

    • Deploy as separate service
    • Use production Jira credentials
    • Enable proper logging and monitoring

🀝 Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new features
  5. Submit a pull request

πŸ“„ License

[To be determined]


πŸ™ Acknowledgments

Built with:


πŸ“ž Support & Contact


Last Updated: December 2025

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published