Skip to content
mellieho9Public

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Wandr

Turn any URL into structured knowledge — automatically.

Wandr is a schema-aware content extraction tool that connects to your existing databases and uses AI agents to automatically extract structured data from YouTube videos, PDFs, and web pages directly into your tables. Instead of generic summaries, Wandr understands your real database schema — turning a cooking video into a recipe record, a travel vlog into destinations and restaurants, or a research paper into structured entries on methods and findings.

No new workspace. No manual data entry. Just organized, searchable knowledge that builds itself in the tools you already use.

Demo

Wandr Demo

Architecture

Wandr is a serverless AI extraction pipeline that processes content asynchronously and writes structured outputs into user databases.

graph TB
    subgraph Client["Client Layer"]
        FE["React 19 + Vite + Tailwind CSS<br/>(Amplify)"]
        EXT["Chrome Extension<br/>(Manifest V3)"]
    end

    subgraph AWS["AWS (Terraform-managed)"]
        APIGW["API Gateway<br/>(HTTP API)"]
        API_LAMBDA["API Lambda<br/>(FastAPI + Mangum)"]
        SQS["SQS Job Queue"]
        DLQ["Dead Letter Queue"]
        WORKER_LAMBDA["Worker Lambda<br/>(Python, 15min timeout)"]
        S3["S3<br/>(Temp video storage)"]
        ECR["ECR<br/>(Container images)"]
        CW["CloudWatch Logs"]
    end

    subgraph AI["AI / Agent Layer"]
        QA["Question Generation Agent<br/>(Gemini Flash)"]
        PG["Prompt Generation Agent<br/>(Gemini 3 Flash Preview)"]
        CE["Content Extraction Agent<br/>(Gemini 3 Flash Preview)"]
        WA["Write Agent<br/>(Gemini Flash)"]
        GT["Grounding Tools<br/>(Google Maps, Google Search)"]
    end

    subgraph External["External Services"]
        SUPABASE["Supabase<br/>(PostgreSQL + Auth + Realtime)"]
        COMPOSIO["Composio<br/>(Notion OAuth + Toolkit)"]
        NOTION["Notion API"]
    end

    FE -- "Auth / API calls" --> APIGW
    EXT -- "Extract requests" --> APIGW
    EXT -. "Auth sync<br/>(postMessage)" .-> FE
    APIGW --> API_LAMBDA
    API_LAMBDA -- "Enqueue job" --> SQS
    SQS -- "Event source mapping<br/>(batch_size=1)" --> WORKER_LAMBDA
    SQS -- "After 3 retries" --> DLQ
    WORKER_LAMBDA --> CE
    CE --> WA
    CE -. "Optional" .-> GT
    WA -- "Write extracted data" --> COMPOSIO
    COMPOSIO --> NOTION
    API_LAMBDA -- "Onboarding" --> QA
    API_LAMBDA -- "Config generation" --> PG
    API_LAMBDA --> SUPABASE
    WORKER_LAMBDA --> SUPABASE
    FE -- "Realtime subscriptions<br/>(postgres_changes)" --> SUPABASE
    WORKER_LAMBDA --> S3
    ECR -. "Container images" .-> API_LAMBDA
    ECR -. "Container images" .-> WORKER_LAMBDA
    API_LAMBDA --> CW
    WORKER_LAMBDA --> CW
Loading

How it works

Onboarding: Users connect their Notion workspace via OAuth (Composio) and select target databases. The system fetches the live schema and runs a Question Generation Agent to ask 3–8 clarifying questions about intent. A Prompt Generation Agent then creates a frozen ExtractionConfig — an immutable bundle containing the extraction prompt, output schema, field mappings, and required grounding tools.

Extraction: When a URL is submitted (via Chrome extension or web app), the API Lambda creates a job in Supabase and enqueues it to SQS. The Worker Lambda runs a LoopAgent (Google ADK) orchestrating two sub-agents:

  1. Content Extraction Agent — processes YouTube videos, PDFs, or web pages using Gemini's multimodal capabilities, optionally calling Google Maps or Google Search for grounding, and outputs JSON matching the user's schema.
  2. Write Agent — validates extracted data against the schema and writes to Notion via Composio. If validation fails, it auto-fixes or requests re-extraction (up to 2 retries).

