{"id":44390230,"url":"https://github.com/longstone/withings-sync-ui","last_synced_at":"2026-02-12T02:23:42.501Z","repository":{"id":330876694,"uuid":"1124149675","full_name":"longstone/withings-sync-ui","owner":"longstone","description":"Graphical UI for the withings-sync cli application all in docker","archived":false,"fork":false,"pushed_at":"2026-02-03T00:49:55.000Z","size":1153,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-03T02:26:21.720Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/longstone.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-12-28T12:51:03.000Z","updated_at":"2026-02-02T16:11:18.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/longstone/withings-sync-ui","commit_stats":null,"previous_names":["longstone/withings-sync-ui"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/longstone/withings-sync-ui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longstone%2Fwithings-sync-ui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longstone%2Fwithings-sync-ui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longstone%2Fwithings-sync-ui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longstone%2Fwithings-sync-ui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/longstone","download_url":"https://codeload.github.com/longstone/withings-sync-ui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longstone%2Fwithings-sync-ui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29354850,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T01:03:07.613Z","status":"online","status_checked_at":"2026-02-12T02:00:06.911Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-12T02:23:37.780Z","updated_at":"2026-02-12T02:23:42.493Z","avatar_url":"https://github.com/longstone.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Withings Sync Orchestrator\n\nSelf‑hosted web UI and scheduler for running the `withings-sync` CLI. The app wraps Withings → Garmin/TrainerRoad sync flows in a single Docker image with an Angular front end, Fastify + Prisma backend, WebSockets for interactive runs, and a SQLite data store.\n\n## Features\n- Profiles with per-user config directories and optional Garmin/TrainerRoad targets\n- Manual interactive runs with live terminal streaming over WebSocket\n- Scheduled cron runs with prompt detection + safe timeout handling\n- Encrypted secret storage (`SYNC_SECRET_KEY` or generated key file)\n- Single container build that bundles backend, frontend, and `withings-sync`\n\n\n\n## Quickstart for Users (Docker)\nUse the prebuilt container; it bundles backend, frontend, and `withings-sync`.\n```bash\ndocker run -p 3333:3333 \\\n  -v \"$(pwd)/data:/app/data\" \\\n  withings-sync-orchestrator:latest\n```\n- UI: `http://localhost:4200`\n- API: `http://localhost:3333/api`\n- Persist `data/` as a volume to keep DB, logs, and profile configs.\n\n## Architecture (high level)\n- **Frontend (Angular 20+)**: SPA served by the backend; connects to REST + WebSocket (`/api`, `/ws`).\n- **Backend (Node 24 + Fastify)**: REST routes under `backend/src/routes`, services under `backend/src/services`, scheduler jobs under `backend/src/jobs`, WebSocket handlers in `backend/src/ws`.\n- **Database (SQLite via Prisma)**: schema in `backend/prisma/schema.prisma`, client in `backend/src/db`.\n- **Data directories**: `data/` (or `DATA_DIR`) holds `db/`, `logs/`, and `withings-config/\u003cprofileId\u003e/`.\n\n## Prerequisites\n- Node.js 24.x and npm 10+ (per package)\n- Python 3 (only required inside the container to run `withings-sync`)\n\n## Quickstart for Development (local)\n```bash\n# Backend\ncd backend\nnpm install\nnpm run prisma:generate\nDATABASE_URL=file:./data/db/app.db DATA_DIR=$PWD/data npm run backend:dev\n\n# Frontend (new shell)\ncd frontend\nnpm install\nnpm run frontend:start\n```\nBackend listens on `http://localhost:3333`, frontend on `http://localhost:4200` (dev config points to the backend at `http://localhost:3333/api`).\n\n## Configuration\n- `DATA_DIR` (optional): directory for `db/`, `logs/`, `withings-config/`. Defaults to `/app/data/`.\n- `DATABASE_URL` (optional): SQLite URL, e.g. `file:./data/db/app.db`.\n- `SYNC_SECRET_KEY` (optional): 64‑char hex key for AES‑256‑CBC encryption. If not set, a key file is generated under `DATA_DIR/.sync-secret-key`.\n- Withings app config is stored per profile in `withings-config/\u003cprofileId\u003e/withings_app.json`. Do **not** commit real values. Example:\n```json\n{\n  \"client_id\": \"YOUR_CLIENT_ID\",\n  \"consumer_secret\": \"YOUR_CONSUMER_SECRET\",\n  \"callback_url\": \"https://your-domain.example/withings.html\"\n}\n```\nThe UI settings screen can distribute this file to all profiles when custom app syncing is enabled.\n\n## Tests\n- Backend: `cd backend \u0026\u0026 npm test` (Jest)\n- Frontend: `cd frontend \u0026\u0026 npm run frontend:test` (Vitest)\n- E2E (Playwright): from repo root `npm run test-e2e`\n\n## Build\n```bash\n# Backend\ncd backend \u0026\u0026 npm run backend:build\n\n# Frontend\ncd frontend \u0026\u0026 npm run frontend:build\n```\n\n## Docker (single image)\nThe provided `Dockerfile` installs `withings-sync`, builds backend + frontend, and exposes port `3000` (serve) / `3333` (API) inside the container. Typical build:\n```bash\ndocker build -t withings-sync-orchestrator .\ndocker run -p 3333:3333 -p 4200:4200 -v \"$(pwd)/data:/app/data\" withings-sync-orchestrator\n```\nPersist `data/` as a volume to keep DB, logs, and profile configs.\n\n## Security Notes\n- Never store real secrets in Git.\n- Keep `data/` and `dist/` out of version control (see `.gitignore`); they can contain logs and generated configs.\n- For responsible disclosure, open a private issue or contact the maintainers before publishing vulnerabilities.\n\n## License\nGNU Affero General Public License v3.0 (AGPL-3.0).\n\n## Contributing\nIssues and PRs are welcome. Please include:\n- What changed and why\n- How to reproduce/verify (commands, screenshots for UI)\n- Tests added/updated (or rationale if not applicable)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flongstone%2Fwithings-sync-ui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flongstone%2Fwithings-sync-ui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flongstone%2Fwithings-sync-ui/lists"}