This document provides a high-level overview of the Kapture project, intended to be used as a reference for the Gemini AI assistant.
The primary goal of the Kapture project is to create a browser extension that can record user interactions and translate them into automated scripts. This involves capturing events like clicks, keypresses, and navigation, and then generating code that can replay these actions.
/extension: This is the core of the project, containing the source code for the Chrome extension.manifest.json: Defines the extension's properties, permissions, and components.background.js: The extension's service worker, handling background tasks and managing the extension's state.content-script.js: Injected into web pages to capture user interactions.panel.js&panel.html: The user interface for the extension's developer tools panel.
/server: Contains a Node.js server that the extension communicates with. This server is likely responsible for processing the captured events and generating the automation scripts./e2e: End-to-end tests for the project, ensuring that the extension and server work together as expected./website: Project documentation and website (GitHub Pages)./test-app: A simple web application used for testing the Kapture extension.
- The user installs the Kapture Chrome extension.
- The user opens the browser's developer tools and selects the "Kapture" panel.
- The user starts a recording session.
- The
content-script.jscaptures user interactions (clicks, keypresses, etc.) on the active tab. - The captured events are sent to the
background.jsscript. background.jscommunicates with the Node.js server in the/serverdirectory.- The server processes the events and generates an automation script.
- The generated script is displayed in the Kapture developer tools panel.
- Dependencies: The project uses Node.js and has
package.jsonfiles in the/e2eand/serverdirectories. - Testing: End-to-end tests are located in the
/e2edirectory and can be run withnpm test(inferred from the presence ofpackage.jsonand atestdirectory). - Building: The extension can likely be built and packaged for release using the scripts in the
.github/workflowsdirectory.