A comprehensive system for logging, analyzing, and visualizing AI conversations with intelligent code change tracking and project management capabilities.
- AI-Powered Conversation Analysis: Uses OpenAI GPT-4 to analyze conversations and extract meaningful insights
- Code Change Tracking: Automatically detects and categorizes code modifications, additions, and deletions
- Smart Tag Classification: Intelligent tagging system that categorizes conversations based on content and code changes
- Project Management Dashboard: Beautiful web interface for browsing and managing conversation summaries
- Side-by-Side Code Comparison: Visual before/after code comparison with clean, modern UI
- MCP Server Integration: Custom MCP (Model Context Protocol) server for seamless Claude Desktop integration
- Real-time Analysis: Automatic conversation processing with AI-powered insights
- Flexible Data Storage: JSON-based storage with easy export capabilities
- Responsive Design: Modern, mobile-friendly web interface
- Intelligent Categorization: Automatic project type detection and impact assessment
Claude Desktop
β User completes Q&A session
MCP Server (custom-built)
β Receives conversation data and uses AI to structure the data
Local JSON Storage
β Stores summarized data with code analysis
Flask Web Dashboard
β Retrieves and displays data
User browses project summaries with intelligent insights
- Python Flask: Web framework for the dashboard
- OpenAI GPT-4: AI analysis and conversation processing
- MCP Server: Custom server for Claude Desktop integration
- Pydantic: Data validation and serialization
- HTML/CSS/JavaScript: Modern web interface
- Tailwind CSS: Utility-first CSS framework
- Lucide Icons: Beautiful icon system
- Responsive Design: Mobile-first approach
- JSON Storage: Lightweight, portable data format
- Regex Pattern Matching: Code analysis and extraction
- AI-Powered Tagging: Intelligent content categorization
- Python 3.8+
- OpenAI API key
- Claude Desktop (for MCP integration)
-
Clone the repository
git clone <repository-url> cd Htn_proj
-
Install dependencies
cd demo pip install -r requirements.txt -
Configure environment variables
cd ../MCP_Chat_Logger echo "OPENAI_API_KEY=your_openai_api_key_here" > .env echo "OPENAI_MODEL=gpt-4" >> .env echo "OPENAI_TEMPERATURE=0.1" >> .env echo "OPENAI_MAX_TOKENS=2000" >> .env
-
Start the MCP server
python simple_chat_logger.py
-
Start the web dashboard
cd ../demo python app.py -
Access the dashboard Open your browser and navigate to
http://localhost:5002
- Via MCP Server: Use the
save_chat_historyfunction in Claude Desktop - Direct API: Send POST requests to the MCP server with conversation data
- Automatic Analysis: The system will automatically analyze and categorize your conversations
- Project Overview: View all logged conversations with smart categorization
- Code Analysis: See detailed before/after code comparisons
- Smart Tags: Browse conversations by automatically generated tags
- Search & Filter: Find specific conversations quickly
- Export Options: Export data in various formats
The system automatically detects and categorizes:
- Function modifications: Changes to existing functions
- New code additions: New functions, classes, or modules
- Code removals: Deleted or refactored code
- Technology patterns: API changes, database modifications, UI updates
- File references: Automatic detection of modified files
- Modification Types:
modified,added,removed,deleted - Code Types:
function,class,import - Technology Areas:
api,database,ui - Specific Identifiers: Function names (e.g.,
`analyze_conversation_with_openai`) - File References: Detected file names (e.g.,
`app.py`)
- Feature Development: New features and enhancements
- Bug Fixes: Error corrections and stability improvements
- Code Refactoring: Code structure improvements
- API Changes: Backend and integration modifications
- UI Updates: Frontend and user interface changes
- Project List: Overview of all logged conversations
- Detail View: Comprehensive analysis of individual conversations
- Code Comparison: Side-by-side before/after code display
- Tag Browser: Filter and search by intelligent tags
- Impact Assessment: AI-generated impact descriptions
- Modern UI: Clean, professional interface
- Responsive Layout: Works on desktop and mobile
- Color-Coded Tags: Easy visual categorization
- Code Highlighting: Syntax-highlighted code blocks
- Intuitive Navigation: Easy-to-use project browser
OPENAI_API_KEY=your_api_key_here
OPENAI_MODEL=gpt-4
OPENAI_TEMPERATURE=0.1
OPENAI_MAX_TOKENS=2000- Modify
demo/static/js/config.jsfor UI settings - Update
demo/app.pyfor backend configuration - Customize tag generation in
dataManager.js
Htn_proj/
βββ demo/ # Web dashboard
β βββ app.py # Flask application
β βββ requirements.txt # Python dependencies
β βββ static/ # Frontend assets
β β βββ css/ # Stylesheets
β β βββ js/ # JavaScript modules
β βββ templates/ # HTML templates
βββ MCP_Chat_Logger/ # MCP server
β βββ simple_chat_logger.py # Main MCP server
β βββ chat_logger.py # Alternative implementation
β βββ chat_logs/ # Generated conversation logs
βββ README.md # This file
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI for providing the GPT-4 API
- Claude Desktop for MCP integration
- The open-source community for various libraries and tools
For questions, issues, or contributions, please open an issue on the repository or contact the development team.
Built with β€οΈ for HackTheNorth 2025