Contributing

How to contribute

Nautilus is community-built and small enough to be approachable. Templates and icons are genuinely easy first contributions.

Set up

git clone https://github.com/Somilg11/nautilus.git
cd nautilus
npm install
npm run dev

# before opening a PR — CI runs exactly this
npm run lint && npm run typecheck && npm test && npm run build

Where things live

AreaPathDifficulty
Templatessrc/lib/templates/Easy
Iconssrc/components/nodes/node-icons.tsxEasy
Docsdocs/, src/app/docs/Easy
Canvas behavioursrc/components/canvas.tsxMedium
Request modelsrc/lib/flow-ops.tsInvolved
Load modelsrc/lib/simulation-model.tsInvolved
AI providerssrc/lib/ai-client.tsInvolved

Conventions worth knowing

RuleWhy
One listener per nautilus-* eventToolbar buttons dispatch window events. Binding one twice is how paste once inserted two copies of everything.
Never persist transient stateAnything written into node data lands in undo history, autosave, exports and share links.
Keep the simulators pureNo React, no DOM. The same code runs in a Web Worker and in Node under test.
Keep object identityReact Flow skips a node or edge whose object is unchanged. Returning fresh objects for an unchanged canvas re-renders the whole diagram.
Validate untrusted inputImports, share links and AI output all pass through src/lib/diagram-io.ts.
Use reactflow v11react-flow-renderer is the unmaintained v10 package and pins React to 18.
Conventional commitsfeat:, fix:, docs:, refactor:, test:, chore:

Testing

The pure parts — the request model, the load model, the engine protocol, the planner and the diagram validator — are unit-tested with Vitest, and every built-in template is run at its rated load. Any change to their behaviour should come with a test.

npm test           # single run
npm run test:watch # watch mode
Start small
A focused pull request gets reviewed quickly. If a change touches the JSON format or the event contract, open an issue first so the shape can be agreed before you write it.

Next