Open-source project

chatIntelligence

A glowing self-hosted application to chart-a-chat and get insight

Python
Dockerfile
#analytics
#chat
#plots
#self-hosted

Created 30 Apr 2026 ยท Updated 25 May 2026

๐Ÿ’ฌ Chat Intelligence

A sophisticated, self-hosted analytics platform that transforms chat exports into comprehensive behavioral, temporal, and content-based insights. Built with a modular strategy pattern architecture for extensible analysis capabilities.

img.png

๐ŸŽฏ Overview

Chat Intelligence is an open-source solution that works with any structured chat JSON export, providing deep analytics without platform dependencies. Whether you're analyzing group dynamics, communication patterns, or content trends, this platform delivers actionable insights through interactive visualizations.

โœจ Key Features

๐Ÿ“Š Behavioral Analysis

  • Dominance Index: Measure participant influence and control in conversations
  • Engagement Metrics: Visualize participation patterns through pie charts
  • Response Time Analysis: Track communication latency and responsiveness

โฑ๏ธ Temporal Pattern Recognition

  • Weekly/Monthly Trends: Identify recurring communication cycles
  • Moving Averages: Smooth out noise to reveal underlying patterns
  • Periodicity Heatmaps: Discover optimal communication times and patterns
  • Filterable Timeline: Interactive exploration of message flow over time

๐Ÿ” Content Intelligence

  • Word Frequency Analysis: Identify trending topics and vocabulary patterns
  • Content Classification: Automatic categorization of message themes
  • Anomaly Detection: Spot unusual spikes or patterns in communication

๐Ÿ“ˆ Advanced Analytics

  • Peak Detection: Automatically identify significant conversation peaks
  • Time Series Analysis: Comprehensive temporal data exploration
  • Interactive Visualizations: Dynamic charts with filtering and zoom capabilities

๐Ÿ—๏ธ Architecture

The platform follows a clean, modular architecture designed for scalability and maintainability:

Frontend Layer

  • Streamlit Dashboard: Single-page application with intuitive UI
  • Real-time Updates: Dynamic chart rendering based on user interactions
  • Responsive Design: Optimized for various screen sizes

Analytics Engine

  • Strategy Pattern: Modular chart strategies for easy extension
  • Lazy Loading: Efficient data processing with on-demand computation
  • Caching Layer: Optimized performance through intelligent caching

Data Pipeline

  • Universal Parser: Platform-agnostic chat data ingestion
  • Structured Processing: Clean data transformation and normalization
  • Error Handling: Robust parsing with comprehensive error reporting

๐Ÿš€ Quick Start

Local Development

  1. Install uv (Python package manager)

    curl -Ls https://astral.sh/uv/install.sh | sh
  2. Clone and setup the project

    git clone <repository-url>
    cd chatIntelligence
    uv sync
  3. Launch the application

    uv run streamlit run src/app.py

Docker Deployment

Option 1: Pull from GitHub Container Registry

# Pull the latest pre-built image
docker pull ghcr.io/netphantom/chatintelligence:latest

# Run the application
docker run -p 8501:8501 ghcr.io/netphantom/chatintelligence:latest

Option 2: Build locally

# Build the container
docker build -t chat-intelligence .

# Run the application
docker run -p 8501:8501 chat-intelligence

๐Ÿ“‚ Project Structure

chatIntelligence/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ app.py                    # Main application entry point
โ”‚   โ”œโ”€โ”€ controller/
โ”‚   โ”‚   โ”œโ”€โ”€ TelegramParser.py     # Chat data parsing logic
โ”‚   โ”‚   โ””โ”€โ”€ __init__.py
โ”‚   โ””โ”€โ”€ view/
โ”‚       โ”œโ”€โ”€ DashboardApp.py       # Streamlit dashboard implementation
โ”‚       โ”œโ”€โ”€ charts/
โ”‚       โ”‚   โ”œโ”€โ”€ ChartStrategy.py          # Base strategy interface
โ”‚       โ”‚   โ”œโ”€โ”€ DominanceIndexStrategy.py # Dominance analysis
โ”‚       โ”‚   โ”œโ”€โ”€ EngagementPieStrategy.py  # Engagement visualization
โ”‚       โ”‚   โ”œโ”€โ”€ FilterableTimelineStrategy.py # Interactive timeline
โ”‚       โ”‚   โ”œโ”€โ”€ MovingAverageStrategy.py  # Trend analysis
โ”‚       โ”‚   โ”œโ”€โ”€ PeakAnomalyStrategy.py    # Anomaly detection
โ”‚       โ”‚   โ”œโ”€โ”€ PeriodicityHeatmapStrategy.py # Time pattern analysis
โ”‚       โ”‚   โ”œโ”€โ”€ ResponseTimeStrategy.py   # Response time metrics
โ”‚       โ”‚   โ”œโ”€โ”€ TimeSeriesPlotStrategy.py # Basic time series
โ”‚       โ”‚   โ”œโ”€โ”€ WordFrequencyStrategy.py # Content analysis
โ”‚       โ”‚   โ””โ”€โ”€ __init__.py
โ”‚       โ””โ”€โ”€ __init__.py
โ”œโ”€โ”€ pyproject.toml               # Project configuration and dependencies
โ”œโ”€โ”€ Dockerfile                   # Container build configuration
โ”œโ”€โ”€ .github/
โ”‚   โ””โ”€โ”€ workflows/
โ”‚       โ””โ”€โ”€ deploy.yml           # CI/CD pipeline
โ”œโ”€โ”€ README.md                    # This documentation
โ””โ”€โ”€ LICENSE                      # MIT License

โš™๏ธ Configuration

Environment Variables

No environment variables required for basic operation.

Optional Configuration

  • Logging Level: Control verbosity of application logs
  • Cache Settings: Tune performance parameters (future feature)
  • Chart Defaults: Customize visualization preferences

๐Ÿง  Design Principles

  • Strategy Pattern: Extensible analytics modules for easy feature addition
  • Separation of Concerns: Clear distinction between UI, logic, and data layers
  • Stateless Execution: Efficient resource usage with minimal memory footprint
  • Lazy Evaluation: Compute analytics only when needed
  • Modular Architecture: Independent components for maintainability

๐Ÿ”ง Technical Stack

  • Frontend: Streamlit for rapid web application development
  • Backend: Python 3.13+ with modern async capabilities
  • Data Processing: Pandas for efficient data manipulation
  • Visualization: Plotly for interactive, publication-quality charts
  • Package Management: uv for fast, reliable dependency management

๐Ÿš€ Roadmap

Near Future

  • AI-powered conversation summaries
  • PDF report generation
  • Real-time streaming analysis
  • Multi-chat comparison dashboard

Long-term Vision

  • Advanced sentiment analysis
  • Custom chart strategy builder
  • Integration with popular chat platforms
  • Team collaboration features

๐Ÿค Contributing

We welcome contributions! Please see our contributing guidelines for details on:

  • Code style and standards
  • Testing requirements
  • Pull request process
  • Issue reporting

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.