π English Β· বাΰ¦ΰ¦²ΰ¦Ύ
Part of a template family β use alongside
big-software-product-template(software only) andconsumer-hardware-products-template(hardware only).
Every folder explains itself β to humans and to AI agents.
193 purpose.txt maps Β· one repo, two worlds Β· the seam is kernel/contracts
HARDWARE products/ mechanical/ electronics/ firmware/ certification/
manufacturing/ supply-chain/ validation/ packaging/ test-tools/
β
ββββββββββββββββββ΄βββββββββββββββββ
β kernel/contracts β THE SEAM β firmware message schemas
ββββββββββββββββββ¬βββββββββββββββββ + OTA manifest derive from here
β
SOFTWARE apps/ crosscutting/device-sdk/ kernel/ platform/{api,ota,telemetry}
tests/ datasets/ content/
SHARED docs/ rfcs/ business/ legal/ labs/ sandbox/ infra/ tooling/
A monorepo template for connected-hardware products: industrial design, electronics, and firmware plus companion apps and the device cloud β one repo, two worlds, explicit boundaries.
Structure rationale: docs/decisions/ADR-0001-Structure.md.
| If it is⦠| It goes in⦠|
|---|---|
| A device product line's specs/variants/releases | products/<line>/ |
| CAD / enclosure / CMF | mechanical/ |
| Schematics / PCB / power / RF | electronics/ |
| Bootloader / drivers / app firmware / on-device OTA agent | firmware/ |
| Companion app (mobile, web, admin) | apps/ |
| Shared device-interaction code used by all apps | crosscutting/device-sdk |
| Device cloud: API, OTA service, telemetry, payments | platform/ |
| Reusable software core (contracts, design system, i18n) | kernel/ |
| OTA release service vs on-device agent | platform/ota vs firmware/ota |
| Reliability/thermal/battery testing | validation/ (hardware analog of software tests) |
| Data (raw β curated β verified) | datasets/ |
| User-facing copy, manuals copy, troubleshooting | content/ |
| Business & operations | business/ |
| Knowledge / decisions | docs/ (landed) Β· rfcs/ (pending) |
| Prototype / research | sandbox/ Β· labs/ |
Every folder contains a purpose.txt β what belongs there and what it should hold. Keep them updated; they are the map.
HARDWARE
products/ one folder per line: product.md, requirements/, variants/, release/
mechanical/ cad, industrial-design, enclosure
electronics/ pcb, power, rf, devboards
firmware/ bootloader, drivers, application, boards, ota (on-device agent)
certification/ india (BIS/WPC/TEC), international (FCC/CE), emc, safety, environment
manufacturing/ dfm, assembly, test-jigs, quality, yields
supply-chain/ bom, suppliers, costing
validation/ reliability, thermal, battery, drop-vibration, emc-prescan
packaging/ dieline, inserts, labels
test-tools/ jig firmware, flash tools, calibration
SOFTWARE
apps/ web, admin, mobile (RN β Flutter, stack-neutral)
crosscutting/ device-sdk (provisioning, protocol, sync)
kernel/ design-system, contracts, auth, offline, i18n, entitlements, telemetry, config
platform/ api (stack-neutral), ota (releases/channels/rollback), telemetry, notifications,
payments, jobs, identity, database, observability
tests/ e2e Β· contract Β· visual
datasets/ raw β curated β schemas β sources β pipelines
content/ templates, workflow, library (guides/troubleshooting/manuals/faqs), locale, seo
SHARED
docs/ rfcs/ business/ legal/ labs/ sandbox/ infra/ tooling/ security/ .ai/ AGENTS.md
apps/*βcrosscutting/*,kernel/*,platformcontracts β neverplatform/*internals or hardware folders directlycrosscutting/*βkernel/*onlyplatform/*β never imported by anything above it (communicates viaplatform/api/openapi+kernel/contracts)kernel/contractsis the single source of truth for data shapes β it also drives firmware message schemas and the OTA manifest format- Firmware never calls the cloud directly except through the documented protocol (
firmware/βplatform/telemetry|ota) products/<line>/holds specs + links, never copies of artifactslogic/stays framework-free; generated outputs (Gerber/STEP/exports) are never hand-edited- Corporate documents (equity, HR, signed contracts, IP filings) belong in a private company-ops repo, never here
- Use this template on GitHub (or
gh repo create my-project --template anurag-panda-dev/full-stack-consumer-hardware-products-template) - Rename β update root
README.md,purpose.txt,AGENTS.md - Replace
products/example-device/with your real product line - Fill the software workspace β
package.json,pnpm-workspace.yaml,turbo.json,tsconfig.base.json(listed in rootpurpose.txt; deliberately not shipped so the template stays stack-flexible β same forplatform/apiExpress β FastAPI andapps/mobileRN β Flutter) - Record your first decision β copy
docs/decisions/TEMPLATE.mdβADR-0001-β¦; big choices go throughrfcs/first - Do not pre-create empty scaffolding β folders fill as real work arrives
