Browser-based viewer and editor for the GRCAN.CANdo file used by Gaucho Racing. Loads CANdo from any branch, tag, or commit via the GitHub API, renders it in a 3-panel hierarchy (Node -> Bus -> Message), and supports in-memory editing with diff review before download.
Edits are not saved to a backend. They exist in browser memory until the user downloads the modified file.
| File | Purpose |
|---|---|
index.html |
App shell, 3-panel layout, script load order |
logic.js |
GitHub API fetchers and CANdo text parsers (window.GrcanApi) |
candoDocument.js |
Semantic document model with cross-section invariants (window.GrcanDocument) |
editor.js |
In-memory mutation engine, raw text state (window.GrcanEditor) |
viewer.js |
Main controller: rendering, navigation, edit/delete wiring |
physicalTopology.js |
Parses can_topology.txt to enforce physical bus-to-node constraints |
graphView.js |
Cytoscape.js network graph visualization (window.GrcanGraphView) |
diffViewer.js |
Side-by-side text diff modal shown before download |
background.js |
Decorative animated canvas background |
| File | Purpose |
|---|---|
formUtils.js |
Shared modal/form builders, validators, SVG icon constants |
formMessageDef.js |
Add/edit Message ID definitions |
formRoutingAdd.js |
Add routing entries |
formRoutingEdit.js |
Edit existing routing entries |
formNodeEdit.js |
Rename a node/device |
formBusEdit.js |
Rename a bus under a node |
formBusAdd.js |
Add a new bus to a node |
formCustomCanId.js |
Edit Custom CAN ID entries |
formSuperAdd.js |
Wizard for creating multiple linked objects at once |
formConfirmDelete.js |
Reusable delete confirmation modal |
| File | Purpose |
|---|---|
index.css |
Base shell styling |
viewer.css |
Panel/list/view styles |
editor.css |
Modal/form/icon/diff/editor state styles |
graphView.css |
Graph view overlay styles |
| File | Purpose |
|---|---|
can_topology.txt |
Physical CAN bus topology: which nodes are wired to which bus. Node names must match GR ID entries in GRCAN.CANdo. |
| File | Purpose |
|---|---|
cytoscape.min.js |
Cytoscape.js graph library (vendored) |
Scripts are loaded in index.html in strict dependency order. viewer.js expects window.GrcanApi, window.GrcanEditor, and all form-augmented methods to exist. Reordering will break runtime symbol availability.
logic.jsformUtils.jscandoDocument.jseditor.jsformMessageDef.jsformRoutingAdd.jsformRoutingEdit.jsformNodeEdit.jsformBusEdit.jsformBusAdd.jsformConfirmDelete.jsformSuperAdd.jsformCustomCanId.jsphysicalTopology.jsdiffViewer.jsgraphView.jsviewer.jsbackground.js
Tests live in tests/ and run under Node.js:
candoDocument.test.js— semantic document model testslogic.test.js— parser/API utility testsmanual/— manual test scenarios
This file defines which devices are physically connected to each CAN bus. The format is:
CAN1:
ECU
BCU
...
CAN2:
ECU
SAMM_Mag_1
...
- Node names must exactly match
GR IDentries inGRCAN.CANdo. DebuggerandALLare always exempt and should not be listed.- Lines starting with
#are comments.