System Architecture
A three-tier platform spanning custom ESP32 hardware, Docker-orchestrated edge compute, and optional cloud—all connected by CAN bus.
Full-Stack, From Microcontroller to Mobile App
30+ open-source repositories (and growing) under the MIT license. Three architectural tiers that operate independently and sync when connected.
System Diagram
Three tiers connected by standard protocols. Cloud is optional—the vehicle operates fully offline.
WebSocket
MapLibre / MQTT
Bridge
Local + TLS
WebSocket
Workflows
MBTiles
PWA
Layer by Layer
Each tier is independently functional. Together they form a complete Software Defined Vehicle platform.
Device Tier — Custom ESP32 Modules
14+ hardware modules designed in KiCAD with open schematics, PCB layouts, and 3D-printable enclosures. Each module runs FreeRTOS firmware built with PlatformIO.
- ESP32 and ESP32-C6 microcontrollers
- CAN bus communication (TWAI driver)
- Over-the-air firmware updates
- Optional BLE, WiFi, and ESP-NOW
- Shared libraries for common functions
CAN Bus — The Backbone
The same automotive-grade communication standard used in cars, trucks, and heavy equipment. All modules connect via a 4-wire daisy-chain cable.
- 500 kbps with galvanic isolation
- Priority-based message arbitration
- Standard and extended frames
- Up to 40 meters of cable length
- Add or remove modules without rewiring
Edge Tier — In-Vehicle Compute
A Docker Compose stack running on a Raspberry Pi or Orange Pi inside the vehicle. Provides dashboards, automation, offline maps, and the CAN-to-MQTT bridge.
- Mosquitto MQTT broker (local + TLS)
- Node.js REST API with WebSocket
- Node-RED visual automation engine
- Tileserver GL for offline navigation
- PWA dashboard accessible from any browser
- MongoDB for local data caching
Cloud Tier — Optional Remote Access
A self-hostable Docker Compose deployment that enables remote monitoring, push notifications, and historical data when internet is available.
- Node.js Express API with JWT auth
- MongoDB for historical data storage
- MQTT broker with TLS encryption
- WebSocket for real-time updates
- Native Android app (Kotlin / Jetpack Compose)
- Vehicle operates fully without cloud
Architecture Principles
Design decisions that set TrailCurrent apart from cloud-dependent IoT platforms.
Explore the Source
Every layer, every module, every line of code is open source on GitHub.