# huudongoc/server-program architecture

> Architecture diagram of the GitHub repository huudongoc/server-program, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/huudongoc/server-program
- Repository: https://github.com/huudongoc/server-program

## Overview

This tree contains two manufacturing-station applications: a PCBA test station and a calibration station. Operators configure and monitor stations; scanned units proceed through fixture-driven testing, with results sent to the shop-floor system. Calibration accepts chamber requests, checks retest status, and communicates with the shop-floor system. Utility modules support configuration, file transfer, security, and time synchronization. The README is empty and source excerpts are partial, so links for unsampled behavior are omitted; the SpaceX API files appear to be generated protocol definitions, not a demonstrated application workflow.

Main entry points: [`PCBA test server/main.py`](https://github.com/huudongoc/server-program/blob/main/PCBA%20test%20server/main.py) (PCBA station UI), [`Calibration server/main.py`](https://github.com/huudongoc/server-program/blob/main/Calibration%20server/main.py) (Calibration station UI), [`PCBA test server/util/Automation.py`](https://github.com/huudongoc/server-program/blob/main/PCBA%20test%20server/util/Automation.py) (Test automation), [`Calibration server/util/sfc_api_connect.py`](https://github.com/huudongoc/server-program/blob/main/Calibration%20server/util/sfc_api_connect.py) (SFC connector)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pcba["PCBA Testing"]
  node_pcba_app["PCBA station UI<br/>[main.py]"]
  node_pcba_runner["PCBA test server"]
  node_fixture["Fixture control<br/>[fixture.py]"]
  node_automation["Test automation<br/>[Automation.py]"]
end

subgraph group_calibration["Calibration"]
  node_cal_app["Calibration station UI<br/>[main.py]"]
  node_cal_server["Calibration server"]
  node_cal_sfc["SFC connector<br/>[sfc_api_connect.py]"]
end

subgraph group_shared["Station Utilities"]
  node_pcba_config["PCBA configuration<br/>[parseconfig.py]"]
  node_cal_config["Calibration configuration<br/>[parseconfig.py]"]
  node_pcba_time["PCBA time sync"]
  node_cal_time["Calibration time sync"]
end

subgraph group_api["Device API"]
  node_device_messages["Device messages<br/>[device_pb2.py]"]
  node_wifi_messages["Wi-Fi messages<br/>[wifi_pb2.py]"]
  node_report["Report generation<br/>[report.py]"]
end

node_operator(("Station operator"))
node_sfc["Shop-floor system"]

node_operator -->|"operates"| node_pcba_app
node_pcba_app -->|"starts testing"| node_pcba_runner
node_pcba_app -->|"controls fixture"| node_fixture
node_pcba_app -->|"submits result"| node_automation
node_pcba_app -->|"reads config"| node_pcba_config
node_pcba_app -->|"starts sync"| node_pcba_time
node_automation -->|"sends result"| node_sfc
node_operator -->|"operates"| node_cal_app
node_cal_app -->|"serves requests"| node_cal_server
node_cal_app -->|"checks retests"| node_cal_sfc
node_cal_app -->|"reads config"| node_cal_config
node_cal_app -->|"starts sync"| node_cal_time
node_cal_sfc -->|"exchanges data"| node_sfc

click node_pcba_app "https://github.com/huudongoc/server-program/blob/main/PCBA%20test%20server/main.py"
click node_pcba_runner "https://github.com/huudongoc/server-program/blob/main/PCBA%20test%20server/pcba_test_server.py"
click node_fixture "https://github.com/huudongoc/server-program/blob/main/PCBA%20test%20server/util/fixture.py"
click node_automation "https://github.com/huudongoc/server-program/blob/main/PCBA%20test%20server/util/Automation.py"
click node_cal_app "https://github.com/huudongoc/server-program/blob/main/Calibration%20server/main.py"
click node_cal_server "https://github.com/huudongoc/server-program/blob/main/Calibration%20server/calibration_server.py"
click node_cal_sfc "https://github.com/huudongoc/server-program/blob/main/Calibration%20server/util/sfc_api_connect.py"
click node_pcba_config "https://github.com/huudongoc/server-program/blob/main/PCBA%20test%20server/util/parseconfig.py"
click node_cal_config "https://github.com/huudongoc/server-program/blob/main/Calibration%20server/util/parseconfig.py"
click node_pcba_time "https://github.com/huudongoc/server-program/blob/main/PCBA%20test%20server/util/sync_client_time.py"
click node_cal_time "https://github.com/huudongoc/server-program/blob/main/Calibration%20server/util/sync_client_time.py"
click node_device_messages "https://github.com/huudongoc/server-program/blob/main/fastpcba-master%4026ac1c13246/spacex_api/device/device_pb2.py"
click node_wifi_messages "https://github.com/huudongoc/server-program/blob/main/fastpcba-master%4026ac1c13246/spacex_api/device/wifi_pb2.py"
click node_report "https://github.com/huudongoc/server-program/blob/main/fastpcba-master%4026ac1c13246/utils/report.py"

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_pcba_app,node_pcba_runner,node_fixture,node_automation toneBlue
class node_cal_app,node_cal_server,node_cal_sfc toneAmber
class node_pcba_config,node_cal_config,node_pcba_time,node_cal_time toneMint
class node_device_messages,node_wifi_messages,node_report toneRose
class node_operator,node_sfc toneIndigo
```

## Components

### PCBA Testing

- [PCBA station UI](https://github.com/huudongoc/server-program/blob/main/PCBA%20test%20server/main.py): `PCBA test server/main.py`
- [PCBA test server](https://github.com/huudongoc/server-program/blob/main/PCBA%20test%20server/pcba_test_server.py): `PCBA test server/pcba_test_server.py`
- [Fixture control](https://github.com/huudongoc/server-program/blob/main/PCBA%20test%20server/util/fixture.py): `PCBA test server/util/fixture.py`
- [Test automation](https://github.com/huudongoc/server-program/blob/main/PCBA%20test%20server/util/Automation.py): `PCBA test server/util/Automation.py`

### Calibration

- [Calibration station UI](https://github.com/huudongoc/server-program/blob/main/Calibration%20server/main.py): `Calibration server/main.py`
- [Calibration server](https://github.com/huudongoc/server-program/blob/main/Calibration%20server/calibration_server.py): `Calibration server/calibration_server.py`
- [SFC connector](https://github.com/huudongoc/server-program/blob/main/Calibration%20server/util/sfc_api_connect.py): `Calibration server/util/sfc_api_connect.py`

### Station Utilities

- [PCBA configuration](https://github.com/huudongoc/server-program/blob/main/PCBA%20test%20server/util/parseconfig.py): `PCBA test server/util/parseconfig.py`
- [Calibration configuration](https://github.com/huudongoc/server-program/blob/main/Calibration%20server/util/parseconfig.py): `Calibration server/util/parseconfig.py`
- [PCBA time sync](https://github.com/huudongoc/server-program/blob/main/PCBA%20test%20server/util/sync_client_time.py): `PCBA test server/util/sync_client_time.py`
- [Calibration time sync](https://github.com/huudongoc/server-program/blob/main/Calibration%20server/util/sync_client_time.py): `Calibration server/util/sync_client_time.py`

### Device API

- [Device messages](https://github.com/huudongoc/server-program/blob/main/fastpcba-master%4026ac1c13246/spacex_api/device/device_pb2.py): `fastpcba-master@26ac1c13246/spacex_api/device/device_pb2.py`
- [Wi-Fi messages](https://github.com/huudongoc/server-program/blob/main/fastpcba-master%4026ac1c13246/spacex_api/device/wifi_pb2.py): `fastpcba-master@26ac1c13246/spacex_api/device/wifi_pb2.py`
- [Report generation](https://github.com/huudongoc/server-program/blob/main/fastpcba-master%4026ac1c13246/utils/report.py): `fastpcba-master@26ac1c13246/utils/report.py`

### Other components

- **Station operator**
- **Shop-floor system**

## Connections

- Station operator → PCBA station UI: operates
- PCBA station UI → PCBA test server: starts testing
- PCBA station UI → Fixture control: controls fixture
- PCBA station UI → Test automation: submits result
- PCBA station UI → PCBA configuration: reads config
- PCBA station UI → PCBA time sync: starts sync
- Test automation → Shop-floor system: sends result
- Station operator → Calibration station UI: operates
- Calibration station UI → Calibration server: serves requests
- Calibration station UI → SFC connector: checks retests
- Calibration station UI → Calibration configuration: reads config
- Calibration station UI → Calibration time sync: starts sync
- SFC connector → Shop-floor system: exchanges data
