React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

🧠 Tweet Assistant AI - React + Vite Chrome Extension

A modern Chrome extension built with React, TypeScript, and Vite for AI-powered tweet generation and replies.

✨ Features

🚀 AI-Powered Tweet Generation

  • Multiple AI Models: Claude 3 (Opus/Sonnet), GPT-4o/5/Mini, Gemini 1.5 Pro
  • Context Menu Integration: Right-click selected text → "Generate Reply with TweetAI"
  • Auto-load Selected Text: Automatically loads selected text into the input field
  • Multiple Tones: Casual 😊, Funny 😂, Savage 😎, Motivational 🚀, Professional 🧑‍💼
  • Adjustable Count: Generate 1-3 tweets at once

🎨 Modern UI/UX

  • Dark Theme: Beautiful dark interface with liquid glass effects
  • Glassmorphism Design: Modern blur effects and translucent elements
  • Responsive Layout: Optimized for Chrome extension popup (380x500px)
  • Smooth Animations: Hover effects and loading states

⚙️ Integrated Settings

  • In-Popup Settings: No separate settings window needed
  • API Key Management: Secure storage for Claude, OpenAI, and Gemini keys
  • Persistent Storage: Settings saved using Chrome's local storage
  • Visual Feedback: Success notifications when saving

🔧 Chrome Extension Features

  • Manifest V3: Latest Chrome extension standard
  • Background Service Worker: Context menu handling
  • Content Script: Insert generated tweets back into web pages
  • Badge Notifications: Visual indicator when text is selected

🛠 Technology Stack

  • Frontend: React 19 + TypeScript
  • Build Tool: Vite 7
  • Styling: Custom CSS with glassmorphism effects
  • Chrome APIs: Storage, Context Menus, Scripting, Active Tab

📦 Installation

Development Setup

  1. Install Dependencies:

    pnpm install
  2. Development Mode:

    pnpm dev
  3. Build for Production:

    pnpm build

Chrome Extension Installation

  1. Build the Extension:

    pnpm build
  2. Load in Chrome:

    • Open Chrome and go to chrome://extensions/
    • Enable "Developer mode" (top right toggle)
    • Click "Load unpacked" and select the dist folder
  3. Setup API Keys:

    • Click the extension icon in Chrome toolbar
    • Click "⚙️ Settings" to expand settings panel
    • Add your API keys for Claude, OpenAI, and/or Gemini
    • Click "💾 Save Keys"

🚀 Usage

Generate Tweet Replies

  1. Select text on any webpage (tweet, article, etc.)
  2. Right-click and choose "🧠 Generate Reply with TweetAI"
  3. Click extension icon - selected text auto-loads
  4. Choose tone and count, select AI model
  5. Click "✨ Generate Tweet"
  6. Click "↘️ Insert into page" to add tweet to the webpage

Generate Original Tweets

  1. Click extension icon
  2. Type your topic in the input field
  3. Choose settings and click "✨ Generate Tweet"
  4. Copy or insert the generated tweet

You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:

// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default tseslint.config([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...
      // Enable lint rules for React
      reactX.configs['recommended-typescript'],
      // Enable lint rules for React DOM
      reactDom.configs.recommended,
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])