MCP26toolsDIM768HNSWm=16RRF60/40

Structured knowledge from every web design

Layout analysis, motion detection, and quality evaluation — indexed as searchable patterns across 26 MCP tools with sub-millisecond search.

10.66ms
search latency
768d
vector dimensions
27
database models
16
search indexes
Scroll to explore
Chapter I

What we analyze

7 analysis domains
analyze any site with MCP tools
structured data + vector embeddings
01domain
Structure
section classification

Layout Analysis

Every webpage has structure. Hero sections, feature grids, CTAs, pricing tables, footers -- Reftrix classifies each by type and encodes them as searchable vector embeddings. Query your own analyzed sites with sub-millisecond semantic retrieval.

hero / feature / cta / testimonial / pricing / footer / navigation / gallery -- classified via multilingual ML model, similarity search at < 11ms

Stored as 768D vector embeddings in pgvector
02domain
Motion
animation capture

Motion Detection

CSS transitions, JS animation libraries, and WebGL shaders -- three detection channels capture every animation on a page. Duration, easing curve, trigger condition, and library origin are all recorded.

CSS + JS + WebGL detection channels -- 15px/frame capture at 30fps -- GSAP / Framer Motion / anime.js / Three.js / Lottie detection

Easing curves, durations, and triggers indexed
03domain
Layers
background extraction

Background Analysis

Gradients, textures, and color fields extracted from every layer. Seven distinct background types cataloged from inline styles, stylesheet sources, and external CSS -- each encoded for pattern matching.

solid / linear / radial / mesh / conic / image / glassmorphism -- extracted from inline styles + <style> tags + external CSS

Design types and CSS values persisted to DB
04domain
Mood
narrative profiling

Design Narrative

Every design conveys intent. Professional gravitas, playful energy, minimal clarity -- mood, tone, and emotional register are classified into sixteen distinct profiles via AI vision analysis and CSS heuristics.

16 mood categories (professional / playful / premium / tech / organic / minimalist / bold / elegant / artistic / trustworthy / ...) -- Vision LLM + CSS analysis

Mood profiles stored as structured data
05domain
Vision
photogrammetry

Visual Intelligence

Screenshots become searchable vectors. DINOv2 ViT-B/14 encodes each section and part as a 768-dimensional visual embedding -- enabling 'find by appearance' queries that text search cannot match.

DINOv2 ViT-B/14 visual embedding (768D L2-normalized) -- section + part dual embeddings -- cosine similarity with HNSW indexing

Visual embeddings alongside text embeddings
06domain
Parts
specimen collection

Part Decomposition

Buttons, headings, images, navigation bars, forms -- each UI element is extracted, classified into 16 part types, and dual-embedded with both text and visual vectors for precision component search.

16 part types (button / heading / image / navigation / card / form / icon / link / footer / ...) -- text + visual dual embedding -- boundingBox + computedStyles

12,784 parts extracted across analyzed sites
07domain
Responsive
cross-section survey

Responsive Mapping

Every site renders differently at 375px, 768px, and 1440px. Multi-viewport screenshots are captured, Pixelmatch computes visual diffs, and layout shifts are quantified across breakpoints.

3 viewports (375 / 768 / 1440) -- Pixelmatch perceptual diff -- layout shift detection -- breakpoint classification

Cross-viewport comparison with visual diffs

Run page.analyze on any URL. Reftrix extracts layout structure, motion patterns, background designs, and design narratives -- encoding each as a 768-dimensional vector embedding for semantic similarity search. All data persisted to PostgreSQL + pgvector with HNSW indexing.

768
dimensions
<11ms
P95 search
27
DB models
26
MCP tools
Chapter II

Visual intelligence

find by appearance
DINOv2 + text dual embedding

Every section and UI part is captured, cropped, and processed through DINOv2 ViT-B/14 to produce a 768-dimensional visual embedding -- enabling similarity search by appearance, not just text.

visual
search mode

Find by appearance

Upload or describe a visual pattern. Reftrix searches across all analyzed sections using cosine similarity on DINOv2 embeddings, returning visually similar designs regardless of their text content.

60/40
vector / full-text

Hybrid RRF search

Combine visual and text signals with Reciprocal Rank Fusion. 60% vector weight and 40% full-text weight produce results that match both appearance and semantic meaning.

0.8
confidence threshold

Preference profiling

