Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

Grab Worker - Deployment Summary#

✅ Completed#

Core Functionality#

  • Screenshot Generation: Production-ready worker at grab.aesthetic.computer
  • Icon Endpoint: /icon/{width}x{height}/{piece}.png
  • Preview Endpoint: /preview/{width}x{height}/{piece}.png
  • Health Check: /health

Infrastructure#

  • Cloudflare Workers: Using Browser Rendering API + Durable Objects
  • Automated Deployment: ./scripts/deploy-with-dns.fish handles deployment + DNS
  • Integration: Replaces Netlify function, integrated with system/public/aesthetic.computer/lib/parse.mjs

Documentation#

  • README.md: Complete usage guide
  • VIDEO-FUTURE.md: Roadmap for video capture infrastructure
  • ANIMATED-GIF-STATUS.md: Research archive

Bundle Size#

  • Production: 684KB total / 134KB gzipped
  • Clean Dependencies: Only @cloudflare/puppeteer + puppeteer core

🎯 Current Deployment#

URL: https://aesthetic-grab.aesthetic-computer.workers.dev
Custom Domain: https://grab.aesthetic.computer
Version: ea5c6ace-b0da-4891-88ce-d1d9c158e0d5

Performance#

  • Screenshots: ~7-15 seconds (navigation + rendering + capture)
  • Cache: 1 hour (configurable via CACHE_TTL_SECONDS)
  • CDN Cache: 24 hours (configurable via CDN_CACHE_TTL_SECONDS)

Supported Resolutions#

  • 128x128 - Favicons
  • 1200x630 - Open Graph images
  • 1800x900 - Twitter cards
  • Custom sizes up to 1920x1080

🔮 Video Capture (Future Work)#

Decision#

Video/animation capture requires different infrastructure:

  • Cloudflare Workers Browser Rendering throttles CDP screencast (~0.4 FPS)
  • Real-time video needs dedicated compute with GPU support
  • Recommended: Digital Ocean VPS (similar to /at PDS deployment)

Archived Research#

  • Full investigation in ANIMATED-GIF-STATUS.md
  • Future implementation plan in VIDEO-FUTURE.md
  • Git history preserved for reference

📝 Files Modified#

New Files#

  • /workspaces/aesthetic-computer/grab/ - Complete worker implementation
  • /workspaces/aesthetic-computer/grab/scripts/deploy-with-dns.fish - Automated deployment
  • /workspaces/aesthetic-computer/grab/VIDEO-FUTURE.md - Video roadmap
  • /workspaces/aesthetic-computer/grab/ANIMATED-GIF-STATUS.md - Research archive

Updated Files#

  • /workspaces/aesthetic-computer/system/public/aesthetic.computer/lib/parse.mjs - Uses grab.aesthetic.computer
  • /workspaces/aesthetic-computer/system/netlify.toml - Redirects to grab.aesthetic.computer

🚀 Usage#

Generate Screenshots#

# Icon
curl "https://grab.aesthetic.computer/icon/128x128/prompt.png" -o icon.png

# Preview
curl "https://grab.aesthetic.computer/preview/1200x630/prompt~wipe.png" -o preview.png

# Custom size
curl "https://grab.aesthetic.computer/preview/800x400/starfield.png" -o preview.png

Deploy Updates#

cd /workspaces/aesthetic-computer/grab

# Full deployment with DNS
./scripts/deploy-with-dns.fish

# Quick deployment (DNS already configured)
npm run deploy

Monitor#

# Real-time logs
npm run logs

# Check health
curl "https://grab.aesthetic.computer/health"

📊 Integration Points#

parse.mjs#

Lines 487-494: Icon and preview URL generation

const iconURL = `https://grab.aesthetic.computer/icon/${size}x${size}/${path}.png`;
const previewURL = `https://grab.aesthetic.computer/preview/${width}x${height}/${path}.png`;

netlify.toml#

Lines 285-290, 306-310: Redirect old screenshot.js URLs to grab

[[redirects]]
  from = "/.netlify/functions/screenshot/:path"
  to = "https://grab.aesthetic.computer/:path"
  status = 200

🎨 Architecture Benefits#

vs. Netlify Functions#

  • Performance: Dedicated browser instances in Durable Objects
  • Scalability: Cloudflare's global network
  • Cost: No function invocation limits
  • Reliability: Browser session reuse reduces overhead

vs. Traditional Servers#

  • Zero Maintenance: Serverless = no server management
  • Global Edge: Low latency worldwide
  • Auto-scaling: Handles traffic spikes automatically
  • Pay-per-use: No idle server costs

🔐 Environment Variables#

Set in wrangler.toml:

  • ENVIRONMENT: "production"
  • DOMAIN: "grab.aesthetic.computer"
  • CACHE_TTL_SECONDS: "3600"
  • CDN_CACHE_TTL_SECONDS: "86400"
  • MAX_SCREENSHOT_AGE_MS: "604800000"
  • BROWSER_TIMEOUT_MS: "30000"
  • MAX_VIEWPORT_WIDTH: "1920"
  • MAX_VIEWPORT_HEIGHT: "1080"
  • MAX_REQUESTS_PER_MINUTE: "60"
  • MAX_BROWSER_SESSIONS: "10"

📚 References#


Status: ✅ Production Ready
Date: October 14, 2025
Version: ea5c6ace-b0da-4891-88ce-d1d9c158e0d5