Skip to content

The playground for all API supported by Chrome AI and Gemini Nano, making it the most comprehensive and user-friendly platform available.

License

Notifications You must be signed in to change notification settings

oslook/chrome-ai-playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

25 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Chrome AI Playground πŸš€

The most comprehensive and user-friendly platform for exploring Chrome's built-in AI capabilities powered by Gemini Nano.

License: MIT Node.js Version Chrome Version Next.js TypeScript Tailwind CSS Vercel PRs Welcome GitHub stars GitHub forks

Experience the future of web AI with client-side processing, enhanced privacy, and lightning-fast performance. Our playground features modern UI design, comprehensive API coverage, and detailed setup guides.

Chrome AI Playground

✨ Key Highlights

  • 🎯 Complete API Coverage - All Chrome AI APIs including stable and experimental features
  • πŸ”’ Privacy-First - Client-side processing ensures your data never leaves your device
  • ⚑ Lightning Fast - Near-instant AI responses with hardware acceleration
  • 🎨 Modern UI - Beautiful, responsive design with dark/light theme support
  • πŸ“š Comprehensive Guides - Step-by-step setup instructions for all API levels
  • 🌐 SEO Optimized - Structured data and meta tags for better discoverability

πŸš€ Features

Core AI Capabilities

  • 🌐 Smart Translation - Real-time translation with automatic language detection
  • πŸ“ AI Summarization - Transform long texts into concise summaries (4 types available)
  • πŸ’¬ Prompt Playground - Natural language interaction with Gemini Nano
  • ✍️ Content Writer - AI-powered content generation with context awareness
  • πŸ”„ Text Rewriter - Intelligent text refinement and tone adjustment

Advanced Features

  • 🧠 Language Detection - Automatic language identification (integrated in translation)
  • 🎯 Multiple Summary Types - Key-points, TL;DR, Teaser, and Headline summaries
  • πŸ“Š Real-time Processing - Live streaming for longer content
  • βš™οΈ Customizable Options - Length, format, and context controls
  • πŸ“± Responsive Design - Perfect experience on all devices

Developer Tools

  • πŸ“– Complete Documentation - Detailed API guides and examples
  • πŸ”§ Setup Assistant - Hardware requirements and configuration help
  • πŸŽ›οΈ API Status Dashboard - Real-time availability monitoring
  • πŸ› Troubleshooting - Common issues and solutions

πŸ› οΈ Tech Stack

  • Framework: Next.js 14 with App Router
  • Frontend: React 18 with TypeScript
  • Styling: Tailwind CSS with custom design system
  • UI Components: Radix UI + Shadcn/UI
  • Icons: Lucide React
  • Theme: next-themes for dark/light mode
  • Analytics: Vercel Analytics
  • Deployment: Vercel (optimized for static export)

πŸš€ Quick Start

Prerequisites

  • Browser: Chrome 138+ (recommended) or Chrome Canary
  • Node.js: 18.0 or later
  • Hardware: GPU with 4GB+ VRAM (recommended)

Installation

# Clone the repository
git clone https://github.com/oslook/chrome-ai-playground.git
cd chrome-ai-playground

# Install dependencies
npm install

# Start development server
npm run dev

Visit http://localhost:3000 to explore the playground!

βš™οΈ Chrome Setup

For the best experience, enable Chrome AI features:

  1. Open Chrome and navigate to chrome://flags
  2. Enable: #optimization-guide-on-device-model
  3. Enable: #translation-api and #summarization-api-for-gemini-nano
  4. Restart Chrome

πŸ“– Detailed Setup Guide: Visit our Setup Guide for complete instructions.

🌐 API Status & Browser Support

Current API Availability

API Status Chrome Version Access Level
Translator API βœ… Stable 138+ Public
Language Detector API βœ… Stable 138+ Public
Summarizer API βœ… Stable 138+ Public
Prompt API βœ… Stable 138+ Public
Writer API πŸ”Ά Origin Trial 138+ Registration Required
Rewriter API πŸ”Ά Origin Trial 138+ Registration Required
Proofreader API 🟣 EPP Only 139+ (Canary) Early Preview Program

Browser Compatibility

  • βœ… Chrome 138+ (Recommended) - Full stable API support
  • βœ… Chrome Canary - Latest experimental features
  • ❌ Edge, Firefox, Safari - Not supported (Chrome-only APIs)

Hardware Requirements

  • OS: Windows 10/11, macOS 13+, Linux, ChromeOS
  • Storage: 22GB+ free space
  • GPU: 4GB+ VRAM (recommended)
  • Network: Unmetered connection for model downloads

πŸ“ Project Structure

chrome-ai-playground/
β”œβ”€β”€ app/                          # Next.js App Router
β”‚   β”œβ”€β”€ components/              # Client components
β”‚   β”‚   └── HomeClient.tsx      # Homepage client component
β”‚   β”œβ”€β”€ globals.css             # Global styles & CSS variables
β”‚   β”œβ”€β”€ guide/                  # Setup guide page
β”‚   β”œβ”€β”€ layout.tsx              # Root layout with SEO
β”‚   β”œβ”€β”€ page.tsx                # Homepage with metadata
β”‚   β”œβ”€β”€ prompt/                 # Prompt playground
β”‚   β”œβ”€β”€ summarize/              # AI summarization
β”‚   β”œβ”€β”€ translate/              # Translation with detection
β”‚   └── writer/                 # Content writing
β”œβ”€β”€ components/                  # Reusable components
β”‚   β”œβ”€β”€ navigation.tsx          # Main navigation
β”‚   β”œβ”€β”€ theme-provider.tsx      # Theme management
β”‚   └── ui/                     # UI component library
β”œβ”€β”€ hooks/                      # Custom React hooks
β”œβ”€β”€ lib/                        # Utilities & helpers
└── public/                     # Static assets & images

