> ## Documentation Index
> Fetch the complete documentation index at: https://docs.buildwithtrace.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Contribute Footprints

> Validate and submit a .kicad_mod to the open-source Trace footprint library via a GitHub PR.

Contributions add footprints to `buildwithtrace/trace-kicad-footprints-lib`. Validation runs
locally (no backend); submission is proxied to the backend, which opens the PR.

<Steps>
  <Step title="Validate the file — POST /api/contribute/validate">
    Multipart form with `file` (**`.kicad_mod` only**, ≤ 10 MB). The route checks the file
    starts with `(footprint` or `(module` and counts pads. **No auth.**

    ```json theme={null}
    { "valid": true, "errors": [], "warnings": ["Footprint will be reviewed by our team for IPC/KLC compliance."],
      "footprintName": "QFN-16-1EP_3x3mm_P0.5mm", "padCount": 17 }
    ```
  </Step>

  <Step title="Submit — POST /api/contribute/submit">
    **Auth required.** Multipart form: `file`, `library`, `description`, `authorName`,
    `authorEmail`. Proxies to `POST /api/v3/components/submit` with `type: "footprint"`.

    ```json theme={null}
    { "success": true, "submissionId": "…",
      "message": "Footprint submitted for review. You'll be notified when it's approved." }
    ```
  </Step>
</Steps>

## Validation rules

* File **must** be `.kicad_mod` (the footprints site rejects `.kicad_sym`).
* Max 10 MB.
* Content must start with `(footprint` or `(module`. `padCount` is counted from `(pad ` tokens.

## Backend submit payload

```json theme={null}
{ "type": "footprint", "name": "…", "library": "…", "description": "…",
  "file_content": "…", "file_format": "kicad_mod", "pin_count": 0, "pad_count": 17 }
```

| Status | Meaning                             |
| ------ | ----------------------------------- |
| `400`  | Missing fields / not a `.kicad_mod` |
| `401`  | Not authenticated                   |

<Info>
  Track submission status from `/my-footprints`. PRs are reviewed for IPC/KLC compliance
  before merge.
</Info>
