🧠 Web2Social β€” Turning Webpages into Social-Ready Content

Built for Google Chrome AI Hackathon 2025

Web2Social Logo


πŸ’‘ Inspiration

I personally got to know about the Google Chrome AI Challenge only 16 hours before the submission deadline β€” but that sparked the idea behind Web2Social.

Every day, I see amazing blogs, hackathon projects, and technical write-ups go unnoticed because they never make it to social media. That short timeframe inspired me to build something fast, practical, and meaningful β€” a Chrome AI extension that could instantly turn those hidden gems into social-ready stories.

If knowledge can be transformed into scroll-stopping social content, it can reach everyone β€” not just those who read long-form blogs.


🌍 Problem Statement

High-quality technical content β€” such as blogs, research papers, hackathon projects, competition recaps, and product release notes β€” often fails to reach the wider audience it deserves.

While creators share valuable insights, the content usually lives in long-form articles or documentation that few people read. Meanwhile, audiences are spending hours doomscrolling social media, where short-form and engaging content dominates.

However:

  • Rewriting a technical blog into multiple platform-appropriate posts is time-consuming.
  • Each social platform has a unique tone, length, and audience style.
  • As a result, great ideas stay undiscovered, limiting knowledge sharing and visibility.

πŸ’‘ Insight

β€œIf developers, creators, and startups could automatically transform their blogs, hackathon summaries, and release notes into platform-ready social media content, their knowledge could spread faster and reach more people.”


πŸš€ Solution β€” Web2Social

Web2Social is a Chrome Extension powered by Gemini Nano, Chrome’s on-device AI model. It transforms any webpage into ready-to-post social content for all major platforms β€” with just one click.


πŸͺ„ What It Does

  • Reads the currently open webpage (blog, article, project, release note).
  • Uses Chrome’s on-device AI APIs to summarize, rewrite, and generate social content.
  • Creates optimized, structured posts for:

    • 🩳 YouTube Shorts
    • 🎡 TikTok
    • 🧡 X (Twitter)
    • πŸ’Ό LinkedIn
    • πŸ’¬ Facebook
    • πŸ“Έ Instagram
    • πŸ“Œ Pinterest
    • πŸͺΆ Reddit
  • Works fully offline β€” your data never leaves your device.

  • Supports multimodal prompting β€” you can type or upload audio to modify the AI system prompt.


✨ Key Features

Feature Description
🧩 AI-Powered Repurposing Converts long-form text into short-form social media content.
🧠 Multi-Stage AI Pipeline Summarization β†’ Script Writing β†’ Rewriting β†’ Proofreading β†’ Scene Planning β†’ Translation.
πŸ—£οΈ Multimodal Input Update system prompts by typing or uploading an audio file (auto-transcribed to text).
🧾 Structured JSON Outputs Every AI response follows schema validation for reliable results.
πŸ”’ Privacy-First Runs on-device using Chrome’s globalThis.ai APIs.
πŸ’Ύ Session History Automatically stores your last 5 generations for reuse.
βš™οΈ Customizable Prompts Edit the system prompt directly or transcribe a voice note for creative control.

βš™οΈ Setup & Installation

Follow these steps to install and run Web2Social locally.


🧠 Prerequisites

Web2Social uses experimental Chrome AI APIs that are currently only available in Chrome Canary.

βœ… Step 1: Install Chrome Canary

Download and install from: πŸ‘‰ https://www.google.com/chrome/canary/

βœ… Step 2: Enable Required Flags

Open a new tab and go to:

chrome://flags/

Then enable the following flags:

#enable-experimental-web-platform-features
#optimization-guide-on-device-model
#prompt-api-for-gemini-nano
#prompt-api-for-gemini-nano-multimodal-input
#summarization-api-for-gemini-nano
#writer-api-for-gemini-nano
#rewriter-api-for-gemini-nano
#proofreader-api-for-gemini-nano

After enabling them, restart Chrome Canary.

πŸ’‘ These flags activate the on-device Gemini Nano APIs (Prompt, Summarizer, Writer, Rewriter, Proofreader) and multimodal prompt support.


πŸͺœ Installation Steps

  1. Clone or download the project:
   git clone https://github.com/your-username/web2social.git
   cd web2social
  1. Open Extensions Settings:
   chrome://extensions/
  1. Enable Developer Mode (top-right corner).

  2. Load the Extension: Click β€œLoad unpacked” and select the web2social/ folder (where manifest.json is).

  3. Pin the Extension: Click the puzzle icon β†’ Pin Web2Social for quick access.


▢️ Usage

  1. Open any webpage, blog, or Devpost project.
  2. Click the Web2Social extension icon.
  3. The side panel opens automatically.
  4. Click β€œGenerate Social Content.”
  5. Web2Social:
  • Extracts webpage text.
  • Runs through the AI pipeline.
  • Displays results for each platform.

    1. You can:
  • Edit the system prompt directly.

  • Upload an audio prompt.

  • Copy or save results.


🧠 Chrome AI APIs Used

API Name Purpose Where It’s Used Why It’s Needed
🧾 Summarizer API Extracts main ideas and key takeaways from the webpage text. src/ai/summarizer.js Converts long-form content into digestible summaries.
✍️ Writer API Generates structured scripts or narratives. src/ai/writer.js Creates initial drafts suitable for video narration or short-form storytelling.
πŸͺΆ Rewriter API Refines tone, structure, and engagement style. src/ai/rewriter.js Adapts the text to platform tone (funny, professional, casual).
πŸ”€ Proofreader API Corrects grammar, punctuation, and phrasing. src/ai/proofreader.js Ensures polished, high-quality posts ready for publishing.
🌍 Translator API Translates scripts into target languages if needed. src/ai/translator.js Enables multilingual social content generation.
🈸 Language Detector API Detects the original language of webpage text. src/ai/languageDetector.js Selects the right AI model and ensures proper translation.
πŸŽ™οΈ Prompt API Converts user audio into a custom AI system prompt (multimodal). src/ai/promptMic.js + src/ai/speechToText.js Lets users speak their custom prompt and have it transcribed automatically.

