Skip to content

snailfrying/flowers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

20 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

๐ŸŒธ Flowers

An intelligent browser extension for AI-powered translation, polishing, note-taking, and knowledge management

License Platform TypeScript React Node.js

English | ็ฎ€ไฝ“ไธญๆ–‡


๐Ÿ“บ Demo

flowers_8mb.mp4

Experience the seamless AI-powered workflow of Flowers


โœจ Features

๐ŸŽฏ Core Capabilities

Feature Description
๐ŸŒ Smart Translation Context-aware translation with editable terminology
โœจ AI Polish Professional text refinement with multiple tone options
๐Ÿ“ Note Generation Auto-generate structured notes from web content
๐Ÿ’ฌ RAG-Powered Chat Ask questions grounded in your personal knowledge base
๐Ÿ“„ PDF Translation Select and translate text directly within PDF documents
๐Ÿ–ผ๏ธ Image OCR Right-click images to extract text via LLM Vision, then translate/polish/notes
๐ŸŽฌ Video Subtitle Translation Real-time AI translation of video subtitles (YouTube, etc.)
๐ŸŒ Full Page Translation Bilingual comparison mode with technical content protection
๐ŸŽจ Customizable Prompts Edit and manage AI prompts for each workflow

๐Ÿš€ Highlights

  • Popup on Selection - Instant AI tools when you highlight text
  • Image OCR - Right-click any image to extract text with Vision models (GPT-4o, Gemini, Claude, etc.)
  • PDF Support - Built-in PDF reader with full translation capabilities and professional toolbar
  • Multi-Provider Support - Connect to OpenAI, Ollama, DeepSeek, DashScope, Anthropic, Google, and more
  • Custom Prompts - Full control over AI behavior for each workflow
  • Side Panel Workspace - Integrated chat, notes, and settings
  • Local-First & Privacy - All notes and settings are stored locally in your browser. No data collection, no tracking.
  • Extensible Architecture - Plugin-based system for custom AI workflows
  • Language-Aware Prompts - Smart prompt switching ensures AI output matches your preferred UI language
  • Bilingual Comparison - Professional-grade full-page translation with technical content protection

๐Ÿ”ง Flexible Configuration

๐Ÿ’ก The core strength of Flowers is its configurability. Adapt the extension to your exact needs.

Multi-Provider Support

Flowers supports a wide range of LLM providers out of the box:

Provider Type Notes
OpenAI Cloud GPT-4o, GPT-4, GPT-3.5-turbo
Ollama Local Run models locally with full privacy
DeepSeek Cloud Cost-effective high-quality models
DashScope Cloud Alibaba Cloud Qwen models
Anthropic Cloud Claude models
Google Cloud Gemini models
Any OpenAI-Compatible Custom LM Studio, vLLM, LocalAI, etc.

Configuration is simple:

  1. Go to Settings โ†’ Model Configuration
  2. Add a new provider with Base URL, API Key, and model list
  3. Select your preferred Chat Model and Embedding Model
  4. Save and start using!

Custom Prompts

Every AI workflow (Translation, Polish, Note Generation, Chat, Image OCR) uses customizable system prompts:

  • Edit prompts to match your domain or writing style
  • Language-aware switching ensures output matches your UI language
  • Full prompt visibility - see exactly what the AI receives

Go to Settings โ†’ Prompt Management to customize.


๐Ÿ“ธ Screenshots

๐Ÿ’ก Tip: Watch the Demo Video above for a comprehensive walkthrough of all features.

๐ŸŒ Smart Translation

Select any text on a webpage and instantly translate it with context-aware AI translation.

Translation Feature
๐Ÿ“„ PDF Translation

Open any PDF in the built-in Flowers PDF Reader. Select text to translate, polish, or generate notes - just like on regular web pages.

  • Automatic PDF redirect to Flowers reader (including GitHub/GitLab blob URLs)
  • Professional toolbar: download, print, search, fullscreen, zoom, dark mode, page jump
  • Full popover functionality (translate, polish, notes, ask)
  • Pin, drag, and position the popover anywhere
  • Lazy loading for long documents
๐Ÿ–ผ๏ธ Image OCR

Right-click any image and choose Extract Text (Flowers) to extract text using a Vision Language Model.

  • Requires a VLM (e.g. GPT-4o, Claude 3, Gemini 3 Flash)
  • Extracted text flows into the same popover for translate, polish, notes, or ask
  • Customizable ocr_system and ocr_user prompts in Settings โ†’ Prompt Management
๐ŸŒ Full Page Translation

Translate entire webpages into a bilingual comparison format with:

  • ๐Ÿ›ก๏ธ Technical Content Protection - Skips code, math, diagrams
  • ๐Ÿง  Context-Aware Batching - Optimized API usage
  • ๐Ÿ’‰ Non-Intrusive Injection - Preserves page functionality
