You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+34-18Lines changed: 34 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,40 +1,56 @@
1
1
# CLAUDE.md
2
2
3
-
teslamate-dash: read-only, self-hosted dashboard for TeslaMate. Single Go binary, embedded web UI, one container.
3
+
teslamate-dash: read-only, self-hosted dashboard for TeslaMate. Single Go binary, embedded React web UI, one container. The visual reference is `TeslaMate Dash.dc.html` (open in a browser); the UI matches it.
4
4
5
5
## Layout
6
6
7
-
-`main.go` server + graceful shutdown, embeds `web/`.
# open http://localhost:4001 (DEMO mode with synthetic data)
39
50
```
40
51
41
-
Or with Go (1.22+):
52
+
Or with Go (1.22+) and Node (20+):
42
53
43
54
```bash
44
-
go run .# demo mode when no DATABASE_HOST/TC_DSN is set
55
+
(cd src/web && npm install && npm run build) # build the embedded UI first
56
+
go run ./src # demo mode when no DATABASE_HOST/TC_DSN is set
45
57
```
46
58
47
59
### Published image
@@ -74,7 +86,9 @@ Or add it to your existing TeslaMate `docker-compose.yml` as another service:
74
86
75
87
```yaml
76
88
dash:
77
-
build: ./teslamate-dash # or image: ghcr.io/youruser/teslamate-dash
89
+
build: # or image: ghcr.io/youruser/teslamate-dash
90
+
context: ./teslamate-dash
91
+
dockerfile: docker/Dockerfile
78
92
environment:
79
93
- DATABASE_HOST=database
80
94
- DATABASE_USER=teslamate_ro
@@ -219,8 +233,6 @@ All configuration is via environment variables. `TC_`-prefixed names override th
219
233
| `TC_UNITS` | `km` | `km` or `mi` |
220
234
| `TC_TITLE` | `TeslaMate Dash` | Header title |
221
235
| `TC_MAP_STYLE_URL` | OpenFreeMap Positron | MapLibre style URL. Point at your own tiles for full privacy. |
222
-
| `TC_DOWNSAMPLE` | `4` | Keep every Nth GPS point when drawing routes (higher is lighter) |
223
-
| `TC_REDACT_HOME` | `true` | Reserved flag for hiding the home area in shareable views. Parsed and exposed on `/api/config`, but not yet enforced, so it currently has no visible effect. |
224
236
| `TC_DEMO` | auto | Force synthetic data on or off |
225
237
226
238
## Privacy
@@ -236,28 +248,42 @@ This data is your home address, geofences, and full movement history. The app is
236
248
237
249
## How it works
238
250
239
-
A single Go binary embeds the web UI and talks to Postgres over a read-only `pgx` pool. The frontend is
240
-
MapLibre GL plus a little vanilla JS, with no build step.
251
+
A single Go binary embeds the built web UI and talks to Postgres over a read-only `pgx` pool. The
252
+
frontend is React + TypeScript (Vite) with MapLibre GL; position traces are simplified server-side
253
+
(Douglas-Peucker) so map payloads stay small even for six-hour drives.
0 commit comments