As you provide feedback on search results, Reftrix learns your design preferences. A 2-factor confidence model reranks future results based on mood category coverage and interaction history.

Part-level precision

Every UI element is extracted and classified into 16 part types. Each part carries dual embeddings -- text and visual -- for precision search. Compare styles, layout, interaction, and accessibility across parts.

16
part types
12,784
parts extracted
dual
embeddings
button
heading
image
navigation
card
form
icon
link
input
hero-image
logo
badge
avatar
video
divider
footer
Chapter III

The instruments

Model Context Protocol
14 tools / 3 categories / Claude integration
input validation / stdio transport

The Theodolite
1 / 3 in analysis14 tools / 3 categories / 26 MCP endpoints
THEODOLITE

Unified analysis in a single pass. Extracts layout structure, motion patterns, background designs, and quality scores simultaneously. AI vision analysis for scroll-based design detection is enabled by default. Supports async mode for heavy sites and auto_timeout adjusts to page complexity.

reftrix mcp-server
$// Full-Page Analyzer
1await page.analyze({
2 url: "https://example.com",
3 layoutOptions: { useVision: true },
4 features: {
5 layout: true,
6 motion: true,
7 quality: true
8 }
9});
OUTPUT
-->sections: 24, motions: 87, backgrounds: 12, quality: 89/100
Chapter IV

From raw HTML to searchable patterns

Five phases transform unstructured web pages into a searchable vector space -- capture, map, observe, interpret, and index across 27 database models, 16 search indexes, and 768-dimensional dual embeddings.

0

Capture

Playwright + lazy scroll

27
DB models

Playwright captures full-page HTML and screenshots. Lazy scroll triggers IntersectionObserver-based loading before capture. HTML sanitized via DOMPurify. SSRF protection blocks private IPs. External CSS resolved and inlined.

PlaywrightDOMPurify 3.3SSRF ProtectionLazy Scroll
1

Map

Section + part classification

19
section types

Sections classified into 19 types via Vision LLM. Post-processor rules: split oversized sections (>10,000px), merge 3+ consecutive same-type, absorb empty unknowns. Parts extracted into 16 UI component types with bounding boxes.

Vision LLMRule 1-4 PostProcessor16 Part TypesJSDOM
2.5

Observe

Motion + quality + responsive

15px
scroll resolution

Scroll Vision analysis detects CSS/JS/WebGL animations at 15px frame resolution. Quality evaluation scores originality, craftsmanship, and contextuality. Multi-viewport responsive analysis captures layout shifts across breakpoints.

Scroll VisionQuality ScorerPixelmatch3 Viewports
4

Interpret

Narrative + mood profiling

16
mood categories

Vision LLM classifies design narrative into 16 mood categories. DB analysis: professional (141 sites), elegant (119), premium (103). Confidence-scored mood profiles with tone, color, and typography signals.

Vision LLM16 MoodsConfidence ModelJSON Format
5

Index

Dual embedding + HNSW

10.66
ms P95 latency

e5-base text embeddings (768D) + DINOv2 visual embeddings (768D). Type-aware dedup (cosine >0.995). 16 HNSW indexes with sub-11ms retrieval. Hybrid RRF search: 60% vector + 40% full-text.

e5-base 768DDINOv2 768DHNSW m=16RRF 60/40
27DB models
16HNSW indexes
14RLS policies
26MCP tools
PostgreSQL 18pgvector 0.8vector indexesML embeddings768D similarityONNX RuntimePlaywrightDOMPurify 3.3hybrid searchZod validation
processvectordata flow
Chapter V

Current readings

Live Metrics|
54%
14 RLS-enabled
DB Models
0/ 50

Database models spanning design analysis, ML, and studio domains

87%
WebDesign
MCP Tools
0/ 30

Reftrix WebDesign MCP tools: layout, motion, quality, narrative, background, responsive, preference analysis

80%
m=16
HNSW Indexes
0/ 20

Vector search indexes across 11 embedding tables for fast similarity matching

Vector Dimensions
0dDIMENSIONS
768d
050MAX

ML embedding dimensions enabling cross-language search

Search Latency
P95 ACTUAL
0.00ms
10.66ms
050LOW

95th percentile search response time (target < 500ms)

Quality Target
0+
85+
050MAX

Overall score: originality, craftsmanship, contextuality via pattern-driven evaluation