# horsemann07/ridecast architecture

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

- Interactive diagram: https://gitdiagram.com/horsemann07/ridecast
- Repository: https://github.com/horsemann07/ridecast

## Overview

RideCast is an embedded communications application intended to bridge a phone/PC and a vehicle cluster. The visible runtime is an ESP32-oriented application with Wi-Fi and UART app modules, configuration, and a BSP providing hardware-facing Wi-Fi/UART APIs plus console, CLI, and logging support. The README describes broader Bluetooth, CAN/USB, routing, encryption, and remote-diagnostics capabilities, but corresponding implementation directories are absent from this tree; they are not represented as runtime components. Source excerpts do not expose app-level call details, so the graph uses only the documented layer direction and visible module boundaries.

Main entry points: [`app/srcs/ridecast_main.c`](https://github.com/horsemann07/ridecast/blob/master/app/srcs/ridecast_main.c) (RideCast control), [`app/srcs/wifi_app.c`](https://github.com/horsemann07/ridecast/blob/master/app/srcs/wifi_app.c) (Wi-Fi app), [`app/srcs/uart_app.c`](https://github.com/horsemann07/ridecast/blob/master/app/srcs/uart_app.c) (UART app), [`bsp/srcs/port/esp32/bsp_uart.c`](https://github.com/horsemann07/ridecast/blob/master/bsp/srcs/port/esp32/bsp_uart.c) (UART driver)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["Application"]
  node_entry["App entry<br/>[app_main.c]"]
  node_ridecast["RideCast control<br/>[ridecast_main.c]"]
  node_config["App configuration<br/>[app_config.c]"]
  node_wifiapp["Wi-Fi app<br/>[wifi_app.c]"]
  node_uartapp["UART app<br/>[uart_app.c]"]
end

subgraph group_board["Board support"]
  node_bspconfig["BSP configuration<br/>[bsp_cfg_map.c]"]
  node_wifi["Wi-Fi driver<br/>[bsp_wifi.c]"]
  node_uart["UART driver<br/>[bsp_uart.c]"]
end

subgraph group_runtime["Runtime services"]
  node_console["Console<br/>[bsp_console.c]"]
  node_cli["CLI<br/>[bsp_cli.c]"]
  node_logger["BSP logger<br/>[bsp_log.c]"]
  node_osal["OS abstraction<br/>[bsp_osal.c]"]
end

node_phone(("Phone / PC"))
node_cluster(("Vehicle cluster"))
node_serialpeer(("Serial peer"))

node_phone -->|"wireless data"| node_wifiapp
node_entry -->|"starts"| node_ridecast
node_ridecast -->|"uses settings"| node_config
node_ridecast -->|"dispatches"| node_wifiapp
node_ridecast -->|"dispatches"| node_uartapp
node_wifiapp -->|"uses BSP"| node_wifi
node_uartapp -->|"uses BSP"| node_uart
node_uart -->|"serial transfer"| node_serialpeer
node_cluster -->|"serial link"| node_serialpeer
node_bspconfig -->|"configures"| node_osal
node_cli -->|"uses transport"| node_console
node_logger -->|"outputs logs"| node_console

click node_entry "https://github.com/horsemann07/ridecast/blob/master/app/main/app_main.c"
click node_ridecast "https://github.com/horsemann07/ridecast/blob/master/app/srcs/ridecast_main.c"
click node_config "https://github.com/horsemann07/ridecast/blob/master/app/app_config/app_config.c"
click node_wifiapp "https://github.com/horsemann07/ridecast/blob/master/app/srcs/wifi_app.c"
click node_uartapp "https://github.com/horsemann07/ridecast/blob/master/app/srcs/uart_app.c"
click node_bspconfig "https://github.com/horsemann07/ridecast/blob/master/bsp/bsp_config/bsp_cfg_map.c"
click node_wifi "https://github.com/horsemann07/ridecast/blob/master/bsp/srcs/port/esp32/bsp_wifi.c"
click node_uart "https://github.com/horsemann07/ridecast/blob/master/bsp/srcs/port/esp32/bsp_uart.c"
click node_console "https://github.com/horsemann07/ridecast/blob/master/bsp/srcs/core/bsp_console.c"
click node_cli "https://github.com/horsemann07/ridecast/blob/master/bsp/srcs/core/private/bsp_cli.c"
click node_logger "https://github.com/horsemann07/ridecast/blob/master/bsp/srcs/core/private/bsp_log.c"
click node_osal "https://github.com/horsemann07/ridecast/blob/master/bsp/srcs/core/private/bsp_osal.c"

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_entry,node_ridecast,node_config,node_wifiapp,node_uartapp toneBlue
class node_bspconfig,node_wifi,node_uart toneAmber
class node_console,node_cli,node_logger,node_osal toneMint
class node_phone,node_cluster,node_serialpeer toneIndigo
```

## Components

### Application

- [App entry](https://github.com/horsemann07/ridecast/blob/master/app/main/app_main.c): `app/main/app_main.c`
- [RideCast control](https://github.com/horsemann07/ridecast/blob/master/app/srcs/ridecast_main.c): `app/srcs/ridecast_main.c`
- [App configuration](https://github.com/horsemann07/ridecast/blob/master/app/app_config/app_config.c): `app/app_config/app_config.c`
- [Wi-Fi app](https://github.com/horsemann07/ridecast/blob/master/app/srcs/wifi_app.c): `app/srcs/wifi_app.c`
- [UART app](https://github.com/horsemann07/ridecast/blob/master/app/srcs/uart_app.c): `app/srcs/uart_app.c`

### Board support

- [BSP configuration](https://github.com/horsemann07/ridecast/blob/master/bsp/bsp_config/bsp_cfg_map.c): `bsp/bsp_config/bsp_cfg_map.c`
- [Wi-Fi driver](https://github.com/horsemann07/ridecast/blob/master/bsp/srcs/port/esp32/bsp_wifi.c): `bsp/srcs/port/esp32/bsp_wifi.c`
- [UART driver](https://github.com/horsemann07/ridecast/blob/master/bsp/srcs/port/esp32/bsp_uart.c): `bsp/srcs/port/esp32/bsp_uart.c`

### Runtime services

- [Console](https://github.com/horsemann07/ridecast/blob/master/bsp/srcs/core/bsp_console.c): `bsp/srcs/core/bsp_console.c`
- [CLI](https://github.com/horsemann07/ridecast/blob/master/bsp/srcs/core/private/bsp_cli.c): `bsp/srcs/core/private/bsp_cli.c`
- [BSP logger](https://github.com/horsemann07/ridecast/blob/master/bsp/srcs/core/private/bsp_log.c): `bsp/srcs/core/private/bsp_log.c`
- [OS abstraction](https://github.com/horsemann07/ridecast/blob/master/bsp/srcs/core/private/bsp_osal.c): `bsp/srcs/core/private/bsp_osal.c`

### Other components

- **Phone / PC**
- **Vehicle cluster**
- **Serial peer**

## Connections

- Phone / PC → Wi-Fi app: wireless data
- App entry → RideCast control: starts
- RideCast control → App configuration: uses settings
- RideCast control → Wi-Fi app: dispatches
- RideCast control → UART app: dispatches
- Wi-Fi app → Wi-Fi driver: uses BSP
- UART app → UART driver: uses BSP
- UART driver → Serial peer: serial transfer
- Vehicle cluster → Serial peer: serial link
- BSP configuration → OS abstraction: configures
- CLI → Console: uses transport
- BSP logger → Console: outputs logs
