Contributing
Thank you for your interest in contributing to Gerbtrace. This page covers coding conventions, the design system, and guidelines for submitting changes.
Getting started
- Fork the repository and clone your fork.
- Follow the Development Setup guide to get the project running locally.
- Create a feature branch from
main. - Make your changes and verify they work in both web and desktop modes.
- Submit a pull request.
Code style
- TypeScript throughout the frontend
- Vue 3 Composition API with
<script setup> - Nuxt UI components preferred over native HTML controls
- Tailwind CSS for styling
Nuxt UI form controls
Use Nuxt UI form controls for consistency:
USelect/USelectMenuinstead of<select>/<option>URadioGroupinstead of native radio groupsUCheckbox/UCheckboxGroupinstead of native checkboxesUSwitchfor boolean togglesUInputfor text and numeric fieldsUTabsfor tabbed interfaces
Keep native controls only when a Nuxt UI component cannot reasonably satisfy behavior, accessibility, or performance needs.
Sidebar design system
The sidebar panels follow a consistent UX pattern. When building or modifying a sidebar:
Information architecture
Use a 3-level structure:
- Global quick actions (top row) – binary toggles and frequently used actions
- Status strip – compact computed info and warnings
- Tabbed content – group related settings by user intent, not implementation detail
Layout rules
- Use compact controls (
size="xs"orsize="sm") - Prefer 2-column grids for related numeric inputs
- Use 4-column grids for side-based values (top/bottom/left/right)
- Wrap logical groups in bordered cards with
rounded border p-2 space-y-2 - Every input must have a visible label with units (e.g., "Routing tool (mm)")
Behavioral rules
- Input updates should reflect on the canvas immediately
- Sidebar edits must not reset zoom or pan
- If a mode disables a feature, show disabled state with explanation
- New projects start with practical defaults
- New config fields must preserve existing projects (migration fallback)
Checklist for new sidebars
- Define quick actions and status strip first
- Split large forms into 2-3 intent-based tabs
- Add explicit labels and units for every field
- Use bordered cards for each logical group
- Ensure toggles disable/hide dependent controls cleanly
- Keep canvas context stable while editing
- Add migration for every new persisted field
- Validate with small viewport and dark mode
Package system rules
- Never invent new package types – only TPSys types are allowed
- Use
PT_GENERICfor packages that do not fit the simplified parametric models - Package geometry must follow Mycronic/TPSys 0-degree orientation
- See Package Definitions for the full type system
Config and persistence
- Sidebar controls map directly to persisted config fields
- New feature toggles require:
- Type update in the config schema
- Default in the factory function
- Migration fallback for existing saved data
- UI control wiring
- Geometry/render logic wiring
- This keeps local storage and Supabase JSON behavior aligned
Pull request guidelines
- Keep PRs focused on a single feature or fix
- Include a clear description of what changed and why
- Verify the CI checks pass (type check + build)
- Test in both web and desktop modes when applicable
- Update documentation in
content/docs/if your change adds or modifies user-facing behavior
Reporting issues
Use the GitHub Issues page. Include:
- Steps to reproduce
- Expected vs actual behavior
- Browser/OS version
- Screenshots or screen recordings if applicable
You can also submit bug reports directly from within Gerbtrace via the bug report button in the header.