AnasSarkiz/muse-voice-remote

Muse Voice Remote — bare ESP32-S3R8, 155 TOP JLCPCB parts with real supplier CAD, native 3D assembly and GLB exports. Revised 17 mm case allocation; 0.30 mm via drill /0.45 mm pad. Checked prototype PCB; mechanical, RF and MUSE qualification pending.

Version
1.3.2
License
unset
Stars
0

scripts/catalog.ts

import { writeFile } from "node:fs/promises"
import { parts } from "../design/parts"
import { catalogFor, padNetsFor } from "../design/catalog"
import pinmaps from "../vendor/pinmaps.json"
import manifest from "../vendor/jlcpcb/native-library-manifest.json"
import { assembly } from "../design/assembly"
import fabrication from "../design/fabrication-profile.json"
import selection from "../docs/jlcpcb-import-selection.json"
import { validateCatalog } from "../design/validate-catalog"
const audit = validateCatalog(parts, selection)
await writeFile("docs/component-electrical-audit.json",JSON.stringify(audit,null,2)+"\n")
if (audit.failures.length) throw new Error(`Electrical supplier assignment audit failed:\n${audit.failures.join("\n")}`)
const selected = parts.map(p => {
  const catalog = catalogFor(p)
  const physicalPins: Record<string,string> = { ...(catalog?.pins ?? p.pins ?? (p.footprint ? pinmaps[p.footprint] : {})) }
  if (p.name === "U_AMP") { delete physicalPins.THERMAL; physicalPins["17"]="GND" }
  const padNets = padNetsFor(p)
  return { reference:p.name, value:p.value, layer:"top", x:p.x,y:p.y,rotation:p.rotation??0, ...catalog, padNets,
  status: catalog ? "stock snapshot checked separately; manufacturer and enclosure qualification required" : "unresolved; no physical connector created" }
})
await writeFile("docs/component-catalog.json",JSON.stringify(selected,null,2)+"\n")
await writeFile("docs/routing-input.json",JSON.stringify({
  board:{...assembly.pcb,layers:4,outline:"rectangle",mountingHoles:assembly.mountingHoles,fabrication},
  footprintHashes:Object.fromEntries(manifest.map(p=>[p.library,p.sha256])),
  components:selected.filter(p=>p.library).map(p=>({
    reference:p.reference,library:p.library,x:p.x,y:p.y,rotation:p.rotation,padNets:p.padNets }))
},null,2)+"\n")
console.log(`Recorded ${selected.length} design entries; ${selected.filter(p=>p.library).length} imported physical components.`)