How anirbannandy/db-vision works
db-vision turns a user’s natural-language request and live page context into a validated browser-action plan, then runs it in the active tab or an optional server-side Playwright browser. The main flow is observe, plan, govern, and execute; sidepanel task controls and page analysis/self-healing are additional capabilities. Backend orchestration and core modules are excerpted; some extension messaging and sandbox implementation details are documented in the README rather than shown in source excerpts.
Main entry points: app.py FastAPI orchestration · sidepanel.js Sidepanel controls · llm_engine.py LLM engine · prompt_builder.py Prompt construction
Components 15
Chrome extension
- Sidepanel controls
extension/sidepanel.js - DOM observation
extension/content.js - Active-tab actions
extension/content.js
Planning backend
- FastAPI orchestration
backend/app.py - Prompt construction
backend/prompt_builder.py - Action validation
backend/action_schema.py - LLM engine
backend/llm_engine.py - Session and task state
backend/session_manager.py - Runtime configuration
backend/config.py
Execution targets
- Active browser tab
- Playwright sandbox
backend - Sandbox browser
Model providers
- Ollama
- Gemini API
Other components
- User
Connections 21
- User → Sidepanel controls: enters request
README.md - Sidepanel controls → DOM observation: requests page context
README.md - DOM observation → Sidepanel controls: returns DOM context
README.md - Sidepanel controls → FastAPI orchestration: submits task
extension/sidepanel.js - FastAPI orchestration → Prompt construction: builds prompts
backend/app.py - Prompt construction → Action validation: uses action reference
backend/prompt_builder.py - FastAPI orchestration → LLM engine: requests plan
backend/app.py - FastAPI orchestration → Action validation: validates actions
backend/app.py - FastAPI orchestration → Session and task state: tracks task state
backend/app.py - LLM engine → Ollama: queries locally
backend/llm_engine.py - LLM engine → Gemini API: queries optionally
backend/llm_engine.py - Runtime configuration → LLM engine: configures providers
backend/llm_engine.py - FastAPI orchestration → Runtime configuration: loads settings
backend/app.py - FastAPI orchestration → Sidepanel controls: returns action plan
README.md - Sidepanel controls → Active-tab actions: dispatches actions
README.md - Active-tab actions → Active browser tab: applies DOM events
extension/content.js - FastAPI orchestration → Playwright sandbox: offers alternate execution
README.md - Playwright sandbox → Sandbox browser: drives browser
README.md - Sidepanel controls → FastAPI orchestration: requests self-healing
extension/sidepanel.js - FastAPI orchestration → Prompt construction: builds repair prompt
backend/app.py - Sidepanel controls → FastAPI orchestration: requests page analysis