A browser-based knowledge companion for reading, annotation, and question answering with hybrid local-cloud architecture.
Embed AI is a browser extension that enables users to highlight, annotate, and interact with web content and PDFs. The system uses a hybrid architecture combining local-first storage with cloud-based vector search and LLM capabilities.
embed-ai/
├── extension/ # Browser extension (Manifest V3 + Vite)
├── backend/ # FastAPI backend service
├── shared/ # Shared schemas and types
├── docs/ # Architecture Decision Records
└── .github/ # CI/CD workflows
- Framework: Vite + TypeScript
- Storage: IndexedDB (via Dexie.js)
- PDF Processing: PDF.js
- UI: React + TailwindCSS + Lucide Icons
- Testing: Vitest + Testing Library + happy-dom
- Framework: FastAPI (Python 3.11+)
- Vector Database: Pinecone
- Embeddings: BGE / Instructor
- LLM: Llama 3
- Storage: Supabase Storage
- Authentication: Supabase Auth
- Testing: pytest + pytest-asyncio
- Linting: Ruff + mypy
- Platform: GitHub Actions
- Workflows: Separate pipelines for extension and backend
- Coverage: Codecov integration
- Node.js 20+
- Python 3.11+
- Git
cd extension
npm install
npm run dev # Development mode with hot reload
npm run build # Production build
npm test # Run tests
npm run type-check # TypeScript type checkingLoading the extension in Chrome:
- Build the extension:
npm run build - Navigate to
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked" and select the
distdirectory
cd backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements-dev.txt
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000API Documentation:
- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc
cd extension
npm test # Run all tests
npm run test:watch # Watch mode
npm run test:ui # UI modecd backend
source venv/bin/activate
pytest # Run all tests
pytest backend_tests/unit/ # Unit tests only
pytest --cov=app # With coverageThe project uses GitHub Actions for continuous integration and deployment:
- Extension CI: Type checking, testing, and building on every PR/push
- Backend CI: Linting, type checking, unit tests, and integration tests
- Path-based triggers: Workflows only run when relevant code changes
For detailed CI/CD setup instructions, see CICD_SETUP.md.
Create a .env file in the backend directory:
SUPABASE_URL=your_supabase_url
SUPABASE_ANON_KEY=your_supabase_anon_key
PINECONE_API_KEY=your_pinecone_api_key
PINECONE_INDEX_NAME=your_index_nameSee backend/.env.example for all available options.
- Text Highlighting: Select and highlight text on web pages and PDFs
- Note Taking: Attach structured notes to highlights with metadata
- Local-First Storage: IndexedDB for offline-first data persistence
- PDF Support: Read and annotate PDFs directly in the browser
- Cloud Sync: Optional synchronization for multi-device access
- Question Answering: Semantic search with LLM-powered responses
| Action | Windows/Linux | macOS |
|---|---|---|
| Create Highlight | Ctrl + Shift + L |
Cmd + Shift + L |
| Open Side Panel | Ctrl + Shift + K |
Cmd + Shift + K |
Contributions are welcome. Please ensure:
- All tests pass before submitting PRs
- Code follows existing style conventions
- New features include appropriate tests
- Documentation is updated as needed
TBD