Thanks for your interest in contributing! Here's how to get started.
git clone https://github.com/provandal/protoviz.git
cd protoviz
npm install
npm run devOpen http://localhost:5173 in your browser.
The recommended way to create a new scenario is to use the Scenario Creator built into ProtoViz. You do NOT need to write YAML by hand.
- Open ProtoViz and click Create Scenario on the landing page (or navigate to
/#/create) - Enter your Anthropic API key (stored locally in your browser, never shared)
- Describe the protocol exchange you want to visualize in plain English — for example:
- "TCP three-way handshake between a client and a web server, including SYN, SYN-ACK, and ACK with typical field values"
- "NVMe-oF/TCP connection setup: TCP handshake, then NVMe-oF Connect command and response"
- Click Generate Scenario — the AI will produce a complete YAML file conforming to the ProtoViz schema
- Download the generated
.yamlfile - Review and refine: check field values, spec references, and descriptions for accuracy
- Place the file in
public/scenarios/<protocol>/and add an entry topublic/scenarios/index.json - Test with
npm run dev— your scenario should appear in the gallery
If you have a packet capture, use the Python converter:
pip install scapy pyyaml anthropic
python tools/converter.py my_capture.pcap --out public/scenarios/my_protocol/my_scenario.yamlFor reference, the key sections of a scenario file are:
meta— Title, protocol, authors, description, learning objectivestopology— Actors (hosts, switches) and their positionsosi_layers— Per-actor OSI layer fields and initial stateframes— Packet frames with headers, fields, spec refs, and kernel refstimeline— Step-by-step event sequence with frame references and state deltasglossary— Protocol terms with definitions
See public/scenarios/roce/ for a complete example and scenario.schema.json for the full specification.
| Requirement | Details |
|---|---|
| Valid YAML | Must conform to scenario.schema.json |
| Field descriptions | No empty description fields |
| Spec references | Transport header fields should reference spec sections |
| Accuracy | Review AI-generated content for correctness before submitting |
| Attribution | Your name in meta.authors |
Rules live in public/rules/ as JSON files. Supported rule types:
field_value— Validate specific field values against expected/invalid listspsn_sequence— Check for PSN gaps in RoCE QP streamssequence_pattern— Verify expected packet sequence patterns appear
Protocol dissectors are in src/pcap/dissectors/. Each dissector:
- Takes
(data, offset)— raw packet bytes and starting offset - Returns
{ layer, name, fields, nextOffset, nextProtocol } - Gets wired into the pipeline in
src/pcap/dissect.js
- React 18 functional components with hooks
- Zustand for state management
- Inline styles (CSS modules migration planned)
- No TypeScript yet (planned)
- Fork the repo
- Create a feature branch (
git checkout -b feature/my-feature) - Make your changes
- Verify
npm run buildsucceeds - Submit a PR with a clear description
Open an issue at github.com/provandal/protoviz/issues.
By contributing, you agree that your contributions will be licensed under the MIT License.