A browser extension that converts webpages into a semantic knowledge graph. Built as a Turborepo monorepo.
- apps/extension - Browser extension (Chrome/Firefox) for capturing web pages
- apps/backend - Python FastAPI service for processing pages, extracting entities/concepts, and building the graph
- apps/dashboard - Next.js dashboard for visualizing the knowledge graph
- packages/shared - Shared TypeScript types
- Bun (for JS/TS packages)
- Python 3.11+ (for backend)
- Docker (for PostgreSQL database)
- OpenAI API key (for LLM and embeddings)
- Install dependencies:
# Install JS/TS dependencies
bun install
# Install Python dependencies
cd apps/backend
uv sync
cd ../..- Set up environment variables (REQUIRED):
cd apps/backend
cp .env.example .env
# Edit .env and add your OPENAI_API_KEY
# Get your API key from: https://platform.openai.com/api-keys- Entity and concept extraction from pages
- Vector embeddings for semantic search
- Start everything:
bun run devThis will:
- Start PostgreSQL database in Docker
- Run database migrations
- Start backend server (http://localhost:8000)
- Start dashboard (http://localhost:3000)
- Start extension in watch mode
If you prefer to start things manually:
# Start database
bun run db:up
# Run migrations
bun run db:migrate
# Start backend
cd apps/backend
uv run uvicorn app.main:app --reload --port 8000
# Start dashboard (in another terminal)
cd apps/dashboard
bun run dev
# Build extension (in another terminal)
cd apps/extension
bun run dev- Build the extension:
cd apps/extension
bun run build- Load in browser:
- Chrome:
chrome://extensions/→ Enable Developer mode → Load unpacked → Selectapps/extension/dist - Firefox:
about:debugging→ This Firefox → Load Temporary Add-on → Selectapps/extension/dist/manifest.json
- Chrome:
- Navigate to any webpage
- Click the extension icon
- Click "Capture" - the page will be:
- Extracted (clean text via Readability)
- Processed (entities/concepts extracted via LLM)
- Embedded (vector embeddings generated)
- Stored (in PostgreSQL graph database)
- View in dashboard at http://localhost:3000
- Search and explore the knowledge graph
.
├── apps/
│ ├── extension/ # Browser extension
│ ├── backend/ # FastAPI backend
│ └── dashboard/ # Next.js dashboard
├── packages/
│ └── shared/ # Shared TypeScript types
├── docker-compose.yml # PostgreSQL + pgvector
├── turbo.json # Turborepo configuration
└── package.json # Root package.json
- Page Capture: Browser extension captures HTML, URL, and timestamp
- Content Extraction: Backend extracts clean article text using Readability
- Entity/Concept Extraction: LLM extracts named entities and abstract concepts
- Embeddings: Vector embeddings for semantic search (OpenAI)
- Graph Storage: PostgreSQL with pgvector for graph storage
- Visualization: Interactive graph visualization in dashboard
- Search: Vector search with graph traversal
bun run dev- Start everything (database + all apps)bun run dev:apps- Start just the apps (assumes DB is running)bun run build- Build all appsbun run db:up- Start databasebun run db:down- Stop databasebun run db:migrate- Run database migrations
Create apps/backend/.env with:
OPENAI_API_KEY=your_key_here
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/memory_webMIT