Skip to content

CodePulse is a programmer/developer productivity-focused extension that makes your productivity and coding better.

License

Notifications You must be signed in to change notification settings

BleckWolf25/CodePulse

Repository files navigation

Code Pulse - Developer Productivity Dashboard (DPD) VS Code Extension

🎯 Project Vision

Code Pulse is a TypeScript-based VS Code extension that provides comprehensive coding metrics, visualizations, and insights to help developers understand their coding patterns, complexity, and productivity.

πŸ“Š Features

  • Multi-language code complexity analysis
  • Persistent metrics tracking
  • Interactive dashboard with charts
  • Configurable tracking options
  • Exportable metrics
  • Performance-conscious design

πŸ“¦ Project Structure

code-pulse/
β”‚
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ extension.ts                # Main extension entry point
β”‚   β”œβ”€β”€ metrics/
β”‚   β”‚   β”œβ”€β”€ complexity-alerts.ts    # Complexity Alerts
β”‚   β”‚   β”œβ”€β”€ complexity.ts           # Complexity Metrics logic
β”‚   β”‚   β”œβ”€β”€ debounce-tracker.ts     # Debounce tracker system
β”‚   β”‚   β”œβ”€β”€ storage.ts              # Persistent storage management
β”‚   β”‚   └── tracker.ts              # Core metrics logic
β”‚   β”‚
β”‚   β”œβ”€β”€ test/
β”‚   β”‚   └── extension.test.ts       # Extension test logic
β”‚   β”‚
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”œβ”€β”€ advanced-config.ts      # Multi-language support
β”‚   β”‚   β”œβ”€β”€ cache.ts                # Caching system
β”‚   β”‚   β”œβ”€β”€ config-export.ts        # Export metrics
β”‚   β”‚   β”œβ”€β”€ config.ts               # Extension configuration management
β”‚   β”‚   └── error-handler.ts        # Error handler system
β”‚   β”‚
β”‚   └── views/
β”‚       β”œβ”€β”€ dashboard.ts            # Webview dashboard logic
β”‚       └── charts.ts               # Chart rendering logic
β”‚   
β”‚
β”œβ”€β”€ package.json                    # Extension manifest
β”œβ”€β”€ tsconfig.json                   # TypeScript configuration
β”œβ”€β”€ esbuild.js                      # Build configuration
β”œβ”€β”€ .vscodeignore                   # VS Code extension ignore file
β”‚
β”œβ”€β”€ resources/
β”‚   β”œβ”€β”€ icons/                      # Extension icons
β”‚   └── templates/                  # Dashboard HTML templates (soon)
β”‚
└── dist/                           # Compiled extension

🧩 Modules and Their Responsibilities

Complexity Analysis (complexity.ts)

  • Performs deep code complexity analysis
  • Calculates multiple complexity metrics:
    • Cyclomatic Complexity
    • Maintainability Index
    • Halstead Complexity Measures
  • Generates actionable code improvement recommendations

Metrics Tracking (tracker.ts)

  • Tracks coding activities across files and languages
  • Collects detailed file and session metrics
  • Manages tracking configuration
  • Provides session insights and aggregation

Persistent Storage (storage.ts)

  • Manages long-term storage of coding metrics
  • Handles file system interactions
  • Implements data retention and pruning strategies

Configuration Management (config.ts)

  • Provides centralized configuration handling
  • Supports dynamic configuration updates
  • Manages extension-wide settings

Dashboard and Visualization (dashboard.ts & charts.ts)

  • Generates interactive web-based dashboards
  • Creates visualizations using Chart.js
  • Supports metrics export and refreshing

πŸ›  Configuration Files

package.json

  • Defines extension metadata
  • Specifies configuration options
  • Lists dependencies and scripts
  • Configures activation events and commands

tsconfig.json

  • Configures TypeScript compilation
  • Enables strict type checking
  • Defines module resolution and target

esbuild.js

  • Manages build process
  • Supports development and production builds
  • Generates build insights
  • Handles external dependencies

πŸ”§ Extension Settings

This extension contributes the following settings:

  • productivityDashboard.enableMetricTracking: Enable or disable metric tracking.
  • productivityDashboard.complexityThresholds: Define complexity thresholds per language.
  • productivityDashboard.complexityThreshold: Set general complexity threshold.
  • productivityDashboard.trackingInterval: Configure tracking intervals in minutes.
  • productivityDashboard.excludedLanguages: Exclude specific languages from tracking.
  • productivityDashboard.enableDetailedLogging: Enable or disable detailed logging.
  • productivityDashboard.retentionPeriod: Configure data retention in days.

πŸ–Ό Screenshots

Soon, I'll realease screenshots

πŸ“Œ Requirements

  • VS Code ^1.98.0
  • Node.js >=16.0.0

Download VS Code: https://code.visualstudio.com/download Download Node.js: https://nodejs.org/en

πŸš€ Future Enhancements

  • Machine learning-based complexity prediction
  • More advanced visualizations
  • Language-specific deep analysis
  • Integration with external code quality tools

πŸ§ͺ Potential Testing

  • Unit tests for complexity calculations
  • Integration tests for tracking logic
  • Mock VS Code extension context
  • Performance benchmarking

πŸ›  Technologies Used

  • TypeScript
  • VS Code Extension API
  • Chart.js
  • esbuild
  • Node.js APIs
  • ESLint
  • Mocha

πŸ›  Design Principles

  • Modular architecture
  • Loose coupling
  • Extensibility
  • Performance optimization
  • Comprehensive type safety

🐞 Known Issues

List any known issues and potential fixes.

πŸ“œ Release Notes

Check here for more information about Release Notes.

Enjoy productivity on another level!