Full Page Translation
๐ŸŽฌ Video Subtitle Translation

Real-time video subtitle translation with intelligent batching and caching.

Video Subtitle Translation

Supported Platforms: YouTube (DOM & TextTrack), Generic (TextTrack)

๐Ÿ’ฌ RAG Chat & ๐Ÿ“ Notes Chat Interface Notes Management

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                     Browser Extension                    โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚   Selection UI   โ”‚   Workspace      โ”‚   API Bridge      โ”‚
โ”‚   PDF Viewer     โ”‚   Image OCR      โ”‚                   โ”‚
โ”‚   Video Trans    โ”‚   Full Page      โ”‚                   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚                  โ”‚                   โ”‚
         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                            โ”‚
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚  Backend Layer โ”‚
                    โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
                    โ”‚  โ€ข LLM Client  โ”‚
                    โ”‚  โ€ข RAG Engine  โ”‚
                    โ”‚  โ€ข Storage     โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿš€ Quick Start

Prerequisites

  • Node.js >= 18.0.0
  • npm or pnpm
  • OpenAI-compatible API key

Installation

# Clone
git clone https://github.com/snailfrying/flowers.git
cd flowers

# Install dependencies
cd backend && npm install
cd ../frontend && npm install

# Configure API keys
cp backend/env.yaml.example backend/env.yaml
# Edit backend/env.yaml with your API key

# Build
cd backend && npm run build
cd ../frontend && npm run build

# Load in browser
# 1. Open chrome://extensions/
# 2. Enable "Developer mode"
# 3. Click "Load unpacked"
# 4. Select frontend/dist/ directory

๐Ÿ“– Usage

Text Selection Tools

  1. Highlight any text on a webpage (or PDF)
  2. The Flowers popover appears automatically
  3. Choose: Translate | Polish | Generate Note | Ask AI

Image OCR

  1. Right-click any image on a webpage
  2. Select Extract Text (Flowers)
  3. OCR result appears in the popoverโ€”then translate, polish, or generate notes
  4. Requires a Vision model (e.g. GPT-4o, Claude 3, Gemini 3 Flash) in Settings โ†’ Model Config

PDF Documents

PDFs are automatically opened in the Flowers PDF Reader with full translation support.

Side Panel Workspace

Click the Flowers extension icon to access:

  • ๐Ÿ’ฌ Chat - Converse with AI using your knowledge base
  • ๐Ÿ“ Notes - Browse and manage your notes
  • โš™๏ธ Settings - Configure models, prompts, and preferences

๐Ÿ› ๏ธ Development

Project Structure

flowers/
โ”œโ”€โ”€ backend/              # AI orchestration layer
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ agent/        # Workflow nodes
โ”‚   โ”‚   โ”œโ”€โ”€ services/     # LLM, RAG, prompts
โ”‚   โ”‚   โ””โ”€โ”€ storage/      # Data persistence
โ”‚
โ”œโ”€โ”€ frontend/             # Browser extension UI
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/   # React components
โ”‚   โ”‚   โ”œโ”€โ”€ background/   # Service worker
โ”‚   โ”‚   โ”œโ”€โ”€ content/      # Content scripts
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ video/    # Video subtitle translation
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ fullpage/ # Full page translation
โ”‚   โ”‚   โ”œโ”€โ”€ pages/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ pdf-viewer/  # PDF reader
โ”‚   โ”‚   โ””โ”€โ”€ sidepanel/    # Main workspace

Development Mode

cd backend && npm run dev    # Backend (watch mode)
cd frontend && npm run dev   # Frontend (with HMR)

๐Ÿค Contributing

We welcome contributions! See CONTRIBUTING.md for details.


๐Ÿ“‹ Roadmap

  • Firefox extension support
  • Local LLM integration (Ollama, LM Studio)
  • Prompt version control
  • Advanced RAG features
  • Mobile companion app

โ“ FAQ

Q: Is my data sent to external servers?

A: Only AI API calls are sent externally. All notes and settings are stored locally in your browser.

Q: Can I use this with local LLMs?

A: Yes! Configure any OpenAI-compatible API endpoint. Works with Ollama, LM Studio, etc.

Q: How do I customize prompts?

A: Go to Settings โ†’ Prompt Management to edit system prompts for each workflow.

Q: Image OCR says it failedโ€”what model do I need?

A: Image OCR requires a Vision Language Model (VLM). Configure one in Settings โ†’ Model Config (e.g. GPT-4o, Claude 3, Gemini 3 Flash). If the model doesn't support images, the API will return an error.


๐Ÿ“„ License

Personal Use Non-Commercial License - See LICENSE for details.


๐Ÿ“ž Contact & Support


Star History Chart

Made with ๐Ÿ’œ by the Flowers Team

โฌ† Back to Top

About

An intelligent browser extension for AI-powered translation, polishing, note-taking, and knowledge management

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors