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.json to enforce physical bus-to-node constraints |
physicalGroups.js |
Derives functional groupings dynamically from prefixes for the Graph View renderer (window.PhysicalGroups) |
layoutPhysicalBus.js |
Pure SVG layout for the physical-bus Graph View (window.LayoutPhysicalBus) |
graphView.js |
Physical-bus SVG 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.json |
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 |
Previous graph library. The current Graph View renders pure SVG and does not load this. |
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.
physicalTopology.jsphysicalGroups.jslogic.jsformUtils.jseditor.jscandoDocument.jsformMessageDef.jsformCustomCanId.jsformRoutingAdd.jsformNodeEdit.jsformBusEdit.jsformBusAdd.jsformConfirmDelete.jsformSuperAdd.jsdiffViewer.jsviewer.jslayoutPhysicalBus.jsgraphView.jsbackground.js
There is no committed Web test harness. For a quick smoke check, run syntax checks against the browser scripts:
for f in Web/*.js; do node --check "$f" || exit 1; doneThis file defines which devices are physically connected to each CAN bus. The format is a JSON object keyed by bus name, with arrays of node names:
{
"Primary": ["ECU", "ACU", "..."],
"Data": ["ECU", "SAMM_Mag_1", "..."]
}- Bus keys must exactly match entries in the
Bus ID:section ofGRCAN.CANdo(e.g.Primary,Data,Charger). - Node names must exactly match
GR IDentries inGRCAN.CANdo. DebuggerandALLare always exempt and should not be listed.- JSON has no comment syntax. Rationale for entries should go in this README instead.
- Hardware note: both
GR InvandDTI InvsharePrimary. Whichever isn't physically connected has its messages go nowhere — no firmware switch needed.