Skip to content

keenpaul29/codescope-ai

Repository files navigation

CodeScope AI

CodeScope AI is an intelligent web application that provides deep, AI-powered analysis of any public GitHub repository. Paste a repository URL and instantly receive:

  • A comprehensive breakdown of the tech stack, architecture, and code structure
  • Step-by-step explanation of how the code works
  • Potential weaknesses and areas for improvement
  • A fun "Code Vibe" personality assessment
  • Development activity insights
  • Key contributor personas
  • Three unique, actionable feature recommendations
  • An interactive AI chatbot to answer questions about the analyzed repo

Table of Contents


Features

  • Paste & Analyze: Enter any public GitHub repo URL for instant, AI-driven analysis.
  • Comprehensive Insights: Get project purpose, tech stack, code structure, and more.
  • Code Vibe: Fun, AI-generated personality for each codebase.
  • Development Pulse: Visualize commit activity and contributor personas.
  • Feature Recommendations: Receive innovative, actionable ideas to improve your repo.
  • AI Chatbot: Ask follow-up questions about the analysis in natural language.
  • Modern UI: Beautiful, responsive design with Tailwind CSS.

Tech Stack

  • Frontend: React 19, TypeScript
  • Build Tool: Vite 6
  • AI: Google Gemini API (@google/genai)
  • Styling: Tailwind CSS (via CDN)

Getting Started

Prerequisites

Installation

  1. Clone the repository:
    git clone <your-fork-or-this-repo-url>
    cd codescope-ai
  2. Install dependencies:
    npm install
  3. Set up environment variables:
    • Create a file named .env.local in the project root.
    • Add your Gemini API key:
      GEMINI_API_KEY=your-gemini-api-key-here

Environment Variables

Variable Required Description
GEMINI_API_KEY Yes Your Google Gemini API key for AI analysis.
  • The app expects this variable in .env.local.
  • The build system (Vite) injects this as both process.env.GEMINI_API_KEY and process.env.API_KEY.

Available Scripts

Script Description
npm run dev Start the development server (hot reload)
npm run build Build the app for production
npm run preview Preview the production build locally

Usage

  1. Start the development server:
    npm run dev
  2. Open your browser:
  3. Analyze a repository:
    • Paste a public GitHub repository URL (e.g., https://github.com/facebook/react)
    • Click Analyze
    • Explore the AI-powered insights and chat with the bot!

Troubleshooting

  • API Key Errors:
    • If you see API_KEY environment variable not set, ensure .env.local exists and contains your Gemini API key.
  • GitHub Rate Limits:
    • If you see errors about GitHub API rate limits, wait a few minutes and try again.
  • Empty/Private Repos:
    • Only public repositories with code are supported.
  • Port Conflicts:
    • If port 5173 is in use, Vite will prompt for another port or you can specify one with --port.

Project Structure

codescope-ai/
├── App.tsx                  # Main app logic and UI
├── components/              # UI components (Header, Chatbot, etc.)
├── services/                # API and AI service logic
├── types.ts                 # TypeScript types
├── index.tsx                # App entry point
├── index.html               # HTML template (includes Tailwind)
├── vite.config.ts           # Vite configuration
├── tsconfig.json            # TypeScript config
├── package.json             # Project metadata and scripts
└── README.md                # This file

Contributing

Contributions are welcome! To propose a feature, bugfix, or improvement:

  1. Fork the repository
  2. Create a new branch (git checkout -b feature/your-feature)
  3. Commit your changes
  4. Push to your fork and open a Pull Request

For major changes, please open an issue first to discuss what you would like to change.


License

This project is licensed under the MIT License. See LICENSE for details.


Credits

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published