Skip to content

A VS Code extension that uses AI to "resurrect" abandoned GitHub repos by: * Analyzing dead projects and understanding their original intent * Updating deprecated dependencies automatically * Modernizing code to current standards * Creating interactive "ghost tours" of the codebase showing its history

Notifications You must be signed in to change notification settings

ola-893/codecrypt-kiro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

36 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸงŸ CodeCrypt - AI-Powered Code Resurrection

Bring dead code back to life with intelligent modernization, dependency resurrection, and real-time visualization.

Netlify Status

Live Demo: https://codecrypt-demo.netlify.app

๐ŸŽฏ What is CodeCrypt?

CodeCrypt is an autonomous AI agent that resurrects abandoned software projects. It combines deep code analysis with cutting-edge visualization to transform the complex process of modernizing legacy code into an engaging, interactive experience.

Key Features

  • ๐Ÿ” Death Detection: Identifies outdated dependencies, security vulnerabilities, and deprecated APIs
  • ๐Ÿค– Hybrid Analysis: Combines AST parsing with LLM semantic understanding
  • ๐Ÿ”„ Smart Updates: Intelligently resolves dependencies with dead URL detection and replacement
  • ๐Ÿ“Š Live Dashboard: Real-time metrics with animated charts
  • ๐Ÿ™๏ธ 3D Ghost Tour: Interactive code city visualization showing project evolution
  • ๐ŸŽต Resurrection Symphony: Music that evolves with code quality
  • ๐Ÿ—ฃ๏ธ AI Narration: Voice commentary explaining each step
  • ๐Ÿณ Time Machine Validation: Docker-based testing proving functional equivalence

๐Ÿš€ Quick Start

Prerequisites

Installation

  1. Install the VS Code Extension

    cd codecrypt
    npm install
    npm run compile
  2. Configure LLM Provider

    • Open VS Code Command Palette (Cmd+Shift+P / Ctrl+Shift+P)
    • Run: CodeCrypt: Configure Anthropic API Key or CodeCrypt: Configure Gemini API Key
    • Enter your API key
  3. Start a Resurrection

    • Command Palette โ†’ CodeCrypt: Resurrect Repository
    • Enter a GitHub repository URL
    • Watch the resurrection happen in real-time!
  4. View the Dashboard

๐Ÿ“ Project Structure

codecrypt-kiro/
โ”œโ”€โ”€ codecrypt/                    # VS Code Extension (Backend)
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ extension.ts         # Extension entry point
โ”‚   โ”‚   โ”œโ”€โ”€ services/            # Core resurrection services
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ resurrectionOrchestrator.ts
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ dependencyAnalysis.ts
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ hybridAnalysis.ts
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ sseServer.ts     # Real-time event streaming
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ”‚   โ””โ”€โ”€ test/                # Comprehensive test suite
โ”‚   โ”œโ”€โ”€ frontend/                # React Dashboard (Frontend)
โ”‚   โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ components/      # Dashboard, GhostTour, Symphony, Narrator
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ context/         # State management
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ hooks/           # Custom React hooks
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ utils/           # Visualization utilities
โ”‚   โ”‚   โ”œโ”€โ”€ dist/                # Production build
โ”‚   โ”‚   โ””โ”€โ”€ netlify.toml         # Netlify deployment config
โ”‚   โ”œโ”€โ”€ data/                    # Package replacement registry
โ”‚   โ””โ”€โ”€ package.json
โ”œโ”€โ”€ .kiro/
โ”‚   โ”œโ”€โ”€ specs/                   # Feature specifications
โ”‚   โ””โ”€โ”€ steering/                # Development guidelines
โ””โ”€โ”€ README.md                    # This file

๐ŸŽฎ How to Use

For Users

  1. Start Resurrection

    VS Code โ†’ Command Palette โ†’ CodeCrypt: Resurrect Repository
    
  2. Monitor Progress

    • Watch the VS Code progress indicator
    • Open http://localhost:3001 for live dashboard
    • Listen to AI narration explaining each step
    • Explore the 3D Ghost Tour visualization
  3. Review Results

    • Check the resurrection report
    • Review updated dependencies
    • Validate with Time Machine tests
    • Commit the modernized code

For Developers

