# an-family-oop101/ecpc-efficient-custom-personal-computer-builder architecture

> Architecture diagram of the GitHub repository an-family-oop101/ecpc-efficient-custom-personal-computer-builder, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder
- Repository: https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder

## Overview

ECPC is a Java console application for planning custom PC builds. Its intended workflow is to choose parts or request a workload- and budget-based recommendation, assemble a build, validate compatibility and power, then review or save the configuration. The sampled code supports build editing, recommendation, and compatibility checks; the README also describes a parts catalog, bottleneck analysis, and local save/load. Main is only a tiny stub, and the catalog implementation and persistence code are not present in the tree, so those connections are limited to documented or unverified relationships.

Main entry points: [`src/Component.java`](https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/Component.java) (Component model), [`src/Main.java`](https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/Main.java) (PC builder), [`src/PCBuild.java`](https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/PCBuild.java) (Build state), [`src/ECPCException.java`](https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/ECPCException.java) (ECPC exceptions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Build interaction"]
  node_builder["PC builder<br/>[Main.java]"]
  node_build["Build state<br/>[PCBuild.java]"]
  node_recommend["Build recommender"]
  node_persistence["Save and load"]
end

subgraph group_parts["Parts catalog"]
  node_catalog["Parts catalog"]
  node_component["Component model<br/>[Component.java]"]
  node_cpu["CPU<br/>[CPU.java]"]
  node_motherboard["Motherboard<br/>[Motherboard.java]"]
  node_gpu["GPU<br/>[GPU.java]"]
  node_ram["RAM<br/>[RAM.java]"]
  node_storage["Storage<br/>[Storage.java]"]
  node_psu["Power supply<br/>[PowerSupply.java]"]
  node_case["PC case<br/>[PCCase.java]"]
  node_data["Parts data<br/>[Components.json]"]
end

subgraph group_analysis["Build analysis"]
  node_compatibility["Compatibility checker"]
  node_bottleneck["Bottleneck analyzer"]
end

subgraph group_errors["Validation errors"]
  node_exception["ECPC exceptions<br/>[ECPCException.java]"]
  node_budget["Budget exception"]
  node_incompatible["Incompatibility exception"]
  node_incomplete["Incomplete build exception"]
  node_invalid["Invalid input exception"]
end

node_user(("Builder"))

node_user -.->|"uses console"| node_builder
node_builder -.->|"requests build"| node_recommend
node_builder -.->|"edits build"| node_build
node_recommend -->|"selects parts"| node_catalog
node_recommend -->|"assembles build"| node_build
node_catalog -.->|"loads parts"| node_data
node_build -->|"validates build"| node_compatibility
node_builder -.->|"requests analysis"| node_bottleneck
node_builder -.->|"saves or loads"| node_persistence
node_build -->|"stores selections"| node_component
node_cpu -->|"extends"| node_component
node_motherboard -->|"extends"| node_component
node_gpu -->|"extends"| node_component
node_ram -->|"extends"| node_component
node_storage -->|"extends"| node_component
node_psu -->|"extends"| node_component
node_case -->|"extends"| node_component
node_budget -->|"extends"| node_exception
node_incompatible -->|"extends"| node_exception
node_incomplete -->|"extends"| node_exception
node_invalid -->|"extends"| node_exception

click node_builder "https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/Main.java"
click node_build "https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/PCBuild.java"
click node_recommend "https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/BuildRecommender.java"
click node_persistence "https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/tree/main/src"
click node_catalog "https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/tree/main/src"
click node_component "https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/Component.java"
click node_cpu "https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/CPU.java"
click node_motherboard "https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/Motherboard.java"
click node_gpu "https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/GPU.java"
click node_ram "https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/RAM.java"
click node_storage "https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/Storage.java"
click node_psu "https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/PowerSupply.java"
click node_case "https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/PCCase.java"
click node_data "https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/Components.json"
click node_compatibility "https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/CompatibilityChecker.java"
click node_bottleneck "https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/BottleneckAnalyzer.java"
click node_exception "https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/ECPCException.java"
click node_budget "https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/BudgetExceededException.java"
click node_incompatible "https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/IncompatibleComponentException.java"
click node_incomplete "https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/IncompleteBuildException.java"
click node_invalid "https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/InvalidInputException.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_builder,node_build,node_recommend,node_persistence toneBlue
class node_catalog,node_component,node_cpu,node_motherboard,node_gpu,node_ram,node_storage,node_psu,node_case,node_data toneAmber
class node_compatibility,node_bottleneck toneMint
class node_exception,node_budget,node_incompatible,node_incomplete,node_invalid toneRose
class node_user toneIndigo
```

## Components

### Build interaction

- [PC builder](https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/Main.java): `src/Main.java`
- [Build state](https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/PCBuild.java): `src/PCBuild.java`
- [Build recommender](https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/BuildRecommender.java): `src/BuildRecommender.java`
- [Save and load](https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/tree/main/src): `src`

### Parts catalog

- [Parts catalog](https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/tree/main/src): `src`
- [Component model](https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/Component.java): `src/Component.java`
- [CPU](https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/CPU.java): `src/CPU.java`
- [Motherboard](https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/Motherboard.java): `src/Motherboard.java`
- [GPU](https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/GPU.java): `src/GPU.java`
- [RAM](https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/RAM.java): `src/RAM.java`
- [Storage](https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/Storage.java): `src/Storage.java`
- [Power supply](https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/PowerSupply.java): `src/PowerSupply.java`
- [PC case](https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/PCCase.java): `src/PCCase.java`
- [Parts data](https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/Components.json): `src/Components.json`

### Build analysis

- [Compatibility checker](https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/CompatibilityChecker.java): `src/CompatibilityChecker.java`
- [Bottleneck analyzer](https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/BottleneckAnalyzer.java): `src/BottleneckAnalyzer.java`

### Validation errors

- [ECPC exceptions](https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/ECPCException.java): `src/ECPCException.java`
- [Budget exception](https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/BudgetExceededException.java): `src/BudgetExceededException.java`
- [Incompatibility exception](https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/IncompatibleComponentException.java): `src/IncompatibleComponentException.java`
- [Incomplete build exception](https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/IncompleteBuildException.java): `src/IncompleteBuildException.java`
- [Invalid input exception](https://github.com/an-family-oop101/ecpc-efficient-custom-personal-computer-builder/blob/main/src/InvalidInputException.java): `src/InvalidInputException.java`

### Other components

- **Builder**

## Connections

- Builder → PC builder: uses console (evidence: `README.md`)
- PC builder → Build recommender: requests build (evidence: `README.md`)
- PC builder → Build state: edits build (evidence: `README.md`)
- Build recommender → Parts catalog: selects parts (evidence: `src/BuildRecommender.java`)
- Build recommender → Build state: assembles build (evidence: `src/BuildRecommender.java`)
- Parts catalog → Parts data: loads parts (evidence: `README.md`)
- Build state → Compatibility checker: validates build (evidence: `src/PCBuild.java`)
- PC builder → Bottleneck analyzer: requests analysis (evidence: `README.md`)
- PC builder → Save and load: saves or loads (evidence: `README.md`)
- Build state → Component model: stores selections (evidence: `src/PCBuild.java`)
- CPU → Component model: extends (evidence: `src/CPU.java`)
- Motherboard → Component model: extends (evidence: `src/Motherboard.java`)
- GPU → Component model: extends (evidence: `src/GPU.java`)
- RAM → Component model: extends (evidence: `src/RAM.java`)
- Storage → Component model: extends (evidence: `src/Storage.java`)
- Power supply → Component model: extends (evidence: `src/PowerSupply.java`)
- PC case → Component model: extends (evidence: `src/PCCase.java`)
- Budget exception → ECPC exceptions: extends (evidence: `src/BudgetExceededException.java`)
- Incompatibility exception → ECPC exceptions: extends (evidence: `src/IncompatibleComponentException.java`)
- Incomplete build exception → ECPC exceptions: extends (evidence: `src/IncompleteBuildException.java`)
- Invalid input exception → ECPC exceptions: extends (evidence: `src/InvalidInputException.java`)
