$ show responsively-org/responsively-app
Responsively App is an Electron-based desktop application for responsive web development testing. It allows developers to preview a website across multiple device simulators simultaneously (phones, tablets, laptops) with synchronized interactions such as scrolling, clicking, and form input mirroring via BrowserSync. The application includes a built-in MCP (Model Context Protocol) server that exposes automation tools (navigate, screenshot, click, read_page) for AI coding agents like Claude Code and Cursor. It also provides design overlays, color blindness simulation, ruler/guide systems, and screenshot capture. The codebase is structured as a monorepo with three packages: the desktop app (Electron + React + Redux), a browser extension (Manifest V3) to open URLs in the app, and an MCP CLI package published to npm. The architecture follows a main-process/renderer split with IPC communication, extensive E2E tests (Playwright), and a device frame system with pixel-accurate bezel artwork generated from upstream sources.
The LLM identified 5 files worth highlighting for reuse:
A self-contained module for device frame artwork and geometry. It separates frame images (WebP) from a JSON metadata file (frames.json) that stores screen coordinates, orientation, and attribution for each device. The generation pipeline (generate.ts) transforms third-party SVGs/PNGs into consistent WebP assets. This abstraction allows adding new devices by providing an image and JSON entry, and could be extracted for any project needing hardware-accurate device mockups.
A minimal, typed publish-subscribe event bus used for cross-component communication (navigation, color blindness, etc.). It provides subscribe, publish, and unsubscribe methods with generic event types. The implementation is less than 50 lines and has no external dependencies, making it easily extractable for any JavaScript/TypeScript project needing decoupled event-driven communication.
A pure reducer function that models webview navigation state (loading, loaded, error, address bar interactions). It takes a state and event and returns a new state without side effects. This pattern is reusable for any UI component that needs a predictable state machine for async operations, and can be extracted with minimal changes.
A main-process module for capturing full-page and viewport screenshots of webviews. It uses Electron's webContents.capturePage and injects scripts to scroll and capture composite images. The logic is isolated from the renderer and could be reused in any Electron application needing programmatic screenshot capabilities.
A React hook that wraps Mousetrap for keyboard shortcut registration with automatic cleanup. It supports forwarding shortcuts to the main process for guest webviews. The hook is self-contained and can be extracted for any React project needing declarative keyboard shortcut management.