$ show jupyter-server/jupyverse
Jupyverse is a modular Jupyter server implementation built on the FPS (FastAPI Plugins System) framework. It provides a customizable backend for Jupyter interfaces (JupyterLab, Notebook) through interchangeable plugins handling authentication, file contents, kernel management, terminals, real-time collaboration, and more. The system uses FastAPI for HTTP/WebSocket endpoints and anyio for async operations, with a core API defining interfaces that plugins implement. Entry points include a CLI command and composed plugin modules. Key data flows involve routing requests to appropriate plugins (e.g., contents API for file operations, kernel plugin for code execution) and leveraging WebSockets for real-time features like collaboration and terminal communication. External dependencies include FPS, Jupyter libraries, Yjs for CRDTs, and various auth providers.
The LLM identified 3 files worth highlighting for reuse:
Implements a persistent mapping between file paths and UUIDs using SQLite, integrated with the file watcher plugin to track changes. Demonstrates a self-contained service that can be extracted for any application needing stable file identifiers.
Manages collaboration rooms using Yjs CRDTs for real-time document synchronization. Includes persistence via YStore and handles room lifecycle. Shows a well-crafted implementation of collaborative editing that could be adapted for other real-time applications.
Controls Jupyter kernel subprocesses, handles the Jupyter kernel protocol over WebSockets, and manages message forwarding. Demonstrates robust async process management and protocol handling in a modular plugin.