Commit Graph

1576 Commits

Author SHA1 Message Date
daniel 350b11d74a Add SVG illustration and TypeScript configuration file
- Added a new SVG file `undraw_docusaurus_tree.svg` to the static images directory for enhanced visual representation.
- Introduced a new TypeScript configuration file `tsconfig.json` to improve editor experience and project structure.
2025-07-25 20:50:46 -05:00
Daniel Avila d3779f0928 Update README.md 2025-07-22 19:56:41 -04:00
Daniel Avila 4f3a010b42 Update README.md 2025-07-22 19:55:58 -04:00
Dani e2f79bcd39 chore: bump version to 1.11.0 for Console Bridge release
🚀 Released version 1.11.0 to npm with Claude Code Console Bridge integration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-22 19:37:51 -04:00
Daniel Avila 4fa14a6a44 feat: Implement Claude Code Console Bridge and Enhanced State Detection (#14)
* feat: Enhance DataService with paginated conversations and improved error handling

- Added `getConversationsPaginated` method to fetch conversations with pagination support.
- Improved error handling in `cachedFetch` to provide clearer messages and fallback behavior.
- Updated WebSocket integration to handle connection failures with fallback polling.
- Reduced WebSocket auto-reconnect attempts and disabled auto-reconnect to minimize console noise.
- Added CORS middleware to the web server for better API accessibility.
- Implemented paginated conversations endpoint in the server.
- Added conversation messages endpoint to retrieve messages for a specific conversation.
- Enhanced conversation analysis to include detailed session data and compatibility with original dashboard.

* feat: Implement real-time conversation change handling and notifications

- Added handleConversationChange method to ClaudeAnalytics for processing updates to conversation files.
- Integrated WebSocket notifications for new messages in conversations.
- Enhanced setupFileWatchers to include conversation change callbacks.
- Updated conversation state API to calculate states for all conversations, improving performance and accuracy.
- Introduced pagination for conversation messages endpoint to support large message sets.
- Implemented cache management endpoint for clearing specific cache types.
- Enhanced DataCache and ConversationAnalyzer to support tool correlation in message parsing.
- Created ToolDisplay component for safe rendering of tool uses and results in the analytics dashboard.
- Added comprehensive documentation for Claude data structures and formats.

* feat: Enhance real-time messaging and dashboard features

- Improved logging for new messages in DataService to include message data.
- Increased WebSocket reconnection attempts for better reliability.
- Enabled auto-reconnect in WebSocketService for real-time updates.
- Updated conversation change handling in ClaudeAnalytics to include file path.
- Enhanced error handling and logging in ConversationAnalyzer and DataCache.
- Added new settings file for local permissions.
- Introduced a new Chats Dashboard option in the main menu.
- Created detailed architecture documentation for the analytics web application.
- Deprecated old main.js and Dashboard.js files in favor of a modular structure.

* feat: Implement real-time message handling and improve logging in DataService and AgentsPage

* feat: Implement comprehensive conversation state detection improvements

- Enhanced frontend message analysis for tool execution and content analysis.
- Introduced file activity detection to accurately identify user typing.
- Adopted a WebSocket-first approach for real-time state updates.
- Expanded state vocabulary with new contextual states and visual indicators.
- Improved state banner display with new CSS classes.
- Integrated system components for cohesive state management.
- Added health check feature to validate system requirements and configurations.
- Developed ConsoleBridge for web-based interaction with Claude Code processes.
- Created test script for ConsoleBridge to facilitate integration testing.
2025-07-22 19:31:11 -04:00
Daniel Avila 911963bf92 Update README.md (#11) 2025-07-19 08:46:30 -04:00
Dani 1e1b0f3117 feat: Add website URL to CLI output and README
- Display template browser website in CLI completion message
- Add prominent link in README.md for template exploration
- Help users discover all available templates online
- Improve discoverability of the template showcase website

CLI now shows: 'View all available templates at: https://davila7.github.io/claude-code-templates/'
README includes: 'Browse Templates Online' section with website link

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-19 08:42:22 -04:00
Dani db131a25b1 style: Update template card buttons to neutral dark theme
- Change View Files and Copy Command buttons to neutral dark colors
- Use bg-tertiary background with text-secondary color
- Reduce padding from 8px 16px to 6px 12px for smaller buttons
- Reduce font-size from 0.8rem to 0.75rem for thinner appearance
- Reduce min-width from 100px to 80px
- Add subtle hover effects with transform and color transitions
- Remove bright colors in favor of consistent dark theme

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-19 08:28:32 -04:00
Dani 618b368de7 fix: Align command-line sections at same height across all step cards
- Add flexbox layout to step cards with min-height
- Make step content flexible with flex: 1 on description text
- Position command-line and highlight sections at bottom with margin-top: auto
- Ensures consistent visual alignment across all 3 installation steps

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-19 08:26:55 -04:00
Dani 7909cf4a79 fix: Add cache-busting parameter to fetch latest templates.js
- Add timestamp parameter to force fresh fetch from GitHub
- Remove debug console logging
- This ensures settings.json appears in Installation Files modal

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-19 08:20:30 -04:00
Dani dfd0c63ddc debug: Add console logging to debug missing settings.json in modal 2025-07-19 08:17:27 -04:00
Dani b1b75de0a5 feat: Enhance template website with contribution workflow and improved file modal
- Convert first template card to green 'Add New Template' card with direct modal access
- Remove redundant 'Add New Template' button from intro section
- Add comprehensive contribution modal with step-by-step workflow
- Make Installation Files modal files clickable links to GitHub
- Update button text to 'View all files on GitHub'
- Add file link hover effects and proper styling
- Include complete Claude Code prompt for template generation
- Add responsive design for contribution modal components

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-19 08:15:11 -04:00
Dani b4fa7023bc feat: Add settings.json to all template configurations
- Add settings.json file to JavaScript/TypeScript templates
- Add settings.json file to Python templates
- Add settings.json file to Ruby templates
- Add settings.json file to Common templates
- Settings.json contains Claude Code permissions, environment variables, and hooks

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-19 08:15:00 -04:00
Dani 07990f5c63 feat: Add counter.dev script for enhanced analytics tracking 2025-07-18 21:13:41 -04:00
Dani 2e5c23eabc feat: Add statistics section with NPM downloads, GitHub stars, and repository insights 2025-07-18 21:08:40 -04:00
Dani 8cc2515881 feat: Revamp documentation layout and enhance installation steps with modal support 2025-07-18 21:01:47 -04:00
Dani 041e7f42b6 feat: Enhance terminal theme and layout for improved user experience 2025-07-18 20:23:01 -04:00
Dani 9ddc84dc22 feat: Add static website for template showcase with GitHub Pages support
- Created responsive web interface for browsing available templates
- Dynamic template loading from GitHub repository's templates.js file
- Interactive card design with flip animation to show installation commands
- Integration with Devicon CDN for professional framework logos
- Copy-to-clipboard functionality with visual feedback
- Mobile-responsive design with modern UI/UX
- GitHub Pages configuration for automatic deployment
- Auto-refresh every 5 minutes to stay synchronized with repository

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-18 20:08:28 -04:00
Dani 0d5b691852 fix: Improve file overwrite protection with proper backup and merge options
- Fixed options parameter not being passed to copyTemplateFiles()
- Enhanced existing backup system with timestamped backups
- Added user choice prompts: Backup, Merge, or Cancel options
- Fixed --yes flag to properly trigger backup mode
- Improved merge mode to preserve existing configurations
- Added proper cancellation handling for user safety

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-18 19:43:07 -04:00
Dani af83b061b8 v1.10.1 - Add Ruby on Rails 8 support
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-18 18:58:53 -04:00
Jeremy Watt 388afba5f9 feat: Add Ruby on Rails 8 support to claude-code-templates (#8)
* ruby cli-tool template and rails 8 example added

* feat: Add Ruby on Rails 8 support to claude-code-templates

## Summary
- Added Ruby language configuration to templates.js with Rails 8 framework support
- Enhanced project detection in utils.js for Ruby/Rails projects via Gemfile and .rb files
- Added Ruby-specific hook descriptions to hook-scanner.js for RuboCop, Brakeman, and RSpec
- Updated Makefile with Ruby test targets

## Testing Completed (per CONTRIBUTING.md)
✅ Interactive setup works correctly - Ruby appears as language option
✅ Framework detection is accurate - Detects Rails via Gemfile and config/application.rb
✅ Command installation succeeds - Rails commands properly installed
✅ Hook configuration is valid - 9 Ruby hooks load without errors
✅ MCP servers are properly configured - Ruby SDK server configured
✅ Dry run mode shows expected output - Displays all Ruby template files
✅ Command analysis displays accurate statistics - Shows Rails command stats

All tests from the Testing Checklist have been manually verified and pass successfully.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-07-18 12:16:22 -04:00
Dani 11049e40d7 fix: Restore prepublishOnly script after Health Check release
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-18 10:44:13 -04:00
Dani dfa5250191 v1.10.0 - Comprehensive Health Check Feature
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-18 10:29:34 -04:00
Dani d45a3de92d feat: Add comprehensive Health Check feature with enhanced UX
- Add Health Check as second menu option in CLI
- Comprehensive system validation:
  * System requirements (OS, Node.js, memory, network)
  * Claude Code setup (installation, auth, permissions)
  * Project configuration (structure, settings files)
  * Custom commands and hooks validation
  * Settings.json analysis (user/project/local)
- Interactive UX with ora spinners and immediate results
- 3-second pacing between categories for better visual flow
- Detailed health score with actionable recommendations
- Settings validation with security checks and best practices
- Enhanced navigation flow returning to main menu
- Fix Project Setup flow from both health check and direct menu selection
- Update README documentation with Health Check feature
- Add CLI aliases: --health-check, --health, --check, --verify

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-18 10:28:56 -04:00
Dani 2204af29da fix: Restore prepublishOnly script for future releases
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-16 19:49:23 -04:00
Dani bd25ef6708 v1.9.0 - Tool Usage Trends Analytics Dashboard
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
v1.9.0
2025-07-16 19:45:50 -04:00
Dani 6806e9bc30 feat: Add comprehensive Tool Usage Trends analytics with improved dashboard
- Add Tool Usage Trends bar chart with date filtering and improved tooltips
- Implement Tool Activity Summary panel with key metrics:
  * Total tool calls, unique tools used, conversation coverage
  * Average tools per conversation and tool balance score
  * Most used tool highlight with usage statistics
- Fix tooltip reliability issues with enhanced Chart.js configuration
- Add proper date range filtering for tool usage data
- Implement Shannon Diversity Index for accurate tool balance scoring
- Update dashboard layout to 2x2 grid for better chart organization
- Add comprehensive tool usage caching for improved performance
- Enhance ConversationAnalyzer with extractToolUsage() method
- Support both string-based and structured tool_use block detection

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-16 19:44:55 -04:00
Dani cda0b8abed v1.8.3 - Add elegant light/dark theme toggle to analytics dashboard
- Implement comprehensive CSS variables theming system
- Add minimalist toggle switch with smooth animations
- Support both light and dark modes with terminal-style design
- Theme preference persists in localStorage
- Dynamic chart color adaptation for theme changes
- Responsive design for mobile devices
- Clean, icon-only switch without text labels
- Fix SessionTimer component initialization and remove debug logs

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-16 15:59:42 -04:00
Dani e95ac8ae73 fix: Improve error handling for session data fetch in analytics dashboard 2025-07-16 15:12:28 -04:00
Daniel Avila 2b4d600b37 feat: Add elegant light/dark theme toggle switch to analytics dashboard (#9)
- Implement CSS variables for comprehensive theming system
- Add minimalist toggle switch with smooth animation
- Support both light and dark modes with terminal-style design
- Persist theme preference in localStorage
- Dynamic chart color adaptation for theme changes
- Responsive design for mobile devices
- Clean, icon-only switch without text labels for elegance

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-07-16 14:16:06 -04:00
Dani 06cf7da6ae v1.8.2 - Version bump for memory leak hotfix 2025-07-16 09:29:26 -04:00
Dani 8b8cf9827d CRITICAL: Fix memory leak causing 3.86GB usage and crashes
- Remove parsedMessages from conversation objects (80-90% memory reduction)
- Reduce periodic refresh intervals (30s -> 2min, 10s -> 30s)
- Implement aggressive cache size limits (100 -> 25 entries)
- Add memory cleanup in API endpoints (limit to 100-150 conversations)
- Reduce cache TTL settings for more aggressive cleanup
- Update SessionAnalyzer to work without parsedMessages
- Add automatic garbage collection hints

Expected memory usage: 200-500MB instead of 3.86GB

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-16 09:29:26 -04:00
Daniel Avila ffb2387a85 Update README.md 2025-07-15 19:10:38 -04:00
Dani cff33ed130 v1.8.1 - Restore prepublishOnly script
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 19:08:04 -04:00
Dani c20a09cfe8 fix: Implement comprehensive memory management and session tracking improvements
- Add automatic DataCache cleanup with 30-second intervals
- Implement size limit enforcement to prevent memory buildup
- Increase memory threshold to 300MB for realistic analytics usage
- Add Claude session tracking integration throughout dashboard
- Fix message counting to respect actual Claude session windows
- Stabilize conversation state transitions with extended time intervals
- Add comprehensive token breakdown with cache tokens
- Implement Claude session popover with hover functionality
- Fix table layout stability with fixed column widths
- Reduce cache size limits from 1000 to 100 entries
- Add proper cleanup methods for graceful shutdown

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 19:04:01 -04:00
Dani c33b61bb18 feat: Enhance analytics dashboard with comprehensive token tracking and improved conversation history
- Fix token calculation discrepancy by including cache tokens in main dashboard
- Add detailed token breakdown popover with hover functionality
- Improve conversation history loading with comprehensive message metadata
- Fix message coloring logic using JSON metadata instead of content parsing
- Add version number integration to dashboard
- Enhance SessionTimer with info icon and message calculation tooltip
- Move notifications button to filter row for better UX
- Add comprehensive token usage tracking (input, output, cache creation, cache read)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 19:04:01 -04:00
Dani 8e23f08d6d Add unit tests for StateCalculator, StateService, and WebSocketServer
- Implement comprehensive unit tests for StateCalculator to validate conversation status detection and state management.
- Create unit tests for StateService covering state management, subscriber notifications, and error handling.
- Develop unit tests for WebSocketServer to ensure proper handling of WebSocket connections, message broadcasting, and heartbeat mechanisms.
- Include edge case handling and validation for all components to enhance robustness and reliability.
2025-07-15 19:04:01 -04:00
Dani 72bcfe441f feat: Implement complete modular architecture (Phases 1-3)
## Phase 1: Backend Modularization ✅
- Extract StateCalculator class with conversation state logic
- Extract ProcessDetector class for Claude process detection
- Extract ConversationAnalyzer class for data analysis
- Extract FileWatcher class for file system monitoring
- Create DataCache class with multi-level caching strategy
- Integrate dependency injection throughout backend

## Phase 2: Frontend Modularization ✅
- Create modular component architecture:
  - Dashboard: Main orchestrator component
  - ConversationTable: Interactive table with filters/pagination
  - Charts: Chart.js integration and management
- Implement service layer:
  - DataService: API communication with intelligent caching
  - StateService: Reactive state management with subscriptions
  - WebSocketService: Real-time communication client
- Replace monolithic 2000+ line HTML with clean modular structure
- Add main.js application bootstrap with error handling

## Phase 3: WebSocket Integration ✅
- Create WebSocketServer for real-time server communication
- Implement NotificationManager for coordinated notifications
- Add real-time conversation state change detection
- Replace polling with WebSocket updates + fallback mechanisms
- Add automatic reconnection and heartbeat mechanisms

## Key Improvements:
- **Maintainability**: 3000+ line monolith → ~20 focused modules (100-200 lines each)
- **Performance**: Smart caching, real-time updates, optimized data flow
- **Scalability**: Clean separation of concerns, dependency injection
- **Developer Experience**: Hot-reloadable modules, clear APIs, error boundaries
- **User Experience**: Real-time updates, offline fallback, loading states

## Architecture:
```
Backend: analytics/
├── core/ (StateCalculator, ProcessDetector, ConversationAnalyzer, FileWatcher)
├── data/ (DataCache)
└── notifications/ (WebSocketServer, NotificationManager)

Frontend: analytics-web/
├── components/ (Dashboard, ConversationTable, Charts)
├── services/ (DataService, StateService, WebSocketService)
└── assets/js/ (main.js bootstrap)
```

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 19:04:01 -04:00
Dani d51a565a2a perf: Optimize conversation state detection with ultra-fast refresh and improved logic
- Implement 500ms refresh rate for near real-time updates
- Add 250ms fast refresh for first 30 seconds for instant state changes
- Prioritize conversation flow over file timestamps for immediate response detection
- Improve "Claude Code working..." detection to trigger instantly when user sends message
- Extend file activity detection window to 15 seconds for better accuracy
- Create dedicated npm README for better package discoverability
- Update root README to highlight new notification and state detection features
- Remove debug console logs for cleaner production experience

Performance improvements result in near-instantaneous state change detection.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 19:04:01 -04:00
Daniel Avila 8d77b3abb6 Update README.md 2025-07-14 21:48:26 -04:00
Dani 3dbeaec2e0 feat: Enhance analytics dashboard with real-time conversation state detection
- Implement real-time conversation state updates with 1-second refresh
- Add precise state detection: "Claude Code working...", "User typing...", "Awaiting user input..."
- Separate refresh logic: manual for charts, automatic for conversation data
- Integrate active process detection for accurate state determination
- Improve notification system for awaiting user input states
- Remove emojis from notification titles and refresh buttons for cleaner interface
- Optimize performance by only refreshing conversation data, not charts

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-11 21:42:29 -04:00
Dani 96be4c8603 feat: Update version numbers and implement notification system for conversation state changes 2025-07-11 21:15:37 -04:00
Dani 68314d0558 style: Remove emojis from dashboard buttons for cleaner interface
- Remove emojis from notification and refresh buttons
- Clean, professional button text appearance
- Maintain all functionality while improving visual clarity
- Better accessibility and readability

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-11 20:31:44 -04:00
Dani 966fddcd28 feat: Add browser notifications for Claude Code analytics dashboard
- Implement browser notification API integration
- Add notification button to enable/disable alerts
- Detect conversation state changes (Awaiting user input...)
- Send notifications when Claude is waiting for user response
- Include clickable notifications that focus the conversation
- Auto-close notifications after 10 seconds
- Visual button states (enabled/disabled/denied)
- Test notification on first enable
- Improve productivity by alerting users when Claude needs input

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-11 20:27:46 -04:00
Dani 05c4307cf7 fix: Update CodeGPT API key and increment package version to 1.6.3 2025-07-11 12:42:04 -04:00
Dani 9b459fab35 docs: Update README to reflect new interactive welcome screen
- Update Quick Start section to show interactive welcome screen
- Explain that Analytics Dashboard is now the default option
- Show clear visual example of the selection interface
- Update Analytics Dashboard section to highlight default status
- Improve user onboarding documentation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-11 12:36:32 -04:00
Dani 713135545d feat: Set Analytics Dashboard as default selection in welcome screen
- Change default selection from 'setup' to 'analytics'
- Promote analytics dashboard usage as primary feature
- Users can still easily select Project Setup if needed
- Improves discoverability of monitoring capabilities

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-11 12:29:26 -04:00
Dani a93a86634f fix: Remove automatic help display that interfered with interactive welcome
- Remove automatic help output when no arguments provided
- Allow interactive welcome screen to show cleanly
- Users can still access help with --help flag
- Fixes clean onboarding experience

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-11 12:26:55 -04:00
Dani c1299c7570 feat: Add interactive welcome screen with choice between analytics and setup
- Add initial prompt to choose between Analytics Dashboard or Project Setup
- Show clear descriptions for each option with emojis
- Only show prompt when no specific CLI flags are provided
- Maintain existing behavior for users with flags (--yes, --language, etc.)
- Improve onboarding experience for new users

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-11 12:23:03 -04:00
Dani ab05eb5cc2 fix: Correct image placement in Quick Start section of README 2025-07-11 10:22:50 -04:00