Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Build artifacts
node_modules
.next
dist-electron
build
electron/*.js
*.tsbuildinfo

# Data and secrets — never bake into image layers; mounted/passed at runtime
Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ credentials.enc.json
# vercel
.vercel

# electron
/dist-electron/
electron/*.js

# typescript
*.tsbuildinfo
next-env.d.ts
Expand Down
5 changes: 1 addition & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
# Headless runtime for the LLM Usage Tracker — runs the Next.js standalone
# server without the Electron shell. See docs/superpowers/specs/2026-07-13-docker-deployment-design.md
# server. See docs/superpowers/specs/2026-07-13-docker-deployment-design.md

# --- Builder ---
FROM node:22-bookworm-slim AS builder
WORKDIR /app

# Electron is a devDependency; its binary is useless in the image
ENV ELECTRON_SKIP_BINARY_DOWNLOAD=1

COPY package.json package-lock.json ./
# npm silently skips optional deps on fetch errors, but the native SWC binding
# is required for turbopack builds (WASM fallback can't build) — fail fast here
Expand Down
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ flowchart TB
UP["claude.ai + api.anthropic.com<br/>chatgpt.com usage endpoints"] <-->|"30s shared TTL cache"| API
```

- **One server, many browsers.** The container serves the UI and the API on `:3789`; you open it in any browser on the tailnet. There is nothing to install per client, and no second database to reconcile. (An `electron/` shell exists in the tree from an earlier iteration and is no longer part of the product — see [Development](#development).)
- **One server, many browsers.** The container serves the UI and the API on `:3789`; you open it in any browser on the tailnet. There is nothing to install per client, and no second database to reconcile.
- **Other machines are edges, not clients.** A second machine runs its own watchers and posts batches to `POST /api/ingest/v1` with its `machine_id`; it doesn't run its own UI or DB. The Monitor and Analytics pages then scope to All or to a single machine.
- **The SQLite DB lives in a Docker named volume** (`llm-tracker-data`) — never a macOS bind mount (see [Troubleshooting](#troubleshooting) for the WAL/mmap story). Use `npm run db:export` for a host-side snapshot.

Expand Down Expand Up @@ -378,9 +378,6 @@ Delete `.next/cache` and rebuild (`docker compose up -d --build` for the contain

```
llm-usage-tracker/
├── electron/ # retired desktop shell — not part of the product, not built
│ # by `npm run build`, kept only so the legacy
│ # `npm run electron:*` scripts still resolve
├── hooks/
│ ├── agent-monitor-hook.sh # thin wrapper (keeps ~/.claude/settings.json stable)
│ ├── agent-monitor-hook.py # the actual hook: parse → discover ports → POST (one process)
Expand Down Expand Up @@ -418,7 +415,7 @@ llm-usage-tracker/
├── Dockerfile # multi-stage; standalone output; HEALTHCHECK /api/live
├── docker-compose.yml # :3789, named volume, TZ/INGEST_TOKEN/NEXT_PUBLIC_HUB_URL passthrough
├── docker-compose.local-watchers.yml # overlay: also watch this host's ~/.codex + ~/.claude/projects
└── package.json # scripts + deps (the electron-builder block is legacy)
└── package.json # scripts + deps
```

## Development
Expand All @@ -433,8 +430,6 @@ llm-usage-tracker/
| `docker compose up -d --build` | Rebuild + restart the canonical tracker |
| `bash hooks/test-hook.sh` | Fire one synthetic event of each hook type |

The `electron:*` scripts and the `electron/` directory are a retired path: the product is the container plus a browser. They are left in place so an existing checkout keeps resolving, and nothing in `npm run build`, `npm test` or the Docker image depends on them.

Style: TypeScript strict throughout; Tailwind (dark zinc theme); raw SQL with prepared statements (no ORM); DB functions synchronous by design (`better-sqlite3`); API responses always `{ success, data | error }`.

## License
Expand Down
18 changes: 0 additions & 18 deletions build/entitlements.mac.plist

This file was deleted.

2 changes: 1 addition & 1 deletion edge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"scripts": {
"start": "node bin/llm-edge.js start",
"test": "node --test test/"
"test": "node --test"
},
"dependencies": {},
"devDependencies": {}
Expand Down
Loading
Loading