🀝 Contributing

We welcome contributions to make Chrome AI Playground even better! Here's how you can help:

Ways to Contribute

  • πŸ› Bug Reports - Found an issue? Open an issue
  • πŸ’‘ Feature Requests - Have an idea? Start a discussion
  • πŸ”§ Code Contributions - Help improve the codebase
  • πŸ“š Documentation - Improve guides and documentation
  • 🎨 UI/UX - Enhance the user experience

Development Workflow

  1. Fork & Clone

    git clone https://github.com/your-username/chrome-ai-playground.git
    cd chrome-ai-playground
  2. Setup Development Environment

    npm install
    npm run dev
  3. Create Feature Branch

    git checkout -b feature/your-feature-name
  4. Make Changes & Test

    • Follow our coding standards
    • Test on Chrome 138+
    • Ensure responsive design works
  5. Submit Pull Request

    • Write clear commit messages
    • Update documentation if needed
    • Reference related issues

Development Guidelines

  • 🎯 Code Quality: Follow TypeScript best practices
  • 🎨 UI Consistency: Use our design system and CSS variables
  • πŸ“± Responsive: Ensure mobile-first approach
  • β™Ώ Accessibility: Follow WCAG guidelines
  • πŸš€ Performance: Optimize for fast loading and smooth interactions

πŸ“„ License

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

πŸ™ Acknowledgments

Core Technologies

  • Chrome AI Team - For pioneering built-in AI APIs
  • Gemini Nano - Advanced AI models powering the experience
  • Google AI - For making AI accessible to web developers

Open Source Ecosystem

  • Next.js - The React framework for production
  • Tailwind CSS - Utility-first CSS framework
  • Radix UI - Accessible component primitives
  • Shadcn/UI - Beautiful component library
  • Lucide - Beautiful icon library

Community

  • Early Adopters - For testing and feedback
  • Contributors - For code improvements and features
  • Chrome Developer Community - For inspiration and support

πŸ“‹ Changelog

[v2.0.0] - 2025-09-02

πŸš€ Major Features

  • Complete UI/UX Redesign: Modern glassmorphism design with gradient backgrounds and smooth animations
  • SEO Optimization: Comprehensive meta tags, structured data (JSON-LD), and improved accessibility
  • API Updates: Full upgrade to latest Chrome AI APIs (Chrome 138+)
  • Streaming Support: Real-time content generation across all AI features
  • Session Management: Persistent conversations with context awareness

🎨 UI/UX Improvements

  • Modern Design System: Glassmorphism effects, backdrop blur, and gradient overlays
  • Responsive Layout: Optimized for desktop, tablet, and mobile devices
  • Dark/Light Theme: Complete theme support with system preference detection
  • Interactive Elements: Hover effects, loading states, and smooth transitions
  • Accessibility: WCAG compliant with proper ARIA labels and keyboard navigation

πŸ”§ API Enhancements

  • Translator API: Integrated language detection, streaming translation, and model download progress
  • LanguageModel API: Conversational AI with customizable temperature/top-k parameters
  • Writer API: Content generation with tone, format, and length controls
  • Rewriter API: Text refinement with shared context and streaming output
  • Summarizer API: Multiple summary types with real-time processing

πŸ“š Documentation

  • Comprehensive README: Detailed setup guides, API status, and browser compatibility
  • Setup Assistant: Step-by-step Chrome configuration instructions
  • API Documentation: Complete API reference with examples and best practices
  • Troubleshooting Guide: Common issues and solutions

πŸ› οΈ Technical Improvements

  • Next.js 14: Latest App Router with improved performance
  • TypeScript: Enhanced type safety and developer experience
  • Component Architecture: Modular, reusable components with consistent design
  • Performance: Optimized loading, reduced bundle size, and efficient rendering
  • Error Handling: Comprehensive error boundaries and user-friendly messages

🎯 Feature Highlights

  • Smart Translation: Automatic language detection with manual override
  • AI Prompt Playground: Interactive conversation with Gemini Nano
  • Content Writer: Customizable content generation with context awareness
  • Text Rewriter: Intelligent text refinement and tone adjustment
  • Real-time Processing: Live streaming for all AI operations
  • Progress Tracking: Download progress and generation status
  • Copy/Share: One-click copy and export functionality

πŸ“Š API Status Dashboard

  • Real-time Monitoring: Live API availability status
  • Browser Compatibility: Chrome version requirements and support matrix
  • Hardware Requirements: GPU, storage, and system specifications
  • Origin Trial Tracking: Experimental API registration status

πŸ”’ Privacy & Security

  • Client-side Processing: All AI operations performed locally
  • No Data Transmission: User content never leaves the device
  • Secure Implementation: Proper error handling and resource cleanup
  • Origin Trial Compliance: Registered for experimental APIs

πŸ“± Mobile Experience

  • Touch Optimized: Mobile-first responsive design
  • Gesture Support: Swipe gestures and touch interactions
  • Performance: Optimized for mobile devices and slower connections
  • Offline Support: Core functionality works without internet

Built with ❀️ for the future of web AI

🌐 Live Demo β€’ πŸ“– Documentation β€’ πŸ› Report Issues

About

The playground for all API supported by Chrome AI and Gemini Nano, making it the most comprehensive and user-friendly platform available.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published