A powerful browser extension that provides instant AI assistance directly in your browser. Highlight text, capture screen areas with OCR, or use voice input to get AI-powered answers without leaving your current tab.
- Text Selection: Right-click any selected text to get AI analysis
- Screen Capture with OCR: Select any area of your screen and extract text for AI processing
- Voice Input: Use speech recognition for hands-free queries
- Floating Chat: Resizable, dockable chat interface that works on any website
- Dark/Light Theme: Toggle between themes with automatic persistence
- Continuous Conversations: Keep context across multiple queries
- Math Rendering: Supports LaTeX math expressions
- Code Highlighting: Syntax highlighting for code blocks
- Cross-Platform: Works on Chrome, Edge, and other Chromium-based browsers
-
Clone the Extension
git clone https://github.com/SakethSripada/ClickAI.git cd clickai npm install -
Build the Extension
npm run build
-
Load Unpacked Extension
- Open Chrome and navigate to
chrome://extensions/ - Enable "Developer mode" in the top right
- Click "Load unpacked" and select the
distfolder - Pin the extension to your toolbar for easy access
- Open Chrome and navigate to
- Fork this repository
- Connect your GitHub account to Railway
- Create a new project and deploy from your forked repository
- Set the following environment variables in Railway:
OPENAI_API_KEY: Your OpenAI API keyEXTENSION_SECRET: A secure random string (32+ characters)PORT: 5010 (or leave empty for Railway's default)
- Install the Heroku CLI
- Create a new Heroku app:
heroku create your-app-name
- Set environment variables:
heroku config:set OPENAI_API_KEY=your_openai_api_key heroku config:set EXTENSION_SECRET=your_secure_secret_string
- Deploy:
git subtree push --prefix server heroku main
-
Direct Node.js Deployment
cd server npm install npm start -
Docker Deployment
cd server docker build -t clickai-server . docker run -p 5010:5010 --env-file .env clickai-server
Create a .env file in both the root directory and the server directory:
EXTENSION_SECRET=your_secure_random_string_here
BASE_URL=your-deployed-server-url.com
OPENAI_API_KEY=sk-proj-your_openai_api_key_here
EXTENSION_SECRET=your_secure_random_string_here
PORT=5010
- OPENAI_API_KEY: Get this from OpenAI's platform
- EXTENSION_SECRET: A secure random string (32+ characters) that authenticates requests between the extension and server
- BASE_URL: Your deployed server's URL (without
https://or trailing slash) - PORT: Server port (default: 5010)
# Option 1: Using Node.js
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
# Option 2: Using OpenSSL
openssl rand -hex 32
# Option 3: Online generator
# Visit: https://www.allkeysgenerator.com/Random/Security-Encryption-Key-Generator.aspxclickai/
βββ src/ # Extension frontend source
β βββ Components/ # React components
β β βββ AIResponseAlert.jsx # Main chat interface
β β βββ ChatHeader.jsx # Header with controls
β β βββ ChatContent.jsx # Message display area
β β βββ ChatFooter.jsx # Input area
β β βββ SnippingTool.jsx # Screen capture tool
β β βββ PromptBox.jsx # Additional prompt input
β β βββ MessageBubble.jsx # Individual message display
β β βββ CodeBlock.jsx # Code syntax highlighting
β βββ utils.js # Utility functions
β βββ App.js # Main app component
β βββ index.js # Entry point
βββ public/ # Extension assets
β βββ manifest.json # Extension manifest
β βββ background.js # Background script
β βββ content.js # Content script
β βββ ... # Icons and other assets
βββ server/ # Backend server
β βββ server.js # Express server
β βββ .env # Server environment variables
βββ dist/ # Built extension (generated)
βββ webpack.config.js # Build configuration
βββ zipDist.js # Distribution packaging
βββ package.json # Dependencies and scripts
-
Start the development server:
npm start
-
Start the backend server:
cd server npm install npm start -
Build for production:
npm run build
-
Create distribution package:
node zipDist.js
- Load the unpacked extension in Chrome
- Navigate to any website
- Try these features:
- Right-click selected text β "Ask ClickAI about..."
- Right-click anywhere β "Select area and send to ClickAI"
- Click the extension icon for the popup interface
- Use voice input by clicking the microphone icon
Edit the server's OpenAI integration in server/server.js:
- Adjust temperature for creativity vs consistency
- Modify system prompts
- Change model
- Component styles are in
src/Components/Styles/ - Theme colors can be modified in the Material-UI theme configuration
- Extension icons are in
public/imgs/
The modular architecture makes it easy to add new features:
- Create new React components in
src/Components/ - Add message handlers in
public/background.js - Extend the content script in
public/content.js
The extension communicates with the backend via HTTP POST requests:
// Example API call structure
const response = await fetch(`https://${BASE_URL}/api/chat`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-extension-secret': EXTENSION_SECRET
},
body: JSON.stringify({
messages: conversationHistory,
temperature: 0.7
})
});- All requests are authenticated with a shared secret
- Rate limiting prevents abuse (100 requests per 15 minutes per IP)
- CORS is configured for security
- Helmet.js provides additional security headers
- No sensitive data is stored in the extension
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes and test thoroughly
- Submit a pull request with a clear description
This project is licensed under the MIT License - see the LICENSE file for details.
- Issues: Report bugs or request features on GitHub
- Documentation: Check this README for setup and configuration
- Community: Join our discussions in the GitHub repository
- Support for more AI providers (Claude, Gemini)
- Offline OCR capabilities
- Custom prompt templates
- Integration with productivity tools
- Mobile browser support
Made with β€οΈ for developers who want AI assistance without the hassle