🧩 Why Multiple AI APIs

Each API plays a specific role in Web2Social’s multi-layered AI pipeline, ensuring high-quality and platform-appropriate content:

  1. Summarizer API condenses long-form pages.
  2. Writer API structures key ideas into narrative or video-friendly scripts.
  3. Rewriter API ensures the content’s tone fits the intended platform (casual for TikTok, professional for LinkedIn, etc.).
  4. Proofreader API polishes grammar, flow, and readability.
  5. Translator API makes content multilingual.
  6. Language Detector API automatically sets source and target language preferences.
  7. Prompt API adds multimodal creativity β€” users can tweak the AI’s behavior or tone via typed or spoken input.

πŸ—£οΈ Multimodal System Prompt Feature

Web2Social allows users to customize the AI’s β€œsystem prompt” β€” the instruction guiding how the model writes.

Users can:

  • 🧾 Type a custom prompt directly in the panel.
  • 🎀 Upload an audio file β€” Web2Social uses on-device speech-to-text to transcribe it into a prompt.

This makes the system multimodal, letting users mix voice and text input seamlessly.

Example:

You record: β€œMake the posts more humorous and include developer jokes.” Web2Social transcribes that, updates the system prompt, and regenerates all outputs accordingly.


🧭 Workflow Overview

[ User opens a webpage ]
        ↓
[ content.js extracts visible text ]
        ↓
[ AI pipeline executes: ]
   β”œβ”€β”€ Summarizer API β†’ extract key points
   β”œβ”€β”€ Writer API β†’ draft script
   β”œβ”€β”€ Rewriter API β†’ improve tone/style
   β”œβ”€β”€ Proofreader API β†’ fix grammar
   β”œβ”€β”€ Scene Planner β†’ break into beats
   β”œβ”€β”€ Translator API β†’ localize if needed
        ↓
[ Social generators create platform posts ]
        ↓
[ Results shown in side panel β†’ user can copy/share/save ]

🧱 Project Structure

web2social/
β”œβ”€β”€ manifest.json           # Chrome Extension Manifest (v3)
β”œβ”€β”€ assets/                 # Icons
└── src/
    β”œβ”€β”€ background.js       # Service worker (side panel logic)
    β”œβ”€β”€ content.js          # Extracts text from current webpage
    β”œβ”€β”€ panel.html          # Side panel UI
    β”œβ”€β”€ panel.css           # UI styling
    β”œβ”€β”€ panel.js            # Orchestrates workflow & history
    └── ai/
        β”œβ”€β”€ summarizer.js
        β”œβ”€β”€ writer.js
        β”œβ”€β”€ rewriter.js
        β”œβ”€β”€ proofreader.js
        β”œβ”€β”€ translator.js
        β”œβ”€β”€ languageDetector.js
        β”œβ”€β”€ speechToText.js
        β”œβ”€β”€ promptMic.js
        β”œβ”€β”€ sessions.js
        β”œβ”€β”€ support.js
        β”œβ”€β”€ scenePlanner.js
        β”œβ”€β”€ social/
        β”‚   β”œβ”€β”€ common.js
        β”‚   β”œβ”€β”€ index.js
        β”‚   β”œβ”€β”€ facebook.js
        β”‚   β”œβ”€β”€ instagram.js
        β”‚   β”œβ”€β”€ linkedin.js
        β”‚   β”œβ”€β”€ pinterest.js
        β”‚   β”œβ”€β”€ reddit.js
        β”‚   β”œβ”€β”€ tikTok.js
        β”‚   β”œβ”€β”€ xThread.js
        β”‚   β”œβ”€β”€ youtubeShort.js

βš™οΈ Technical Details

  • AI Runtime: Chrome globalThis.ai namespace (Gemini Nano).
  • Session Handling: sessions.js caches model instances for speed.
  • Schema Enforcement: requestJsonFromModel() ensures valid structured responses.
  • Fallback Logic: buildFallbackPayload() in common.js guarantees usable output even if AI calls fail.
  • Data Persistence: Chrome storage.local for recent history.
  • UI: HTML5, CSS3, Vanilla JS β€” lightweight, responsive panel.
  • Security: 100% on-device; no network requests during AI processing.

🧭 Example Use Case

Scenario: A team submits a project to the Google Chrome AI Hackathon 2025 and wants to promote it online.

  1. They open their Devpost project page in Chrome.
  2. Click β€œGenerate Social Content” in the Web2Social side panel.
  3. Instantly get:
  • A YouTube Shorts script summarizing the idea.
  • A 3-tweet X thread.
  • A professional LinkedIn announcement.
  • A friendly Facebook post and discussion prompt.
  • A Reddit post ready for community sharing.

All posts match each platform’s audience and tone automatically.


πŸ“ˆ Impact

  • Increases reach of technical and educational content.
  • Saves hours spent manually rewriting posts for different platforms.
  • Enables developers, educators, startups, and creators to amplify their work.
  • Demonstrates how Chrome’s on-device AI can empower real-world productivity tools.

🏁 Conclusion

Web2Social bridges the gap between long-form knowledge and short-form reach. By transforming blogs, hackathon projects, and release notes into social-ready content β€” powered entirely by Chrome’s on-device AI APIs β€” it empowers creators to share ideas faster, smarter, and more broadly.

β€œThe future of sharing knowledge is short, smart, and AI-assisted β€” right inside your browser.”

Built With

Share this project:

Updates