Backend Development

cd codecrypt
npm install
npm run compile        # Compile TypeScript
npm test              # Run tests
npm run watch         # Watch mode for development

Frontend Development

cd codecrypt/frontend
npm install
npm run dev           # Start dev server on http://localhost:5173
npm run build         # Production build
npm test              # Run tests

Deploy Frontend to Netlify

cd codecrypt/frontend
npm run build
netlify deploy --prod

๐Ÿ—๏ธ Architecture

CodeCrypt uses a dual-stream architecture:

Core Pipeline (Backend)

Death Detection โ†’ Hybrid Analysis โ†’ Planning โ†’ Resurrection โ†’ Validation

Live Experience Layer (Frontend)

SSE Events โ†’ State Management โ†’ Real-time Visualization

Technology Stack

Backend (VS Code Extension)

  • TypeScript
  • Octokit (GitHub API)
  • Anthropic SDK / Google Generative AI
  • Babel & ts-morph (AST parsing)
  • Docker SDK

Frontend (Dashboard)

  • React 18
  • Three.js (3D visualization)
  • Chart.js (metrics dashboard)
  • Tone.js (audio synthesis)
  • Web Speech API (narration)
  • Vite (build tool)

๐Ÿ“Š Dashboard Components

Metrics Dashboard

Real-time animated charts showing:

  • Dependencies updated
  • Vulnerabilities fixed
  • Code complexity trends
  • Test coverage
  • Lines of code changes

3D Ghost Tour

Interactive code city where:

  • Files are buildings (height = LOC)
  • Colors indicate change frequency
  • Timeline slider shows evolution
  • Click buildings to see details

AI Narrator

Voice commentary that explains:

  • Current resurrection step
  • Why changes are needed
  • Progress and status
  • Errors and warnings

Resurrection Symphony

Dynamic music that reflects:

  • Code quality metrics
  • Complexity reduction
  • Test coverage increase
  • Overall project health

Compilation Status

Before/after comparison showing:

  • Original compilation state
  • Modernized compilation state
  • Build success/failure
  • Error counts

๐Ÿ”’ Security & Privacy

  • API keys stored securely using VS Code SecretStorage
  • Keys never logged or exposed in code
  • Environment variables sanitized
  • MCP server credentials validated
  • No data sent to external services except configured LLM providers

๐Ÿ› Troubleshooting

Dashboard shows "Backend Not Connected"

  • Ensure you've started a resurrection in VS Code
  • The backend SSE server runs on port 3000 when resurrection is active
  • Frontend connects to http://localhost:3000/events

"No LLM provider configured" error

  1. Run CodeCrypt: Configure Anthropic API Key or CodeCrypt: Configure Gemini API Key
  2. Enter your API key
  3. Restart VS Code

Build fails after resurrection

  1. Review the resurrection report for errors
  2. Check removed/updated dependencies
  3. Run npm install manually
  4. Review breaking changes in updated packages

Frontend not updating in real-time

  • Check browser console for connection errors
  • Verify backend is running (extension is active)
  • Ensure no firewall blocking localhost:3000

๐Ÿ“š Documentation

๐Ÿค Contributing

We welcome contributions! Here's how:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Run tests (npm test)
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

Development Guidelines

  • Follow TypeScript best practices
  • Write tests for new features
  • Update documentation
  • Follow the spooky/gothic theme ๐ŸŽƒ
  • Use async/await for async operations
  • Add JSDoc comments for public APIs

๐Ÿ“„ License

MIT License - see LICENSE file for details

๐ŸŽƒ Kiroween Hackathon

CodeCrypt was created for the Kiroween Hackathon with a "resurrection" theme. The project embraces a spooky/gothic aesthetic throughout its naming, UI/UX, and documentation.

๐Ÿ™ Acknowledgments

๐Ÿ“ž Support


Made with ๐Ÿ’€ and โค๏ธ for the Kiroween Hackathon

Bringing dead code back to life, one repository at a time.

About

A VS Code extension that uses AI to "resurrect" abandoned GitHub repos by: * Analyzing dead projects and understanding their original intent * Updating deprecated dependencies automatically * Modernizing code to current standards * Creating interactive "ghost tours" of the codebase showing its history

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published