rrweb is a session replay tool that records and replays user interactions on web pages.
The tool solves the problem of understanding user behavior and debugging issues by capturing the complete state of a web page and all subsequent user interactions, then replaying them faithfully. It works by first taking a snapshot of the DOM and its state, converting this into a serializable data structure, then recording all HTML mutations and user interactions as the page is used. During replay, it rebuilds the initial snapshot and plays back the recorded events to recreate the session.
rrweb suits projects that need session replay capabilities for user experience analysis, debugging, or support purposes. It is particularly useful for teams building their own session replay infrastructure rather than relying on third-party services. The project provides modular packages so developers can use individual components like the snapshot and rebuilding features standalone to generate static HTML screenshots with JavaScript disabled, or combine them with the record and replay packages for full session replay functionality. A player UI with controls like pause and fast-forward is available for interactive playback.
The project maintains active development with ongoing work on storage optimization through deduplication for large numbers of sessions, development of a token-efficient AI session replay format, and expansion of plugin support for XHR, fetch, and GraphQL integration. The codebase is written in TypeScript to ensure strong type consistency between recording and replay sides. The project includes comprehensive testing infrastructure with integration tests, unit tests, and a REPL testing tool for developers.