StyleGrab
Extract design tokens from any URL. Track changes. Get notified.
StyleGrab is a high-performance design token extraction and monitoring API built with Rust. Connect to any webpage via a headless browser, extract structured design tokens, and monitor for design drift over time.
Key Features
π¨ Live CSS Extraction
Connect to any URL via CDP protocol, extract computed styles, and produce structured design tokens β colors, typography, spacing, and assets β in a single API call.
πΈ Snapshot Diffing
Every extraction creates a versioned snapshot. Compare any two snapshots to get a precise diff of what changed. Catch design drift before it ships.
π Webhook Notifications
Subscribe to events and receive HMAC-SHA256 signed payloads. Integrate with Slack, CI pipelines, or any automation tool.
Quick Example
# Extract design tokens from a URL
curl -X POST https://api.stylegrab.dev/api/extractions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}'
Response:
{
"id": "ext_abc123",
"status": "completed",
"tokens": {
"colors": [
{"name": "primary", "value": "#3b82f6", "usage": 42},
{"name": "background", "value": "#ffffff", "usage": 156}
],
"typography": [
{"family": "Inter", "weights": ["400", "600", "700"]}
],
"spacing": ["4px", "8px", "16px", "24px", "32px"]
}
}
Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Clients β
β (Dashboard / CLI / CI Pipelines) β
ββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β HTTPS
ββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββ
β Axum API Server β
β ββββββββββββ ββββββββββββββ βββββββββ ββββββββββββββββββ β
β β Auth β β Extraction β β Teams β β Payments β β
β β Module β β Engine β βModule β β (Stripe) β β
β ββββββββββββ βββββββ¬βββββββ βββββββββ ββββββββββββββββββ β
β β β
β ββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββ β
β β Webhooks Dispatch β β
β β HMAC-SHA256 signing Β· 3x retry Β· exp backoff β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββΌβββββββββββββββββ
βΌ βΌ βΌ
ββββββββββββββ ββββββββββββββ ββββββββββββββ
β PostgreSQL β β Redis β β Headless β
β (Data) β β (Cache) β β Browser β
ββββββββββββββ ββββββββββββββ ββββββββββββββ
Next Steps
- Quick Start β Get up and running in 5 minutes
- API Reference β Full endpoint documentation
- Guides β Step-by-step tutorials