Skip to content

Repository files navigation

code-vibes ✨

A Gen Z tool to check your code vibes and analyze technical debt with style. No cap, this tool will tell you exactly what's mid in your codebase and how much it'll cost to make it fire again.

Built for Code with Kiro Hackathon 2025 πŸš€

πŸ”₯ Features

  • πŸ” Vibe Check Your Code: Identifies what's fire and what's mid in your codebase
  • πŸ’° Real Cost Estimates: No cap on how much it'll cost to fix your technical debt
  • πŸ“ˆ Priority Rankings: Shows you what to fix first (periodt)
  • πŸ“Š Multiple Output Formats: Console, HTML, and JSON - whatever vibes you need
  • 🌐 Modern Web Interface: Dark theme dashboard that actually slays
  • πŸ™ GitHub Integration: Clone and analyze any repo - even the sus ones
  • ⚑ CI/CD Ready: Automated vibe checks in your pipeline
  • 🐳 Docker Ready: Containerized and ready to deploy anywhere

πŸš€ Quick Start

# Install dependencies
make install-dev

# Analyze the example project
make analyze

# Launch web interface (recommended)
make web

# Generate HTML report
make analyze-html

# Run all tests
make test

# See all available commands
make help

πŸ“ˆ Example Output

πŸ“Š TECHNICAL DEBT ANALYSIS REPORT
============================================================

πŸ“ˆ SUMMARY:
  Total Issues: 17
  Estimated Hours: 36.3
  Estimated Cost: $4,351.20
  Average Impact: 3.9/10

πŸ”₯ TOP HIGH-IMPACT ISSUES:
  1. [HIGH] High Complexity - Function has complexity 24
     File: src/processor.py:45
     Cost: $960.00 (8h)

🎯 What It Detects

  • High Complexity Functions (cyclomatic complexity > 10)
  • Long Functions (> 50 lines)
  • TODO/FIXME Comments (unresolved technical debt)
  • Long Lines (> 120 characters)
  • Deep Nesting (excessive if/for/while nesting)

πŸ› οΈ Usage

Available Commands (Makefile)

# Development Setup
make install-dev          # Install development dependencies
make dev-setup            # Complete development environment setup

# Analysis Commands
make analyze              # Analyze the example project
make analyze-html         # Generate HTML report for example project
make analyze-json         # Generate JSON report for example project

# Web Interface
make web                  # Start web interface (development mode)
make web-prod            # Start web interface (production mode)
make web-demo            # Start web interface with demo data

# Docker Deployment
make docker-build        # Build Docker image
make docker-run          # Run Docker container
make docker-dev          # Run Docker in development mode
make docker-prod         # Run Docker in production mode
make deploy-docker       # Deploy using Docker

# Development Tools
make test                # Run unit tests
make lint                # Run code linting
make format              # Format code with black
make clean               # Clean up generated files

# Production Deployment
make build               # Build for production
make deploy              # Deploy to production (using gunicorn)
make deploy-k8s          # Deploy to Kubernetes

# Information
make help                # Show all available commands
make info                # Show system information

CLI Analysis

# Basic vibe check
python code-vibes.py analyze examples/messy_codebase --no-cap

# Custom hourly rate
python code-vibes.py analyze examples/messy_codebase --rate 150 --slay

# HTML report
python code-vibes.py analyze examples/messy_codebase --output html --output-file vibes-report.html

# JSON report for CI/CD
python code-vibes.py analyze examples/messy_codebase --output json --output-file vibes.json

# Filter by severity
python code-vibes.py analyze examples/messy_codebase --min-severity high --periodt

# Verbose output (get all the tea)
python code-vibes.py analyze examples/messy_codebase --verbose --fr

Web Interface

# Start the modern web interface (recommended)
make web
# Open http://localhost:8080

# Production mode
make web-prod

# Custom host and port
python code-vibes.py web --host 0.0.0.0 --port 8080 --debug --slay

Web Interface Features:

  • 🎨 Modern dark theme with Tailwind CSS
  • πŸ“ Local Project Analysis: Analyze projects on your filesystem
  • πŸ™ GitHub Integration: Clone and analyze any public GitHub repository
  • πŸ“Š Interactive results with real-time cost calculations
  • πŸ“± Mobile-friendly responsive design
  • πŸ”„ Real-time analysis progress
  • πŸ“‹ Detailed issue breakdown with severity indicators

