A Tesla Model Y style driving dashboard for iPhone: a big speedometer over a live Apple Map that follows your heading, fed by your car's data through the Tesla Fleet API with realtime updates over WebSocket.
flowchart LR
car["Tesla vehicle<br/>(your Model Y)"]
fleet["Tesla Fleet API"]
telemetry["Tesla fleet-telemetry"]
backend["backend (Node)<br/>OAuth + tokens<br/>WebSocket hub"]
cosmos[("Cosmos DB")]
app["iPhone app (SwiftUI)<br/>Apple Map + speedometer dial"]
car --> fleet
car --> telemetry
backend -->|poll vehicle_data| fleet
telemetry -->|POST decoded records| backend
backend -->|persist events| cosmos
backend -->|ws://…/stream| app
| Path | What it is |
|---|---|
backend/ |
Node + TypeScript service: Tesla OAuth, token storage, data sources (simulator, Fleet API poll, and Fleet Telemetry push), Cosmos DB event persistence, and a WebSocket hub that streams VehicleState to the app. |
ios/ |
Native SwiftUI iPhone app: Apple MapKit background, Tesla-style speedometer, heading-follow camera, realtime WebSocket client. |
docs/ARCHITECTURE.md |
System overview, realtime data-flow diagram, and component responsibilities. |
docs/TESLA_FLEET_API_SETUP.md |
Step-by-step Tesla Fleet API onboarding (developer app, keys, OAuth, scopes). |
You can run the entire thing with fake but realistic driving data, no Tesla account required, then flip a switch to use your real car later.
# 1. backend
cd backend
cp .env.example .env # SOURCE=simulator is the default
npm install
npm run dev # WebSocket at ws://localhost:8080/stream# 2. iOS app
cd ../ios
brew install xcodegen # one-time
xcodegen generate # creates TeslaDash.xcodeproj from project.yml
open TeslaDash.xcodeprojSet the backend URL, then run on a device or simulator. You'll see the speedometer climb and the map follow a simulated drive. The map uses Apple MapKit, so no API key or billing is required.
- Follow
docs/TESLA_FLEET_API_SETUP.mdto register a developer app, host your public key, and get OAuth credentials. - In
backend/.envsetSOURCE=teslaand fill the Tesla values. npm run dev, openhttp://localhost:8080/auth/loginonce to authorize your Tesla account, then run the app.
See backend/README.md for the full backend reference.
