# foostan/crkbd architecture

> Architecture diagram of the GitHub repository foostan/crkbd, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/foostan/crkbd
- Repository: https://github.com/foostan/crkbd

## Overview

##### Project type and purpose
- This is an open-source hardware project for the “Corne” split mechanical keyboard.
- It provides CAD models for the case (STEP files), KiCad files for PCBs (schematics, footprints, boards), plates (KiCad PCB and SVG), and assembly/manufacturing outputs (Gerbers, BOMs).
- Documentation (buildguides in English/Japanese), firmware guides, and 3D models are included to support builders.

##### File structure
- Top-level folders:
- cases/             → STEP CAD files for left/right halves
- docs/              → Markdown build guides per model/version
- pcbs/              →
– common/        → shared KiCad libraries (symbols, footprints, 3D packages)
– corne-cherry/  → KiCad projects (schematic, PCB, production files) for Cherry MX version
– corne-chocolate/ → KiCad projects for Kailh Choc version
- plates/            → plates’ KiCad PCB and SVG outputs with JLCPCB production artifacts
- README.md          → project overview and version matrix
- Each PCB subfolder contains:
– .kicad_sch, .kicad_pcb, .kicad_pro (project files)
– fp-lib-table, footprints & symbols in common/
– jlcpcb/production_files → BOM-CSV, CPL-CSV, GERBER.zip

##### Detail without over-splitting
- Every major folder as a component but group similar ones (e.g., PCB variants)
- Data flows (export → manufacture → assembly)

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Design Artifacts"
        Lib["Common KiCad Libraries"]:::design
        Cherry["PCB Design: Corne-Cherry v4"]:::design
        Choco["PCB Design: Corne-Chocolate v4"]:::design
        Plate35["Plate Design: 3×5"]:::design
        Plate36["Plate Design: 3×6"]:::design
        CAD35["Case CAD: 3×5 Layout"]:::design
        CAD36["Case CAD: 3×6 Layout"]:::design
    end

    subgraph "Manufacturing Outputs"
        OutCherry["Cherry JLCPCB Files"]:::output
        OutChoco["Chocolate JLCPCB Files"]:::output
        OutPlate35["Plate 3×5 JLCPCB Files"]:::output
        OutPlate36["Plate 3×6 JLCPCB Files"]:::output
    end

    subgraph "Documentation"
        DocCherry["Corne Cherry Guides"]:::doc
        DocChoco["Corne Chocolate Guides"]:::doc
        DocClassic["Corne Classic Guides"]:::doc
        DocLight["Corne Light Guides"]:::doc
        DocFW["Firmware Guides"]:::doc
        README["Project Overview"]:::doc
    end

    Service["JLCPCB Manufacturing Service"]:::services
    ExtPrint["3D Printing / CNC Service"]:::external
    User["End User/Builder"]:::user

    Lib --> Cherry
    Lib --> Choco
    Cherry -->|export Gerbers/BOM| OutCherry
    Choco -->|export Gerbers/BOM| OutChoco
    Plate35 -->|export Gerbers| OutPlate35
    Plate36 -->|export Gerbers| OutPlate36
    OutCherry --> Service
    OutChoco --> Service
    OutPlate35 --> Service
    OutPlate36 --> Service
    CAD35 --> ExtPrint
    CAD36 --> ExtPrint
    DocCherry <--> User
    DocChoco <--> User
    DocClassic <--> User
    DocLight <--> User
    DocFW <--> User
    README <--> User

    click Lib "https://github.com/foostan/crkbd/tree/main/pcbs/common/kbd"
    click Cherry "https://github.com/foostan/crkbd/tree/main/pcbs/corne-cherry/hotswap"
    click Choco "https://github.com/foostan/crkbd/tree/main/pcbs/corne-chocolate/hotswap"
    click Plate35 "https://github.com/foostan/crkbd/tree/main/plates/3x5"
    click Plate36 "https://github.com/foostan/crkbd/tree/main/plates/3x6"
    click CAD35 "https://github.com/foostan/crkbd/tree/main/cases/3x5"
    click CAD36 "https://github.com/foostan/crkbd/tree/main/cases/3x6"
    click DocCherry "https://github.com/foostan/crkbd/tree/main/docs/corne-cherry"
    click DocChoco "https://github.com/foostan/crkbd/tree/main/docs/corne-chocolate"
    click DocClassic "https://github.com/foostan/crkbd/tree/main/docs/corne-classic"
    click DocLight "https://github.com/foostan/crkbd/tree/main/docs/corne-light"
    click DocFW "https://github.com/foostan/crkbd/tree/main/docs/firmware"
    click OutCherry "https://github.com/foostan/crkbd/tree/main/pcbs/corne-cherry/hotswap/jlcpcb/production_files"
    click OutChoco "https://github.com/foostan/crkbd/tree/main/pcbs/corne-chocolate/hotswap/jlcpcb/production_files"
    click OutPlate35 "https://github.com/foostan/crkbd/tree/main/plates/3x5/pcb/jlcpcb/production_files"
    click OutPlate36 "https://github.com/foostan/crkbd/tree/main/plates/3x6/pcb/jlcpcb/production_files"
    click README "https://github.com/foostan/crkbd/blob/main/README.md"

    classDef design fill:#D6EAF8,stroke:#2980B9
    classDef output fill:#D5F5E3,stroke:#27AE60
    classDef services fill:#FCF3CF,stroke:#F1C40F
    classDef doc fill:#FDEBD0,stroke:#F39C12
    classDef user fill:#FADBD8,stroke:#E74C3C
    classDef external fill:#EBDEF0,stroke:#8E44AD
```