Docker Deployment

# Quick Docker setup
make docker-build
make docker-run

# Development with hot reload
make docker-dev

# Production deployment
make docker-prod

# Or manually
docker build -t code-vibes .
docker run -p 8080:8080 code-vibes

CI/CD Integration

# GitHub Actions example
- name: Technical Debt Analysis
  run: |
    make install
    python code-vibes.py analyze . --output json --output-file vibes.json
    # Parse results and fail if critical issues found
    
# GitLab CI example
technical_debt:
  script:
    - make analyze-json
    - cat debt_report.json
  artifacts:
    reports:
      junit: debt_report.json

πŸ—οΈ Project Structure

code-vibes/
β”œβ”€β”€ code_vibes/               # Main package
β”‚   β”œβ”€β”€ analyzer.py           # Core vibe analysis engine with AST parsing
β”‚   β”œβ”€β”€ reporter.py           # Multi-format report generation
β”‚   β”œβ”€β”€ cli.py               # Command-line interface with Gen Z energy
β”‚   β”œβ”€β”€ config.py            # Configuration management
β”‚   └── web/                 # Web application with dark theme
β”‚       β”œβ”€β”€ app.py           # Flask application factory
β”‚       β”œβ”€β”€ routes.py        # Web routes and API endpoints
β”‚       β”œβ”€β”€ templates/       # HTML templates that actually slay
β”‚       └── static/          # CSS, JS, and assets
β”œβ”€β”€ examples/                # Sample projects for testing vibes
β”‚   └── messy_codebase/     # Demo project with sus code
β”œβ”€β”€ deploy/                  # Deployment configurations
β”‚   β”œβ”€β”€ docker/             # Docker setup
β”‚   β”œβ”€β”€ kubernetes/         # K8s manifests
β”‚   β”œβ”€β”€ nginx/              # Nginx configuration
β”‚   └── scripts/            # Deployment scripts
β”œβ”€β”€ tests/                   # Unit tests
β”œβ”€β”€ Makefile                # Development and deployment commands
└── code-vibes.py           # Main entry point ✨

οΏ½ Deploymennt Options

Local Development

make dev-setup              # Complete setup
make web                    # Start development server

Docker (Recommended for Production)

make docker-build           # Build image
make docker-prod           # Run in production mode

Kubernetes

make deploy-k8s            # Deploy to cluster
kubectl get pods -l app=code-vibes

Traditional Server

make deploy                # Deploy with Gunicorn

See deploy/README.md for detailed deployment instructions.

πŸ“š Documentation

πŸ§ͺ Testing

# Run all tests
make test

# Run with coverage
make ci-test

# Lint code
make lint

# Format code
make format

πŸ’‘ Innovation

This tool bridges the gap between "we have technical debt" and "here's exactly what it costs and how to fix it." Perfect for:

  • Engineering Managers: Get concrete cost estimates for planning sprints
  • Developers: Prioritize refactoring work by business impact
  • CTOs: Make data-driven decisions about technical debt investment
  • Teams: Track debt reduction progress over time with metrics
  • CI/CD Pipelines: Automated debt monitoring and reporting

πŸŽ‰ Key Features

  • Practical Value: Solves a real problem every development team faces
  • Business Impact: Translates technical concepts into business metrics ($$$)
  • Easy Integration: Works with existing workflows and CI/CD pipelines
  • Extensible Architecture: Easy to add new debt detection patterns
  • Multiple Interfaces: CLI, modern web UI, and JSON API for different use cases
  • Production Ready: Docker, Kubernetes, and cloud deployment support

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes and add tests
  4. Run tests: make test
  5. Format code: make format
  6. Commit changes: git commit -m 'Add amazing feature'
  7. Push to branch: git push origin feature/amazing-feature
  8. Open a Pull Request

πŸ“„ License

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


Transform your technical debt from a vague concern into actionable, prioritized work with concrete cost estimates! πŸš€

About

code-vibes ✨ - A modern technical debt analyzer that checks your codebase vibes and tells you what's fire and what's mid. Features like AST-based analysis, web interface, and reports that actually slap. No cap! πŸš€

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages