ποΈ System Overview
The Svaroh platform consists of four repositories working together: a station running on Raspberry Pi, a cloud relay, a mobile app, and a public artifact repo.
Topologyβ
Station works offline
Cloud is optional. All core functionality (device control, automations, local UI) runs on Raspberry Pi without internet. Cloud only adds remote/mobile access.
Repositoriesβ
| Repo | Role | GitHub |
|---|---|---|
smart-home | Station monorepo: backend, frontend, ESP32 firmware, station-agent | β |
smart-home-cloud | Cloud API: auth, relay, station claiming | β |
smart-home-mobile | Expo / React Native mobile app | β |
smart-home-updates | Public distribution: agent binary, firmware, install scripts | β |
Component Responsibilitiesβ
π± Mobile Appβ
- Expo / React Native, talks only to Cloud (HTTPS + WSS)
- Never connects directly to Station
- BLE provisioning of new ESP32 devices
- Source β
βοΈ Cloudβ
- Fastify + PostgreSQL + WebSocket server
- Owns: users, auth, station registry
- Does not store device data β proxies via JSON-RPC
peer.call()over WSS to Station - Source β
π Station (Raspberry Pi)β
- station-agent β SEA Node binary, manages Docker, self-updates from
smart-home-updates - backend (Docker) β Fastify, owns device data, MQTT bridge, WebSocket for frontend
- frontend (Docker) β React SPA, served by Nginx
- PostgreSQL + MQTT (Docker)
- Source β
π‘ ESP32 Devicesβ
- PlatformIO projects per device type:
esp32-climate,esp32-pir,esp32-light,esp32-switch-pir - All built on shared
SmartHomeCorelibrary (Wi-Fi, MQTT, BLE, OTA) - Connect to Station's MQTT broker
- Source β
Key Principlesβ
- β Mobile talks ONLY to Cloud β never directly to Station
- β Cloud is a relay β device data lives on Station
- β Station works offline β Cloud is optional
- β Updates are pulled β Station fetches artifacts from public GitHub repo