Skip to content

Add AI auto-generation feature for repository descriptions and update…#3

Open
SparshKapoor-CODER wants to merge 1 commit into
dhairyagothi:mainfrom
SparshKapoor-CODER:feature/ai-auto-description
Open

Add AI auto-generation feature for repository descriptions and update…#3
SparshKapoor-CODER wants to merge 1 commit into
dhairyagothi:mainfrom
SparshKapoor-CODER:feature/ai-auto-description

Conversation

@SparshKapoor-CODER
Copy link
Copy Markdown

@SparshKapoor-CODER SparshKapoor-CODER commented May 9, 2026

✨ AI-Powered Auto-Description for Repo READMEs

📌 Description

The current tool generates visually stunning README templates, but leaves the most important part — the project description, features, and tech stack — as blank placeholders. This forces maintainers to manually write the entire narrative after creating the template.

This PR tackles that "elephant in the room" by adding an AI-powered auto-description feature. It reads the actual source code of any GitHub repository and uses a free language model (Groq's Llama 3.1 8B) to automatically generate:

  • A catchy tagline
  • A detailed overview/description
  • A list of key features
  • A tech stack

All from a single button click — while still allowing maintainers to edit the generated content before finalising.


🚀 Changes Overview

File Change
api/analyze-repo.js New serverless function that fetches the repository file tree, extracts key files (package.json, entry points, configs), builds a context prompt, calls the Groq API, and returns AI-generated JSON sections.
src/components/RepoForm.tsx Added an “✨ Auto-generate from Repo” button with loading and error states. On click, it sends the repository owner/name to the API and automatically pre-fills tagline, description, features, and techStack.
vite.config.ts Added a proxy for /api pointing to http://localhost:3001 so the frontend can communicate with the local API server during development.
scripts/dev-api.mjs New lightweight Express development server that loads the API key from .env.local and locally hosts the analyze-repo API handler — removing the need for vercel dev.

✅ All existing functionality remains untouched.


🛠️ How to Test Locally

1. Get a Free Groq API Key

Create a free API key from:

👉 https://console.groq.com/keys


2. Create .env.local

In the project root, create a file named .env.local:

GROQ_API_KEY=your_key_here

3. Install Dependencies

npm install groq-sdk express cors dotenv

4. Start the Local AI API Server

node scripts/dev-api.mjs

5. Start the Frontend

In another terminal:

npm run dev

6. Open the App

Visit:

http://localhost:5173

Go to the Repo README page.


7. Try the Feature

  1. Enter a GitHub repository owner and name
    Example:
SparshKapoor-CODER/PCOD-Tracker
  1. Click:
✨ Auto-generate from Repo
  1. The form fields will automatically populate with:
    • Tagline
    • Description
    • Features
    • Tech Stack

Generated entirely from the repository source code.


🌐 Deployment Note

When deploying to Vercel (or any serverless environment), simply set the environment variable:

GROQ_API_KEY=your_key_here

The api/analyze-repo.js function will work out of the box.

The local development server inside scripts/ is only required for local development and is not needed in production.


📦 Dependencies Added

Package Purpose
groq-sdk Used for calling Groq's chat completions API
express Lightweight local API server
cors Enables frontend-backend communication during local development
dotenv Loads environment variables from .env.local

📸 Screenshots / Demo

image

Before

image

After


💡 Why This Matters

This PR transforms git-creator from a static README template generator into a smart documentation assistant.

It helps maintainers:

  • Save time
  • Reduce documentation effort
  • Quickly bootstrap professional README files
  • Improve consistency across repositories

This is especially valuable for:

  • Machine Learning projects
  • Research repositories
  • Hackathon projects
  • Rapid prototypes
  • Open-source tools

The AI system is:

  • ✅ Opt-in
  • ✅ Privacy-conscious
  • ✅ Lightweight
  • ✅ Uses only minimal repository context
  • ✅ Powered by a free model to remain accessible to everyone

✨ Result

With this feature, users can generate meaningful, polished README content in seconds — making documentation faster, smarter, and far more approachable.

Contributor

@SparshKapoor-CODER

@vercel
Copy link
Copy Markdown

vercel Bot commented May 9, 2026

@SparshKapoor-CODER is attempting to deploy a commit to the Dhairya Gothi 's projects Team on Vercel.

A member of the Team first needs to authorize it.

@SparshKapoor-CODER
Copy link
Copy Markdown
Author

@dhairyagothi this is a reminder

@dhairyagothi
Copy link
Copy Markdown
Owner

@dhairyagothi this is a reminder

this is great i have also tried this but groq have limited refrence we can't send a lot big prompt

@SparshKapoor-CODER
Copy link
Copy Markdown
Author

SparshKapoor-CODER commented May 11, 2026

this is great i have also tried this but groq have limited refrence we can't send a lot big prompt

like i kept the limit for now that it reads the first 200 lines of code of major files also tested it on large repos can you tell me what exact error its showing

@dhairyagothi
Copy link
Copy Markdown
Owner

this is great i have also tried this but groq have limited refrence we can't send a lot big prompt

like i kept the limit for now that it reads the first 200 lines of code of major files also tested it on large repos can you tell me what exact error its showing

okay give me some time i will try it locally first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants