Skip to content

Project Structure

Claxon edited this page Sep 29, 2026 · 1 revision

Project structure

Plain ES modules, no framework and nothing to compile. Keys are real DOM elements, nested inside a group's own transformed wrapper when they belong to one. Geometry is stored in units, never pixels, so a layout is independent of zoom and screen density.

js/store.js Keys, groups, boards, links, rows/columns, selection, undo, persistence
js/viewport.js Camera maths, screen↔unit conversion, rotated group frames
js/render.js Paints state into the DOM
js/interact.js Pointer gestures, pinch, and shortcuts
js/commands.js What the shortcuts do — placing keys, layouts and boards, fitting the view
js/sidebar.js The properties panels
js/layoutfile.js Saving, importing, wiping
js/pcbexport.js One board's DXF, KiCad and BOM exports
js/polygon.js Polygon booleans for a board's outline
js/layouts.js Ready‑made layouts, as data
js/icons.js Icon glyphs for keys that carry a picture instead of text
js/uiicons.js App-chrome icons, loaded from icons/ui/
js/theme.js Palette selection and following the system
js/inputmode.js Trackpad/mouse gesture mapping
js/modes.js Which design mode is active, and what that freezes
js/tips.js The tips dialog
js/tooltip.js Instant tooltips on the interface buttons
js/main.js Wiring

Maintenance

Bump CACHE in sw.js whenever any file in its SHELL array changes, or returning visitors keep the cached version. A new module under js/, or a new icon under icons/ui/, has to be added to SHELL too — it is a hand-maintained mirror, and anything missing from it is absent offline. A UI icon also needs its name in NAMES in js/uiicons.js.

icons/icon.svg is the source for the app icon; the PNGs were generated once by a throwaway script.

Clone this wiki locally