Skip to main content

End-to-End System Architecture

📌 What is this for? (Quick Summary for New Interns)​

In Simple Words:
This page shows the big picture of how all the pieces connect.
If someone asks: "How does the speed number on my laptop screen actually get there from the vehicle?" — this page explains that journey:

  1. Physical sensors on the vehicle measure speed, battery voltage, and temperatures.
  2. A Raspberry Pi on the vehicle collects these numbers and sends them over cellular or Wi-Fi to AWS cloud servers.
  3. Cloud databases store the numbers.
  4. Your web browser requests the latest numbers every second and displays them on dials and in an interactive 3D simulation.

1. Multi-Tier Architecture Diagram​


2. The 3 Data Pipelines Explained​

2.1 Sensor Numbers Pipeline (Every 1 Second)​

  1. Sensors broadcast: Sensors on the vehicle broadcast their measurements 10 times a second over the vehicle's internal CAN network wires.
  2. Raspberry Pi ingests: A program called go_server reads these raw bytes on port 20006, converts them into normal numbers (like 364 Volts or 45 km/h), and uploads them.
  3. Cloud stores: The numbers are saved in InfluxDB Cloud (a time-series database designed for sensor charts).
  4. Dashboard displays: The web dashboard asks our AWS API Gateway for the newest numbers once a second, updating the gauges and the 3D position.

2.2 Operator Control Pipeline (Instant Action)​

  1. Operator clicks a button: The operator clicks Enable Battery or Launch Pod.
  2. Permission check: The dashboard verifies that the logged-in user is an Admin or Engineer (managers have view-only rights).
  3. AWS IoT command: A lightweight command is sent through AWS IoT Core down to the vehicle within 200 milliseconds.
  4. Physical switch engages: The vehicle's main battery switch closes, turning on 364V power.
  5. Voltage confirmation: The dashboard waits to physically see the battery voltage read above 48 Volts before enabling the Launch button.

2.3 Live Camera Pipeline (Under 1 Second Delay)​

  1. Two IP cameras on the vehicle point forward down the track (CAM 1) and backwards into the dock (CAM 2).
  2. The stream_service program optimizes the video feed so that keyframes are sent every second with zero buffering delays.
  3. MediaMTX converts the stream to WebRTC so web browsers can play it immediately with zero plugins.

3. Network Ports & Firewall Rules​

ServiceProtocolPortWho ConnectsWhat It Is Used For
Go Gateway ServerTCP20006Vehicle sensors / SimulatorIngestion of raw CAN sensor packets
Emulator Web UIHTTP5001EngineersLocal test control panel to start simulated runs
MediaMTX RTSPTCP8554Pod Camera ForwarderIngestion of video from the vehicle
MediaMTX WebRTCHTTP/HTTPS8889Web BrowsersUltra-fast video playback in your browser
MediaMTX MediaUDP8189Web BrowsersVideo data packets
AWS API GatewayHTTPS443Web BrowsersMain backend REST API (POST /api)
InfluxDB CloudHTTPS443Gateway & LambdaStoring and querying historical sensor numbers