Schema drift: Composio webhooks notify the backend when a user modifies their Notion database structure, triggering automatic config regeneration using stored answers — no manual reconfiguration needed.

Tech Stack

Layer Technology
Frontend React 19 + Vite + Tailwind CSS (Amplify)
Chrome Extension Manifest V3
API Server FastAPI on Lambda via Mangum (API Gateway HTTP API)
Job Queue SQS + Lambda (event source mapping, batch_size=1)
Dead Letter Queue SQS (14-day retention, after 3 retries)
Database Supabase (PostgreSQL + Auth + Realtime)
AI/Agents Gemini 3 Flash Preview + Gemini Flash via Google ADK (LoopAgent)
Grounding Google Maps + Google Search (ADK tools)
Integrations Composio (Notion OAuth + toolkit)
Infrastructure Terraform (AWS), fully serverless
Container Registry AWS ECR
Monitoring CloudWatch Logs (30-day retention)

Components

  • Frontend — React SPA with Tailwind CSS. Handles onboarding (connect database, configure schemas) and a real-time dashboard to monitor extraction jobs.
  • Chrome Extension — Manifest V3 extension. Triggers extraction on any YouTube video, PDF, or web page directly from the browser. Auth synced from the web app via postMessage.
  • API Lambda — FastAPI + Mangum. Handles auth, onboarding agents, job creation, and SQS enqueueing.
  • Worker Lambda — Runs the ADK LoopAgent for content extraction and Notion writes. 15-minute timeout, 2GB memory.
  • Supabase — PostgreSQL for job/schema storage, Auth for Google OAuth, Realtime for live job status updates.
  • Composio — Manages per-user Notion OAuth lifecycle and provides versioned Notion API actions.

Prerequisites

  • Python 3.11+
  • Node.js 18+
  • Google Chrome (for the extension)

Environment Variables

Create a backend/.env file with the following keys:

# Supabase (https://supabase.com — create a project)
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_KEY=your-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key

# Google Gemini API (https://aistudio.google.com/apikey)
GOOGLE_API_KEY=your-google-api-key
GOOGLE_GENAI_USE_VERTEXAI=FALSE

# Composio (https://composio.dev — for Notion integration)
COMPOSIO_API_KEY=your-composio-api-key

Where to get each key

Key Where
SUPABASE_URL Supabase dashboard → Settings → API → Project URL
SUPABASE_KEY Supabase dashboard → Settings → API → anon public key
SUPABASE_SERVICE_ROLE_KEY Supabase dashboard → Settings → API → service_role key
GOOGLE_API_KEY Google AI Studio → Create API key
COMPOSIO_API_KEY Composio → Settings → API Keys

Supabase Setup

Your Supabase project needs Google OAuth enabled:

  1. Go to Supabase dashboard → Authentication → Providers → Google
  2. Enable Google provider and add your Google OAuth client ID / secret
  3. Set the redirect URL to http://localhost:8000/auth/oauth/callback

Running the Backend

cd backend
pip install -r requirements.txt
uvicorn app:app --reload

The API server starts at http://localhost:8000.

Running the Frontend

cd frontend
npm install
npm run dev

The frontend starts at http://localhost:5173.

Loading the Chrome Extension

  1. Open chrome://extensions in Google Chrome
  2. Enable Developer mode (toggle in the top-right corner)
  3. Click Load unpacked
  4. Select the extension/ folder from this repo
  5. Navigate to any YouTube video and click the wandr extension icon to extract data

Usage Flow

  1. Sign in — Open http://localhost:5173 and sign in with Google
  2. Connect a database — Link your Notion workspace via Composio
  3. Select schemas — Choose which Notion databases to use as extraction targets
  4. Configure extraction — Answer questions to fine-tune what data gets extracted
  5. Extract — Go to a YouTube video, open the wandr Chrome extension, and click Extract
  6. View results — Check the dashboard for job status and extracted data

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages