Skip to content

feat: implement AI-powered README suggestion system (Gemini) [GSSoC 2026 #101]#103

Open
pranitaurlam wants to merge 1 commit into
Mohit-368:mainfrom
pranitaurlam:feature/ai-readme-suggestions
Open

feat: implement AI-powered README suggestion system (Gemini) [GSSoC 2026 #101]#103
pranitaurlam wants to merge 1 commit into
Mohit-368:mainfrom
pranitaurlam:feature/ai-readme-suggestions

Conversation

@pranitaurlam
Copy link
Copy Markdown

🚀 Feature: AI-Powered README Suggestions

Closes #101


What this PR adds

This implements the full AI-powered README suggestion system as described in issue #101.


Changes

File Change
index.html Added "✨ Improve with AI" button in preview action bar; per-section "✨ AI" buttons on Description, Features, Installation & Title sections; full AI suggestion modal HTML
readmeforge.css ~830 lines of new styles — gradient button, spring-animation modal, dual-ring loading orb, shimmer skeletons, diff card view, accept/reject/edit controls, API key banner, mobile responsive
readmeforge.js Self-contained AI IIFE: Gemini 2.0 Flash API, section-aware prompt builder, JSON response parser, full modal state machine, per-card actions, scope switching

Feature Overview

Trigger

  • "✨ Improve with AI" button in the preview action bar (entire README)
  • "✨ AI" button on each section header (Description, Features, Installation, Title)

Scope Selector

  • Switch between: 🗂 Entire README / 📋 Description / ✨ Features / 🚀 Installation / 📌 Title without reopening the modal

AI Suggestions Panel

  • Loading state: animated dual-ring orb + 4 shimmer skeleton bars
  • Each suggestion is a card with:
    • Section name + type badge (improved / added / enhanced)
    • Before → After diff view
    • Reason (1-sentence explanation from AI)
    • Accept → writes directly to the form field + triggers live preview update
    • Reject → dims the card
    • ✏️ Edit → editable textarea to tweak the suggestion before applying
    • ↺ Undo → reverts accepted/rejected back to pending
  • Accept All button in footer

API Key

  • Users enter their Google AI Studio Gemini key
  • Stored only in localStorage — never sent anywhere except Google's servers
  • Clear key button provided

Error Handling

  • RATE_LIMIT → friendly message + retry button
  • INVALID_KEY → prompts re-entry of key
  • PARSE_EMPTY → retry prompt
  • Network errors → generic error with retry

UX

  • Escape key closes modal
  • Click-outside backdrop closes modal
  • Fully responsive — bottom sheet on mobile
  • Zero impact on existing editor flow (self-contained IIFE)
  • No console errors

Screenshots

The modal opens with a loading orb, then shows suggestion cards with before/after diffs, accept/reject/edit controls, and a footer with Accept All.


Testing

  1. Open index.html in browser
  2. Fill in project name, description, features
  3. Click "✨ Improve with AI" or any per-section "✨ AI" button
  4. Enter a Gemini API key from AI Studio
  5. Review suggestions → Accept / Reject / Edit → see live preview update

@netlify
Copy link
Copy Markdown

netlify Bot commented May 14, 2026

Deploy Preview for makeareadme ready!

Name Link
🔨 Latest commit f8f4fa4
🔍 Latest deploy log https://app.netlify.com/projects/makeareadme/deploys/6a06aca6831b1b00085255c0
😎 Deploy Preview https://deploy-preview-103--makeareadme.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@pranitaurlam pranitaurlam force-pushed the feature/ai-readme-suggestions branch from 2f9e029 to f8f4fa4 Compare May 15, 2026 05:18
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.

Feature Request: AI-Powered README Suggestions [ GSSoC 2026]

1 participant