Skip to content

AdonaiVera/forky

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

34 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Forky: Your AI code Companion

🌟 Powered by Google Cloud credits through the #VertexAISprint program and developed in the RevolutionUC Hackathon! ✨

forky_new.mp4

Forky helps open-source contributors navigate repos, understand code, and improve pull requests with real-time AI magic powered by Gemini 2.0. Ask questions, get instant PR insights, and receive smart suggestionsβ€”all while using RAG, and AI agents to make contributing faster, easier, and way more fun!

πŸš€ Try it out!

πŸ“¦ Prerequisites

  • Python 3.8 or higher
  • pip package manager
  • Virtual environment (recommended)
  • Google Cloud credentials (for Gemini AI features)

πŸ› οΈ Installation & Setup

  1. Clone the repository:

    git clone https://github.com/AdonaiVera/forky.git
    cd forky
  2. Set up virtual environment:

    python -m venv .venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  3. Install dependencies:

    pip install -r requirements.txt
  4. Environment configuration:

    • Copy .env.example to .env
    • Add your Google Cloud credentials and other required environment variables

πŸš€ Running the Application

Local Development

cd src/
python -m uvicorn server.main:app --reload

The application will be available at http://localhost:8000

Production Deployment

cd src/
python -m uvicorn server.main:app --host 0.0.0.0 --port 8000

🎯 Core Features

Repository Analysis

  • Code Understanding: AI-powered code explanation and architecture insights
  • Dependency Visualization: Interactive visualization of code dependencies
  • Repository Structure Analysis: Clear breakdown of codebase organization

Smart Repository Search

  • AI-Powered Search: Advanced repository search using Google Search grounding
  • Quality Filtering: Ensures repositories are active, maintained, and have sufficient content
  • Relevance Ranking: Intelligent ranking based on README analysis and query relevance
  • Temperature Control: Adjustable creativity levels for search results (0.2-0.8)
  • Top Results: Returns the most relevant repositories with detailed match explanations

Pull Request Assistant

  • Automated Reviews: AI-driven code review suggestions
  • Quality Checks: Automated code quality assessment
  • Best Practices: Contextual recommendations for improvements
  • Difficulty Scoring: PR classification (Easy/Medium/Hard)

Interactive Features

  • Natural Language Q&A: Ask questions about any code segment
  • Real-time Suggestions: Context-aware coding recommendations
  • Multi-language Support: Works across different programming languages

πŸ—οΈ Project Structure

forky/
β”œβ”€β”€ src/                    # Main source code
β”‚   β”œβ”€β”€ server/            # Backend server implementation
β”‚   β”‚   β”œβ”€β”€ ai/           # AI/ML models and Gemini integration
β”‚   β”‚   β”œβ”€β”€ routers/      # FastAPI route handlers
β”‚   β”‚   β”œβ”€β”€ templates/    # Jinja2 HTML templates
β”‚   β”‚   β”œβ”€β”€ main.py      # Application entry point
β”‚   β”‚   └── server_utils.py # Utility functions
β”‚   β”œβ”€β”€ static/           # Static assets
β”‚   β”‚   β”œβ”€β”€ css/         # Tailwind CSS styles
β”‚   β”‚   └── js/          # Frontend JavaScript
β”‚   β”œβ”€β”€ diagrams/        # Visualization components
β”‚   └── config.py        # Configuration settings
β”œβ”€β”€ docs/                 # Documentation
β”œβ”€β”€ tests/               # Test suite
└── docker/              # Docker configuration

πŸ› οΈ Technology Stack

Backend

  • FastAPI: High-performance web framework
  • Gemini 2.0: Google's advanced AI model
  • PyViz: Data visualization library
  • gitingest: Git repository analysis tool

Frontend

  • Tailwind CSS: Utility-first CSS framework
  • Jinja2: Template engine
  • JavaScript: Interactive features

DevOps & Tools

  • Docker: Containerization
  • uvicorn: ASGI server
  • PostHog: Analytics platform

🐳 Docker Deployment

  1. Build the image:

    docker build -t forky .
  2. Run the container:

    # Development
    docker run --env-file .env -d --name forky -p 8080:8080 forky
    
    # Production
    docker run -d --name forky -p 8080:8080 forky

πŸ”§ Configuration

Environment Variables

  • GOOGLE_API_KEY: Your Google Cloud API key

  • ALLOWED_HOSTS: Comma-separated list of allowed hosts

    # Default: "forky.com,*.forky.com,localhost,127.0.0.1"
    ALLOWED_HOSTS="example.com,localhost,127.0.0.1"

🀝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

πŸ“„ License

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

πŸ“œ Code of Conduct

Details about our Code of Conduct can be found in the code of conduct file.

πŸ™ Acknowledgments

  • Google Cloud for providing credits through #VertexAISprint
  • RevolutionUC Hackathon for the platform
  • All our contributors and supporters

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •