{"id":43000702,"url":"https://github.com/roessland/withoutings","last_synced_at":"2026-01-31T04:05:42.089Z","repository":{"id":65183708,"uuid":"417819292","full_name":"roessland/withoutings","owner":"roessland","description":"Web application giving users of Withings devices access to their health data . DDD/clean-code. Future goals are to stream data to Dropbox, Google Drive, IFTTT and similar services.","archived":false,"fork":false,"pushed_at":"2024-06-01T12:13:46.000Z","size":928,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T16:35:34.508Z","etag":null,"topics":["clean-architecture","ddd","health-data","quantified-self","sleep-tracker","withings"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/roessland.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2021-10-16T12:18:28.000Z","updated_at":"2024-06-01T12:13:50.000Z","dependencies_parsed_at":"2026-01-28T21:02:00.141Z","dependency_job_id":null,"html_url":"https://github.com/roessland/withoutings","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/roessland/withoutings","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roessland%2Fwithoutings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roessland%2Fwithoutings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roessland%2Fwithoutings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roessland%2Fwithoutings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roessland","download_url":"https://codeload.github.com/roessland/withoutings/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roessland%2Fwithoutings/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28928776,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T04:05:25.756Z","status":"ssl_error","status_checked_at":"2026-01-31T04:02:35.005Z","response_time":128,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["clean-architecture","ddd","health-data","quantified-self","sleep-tracker","withings"],"created_at":"2026-01-31T04:05:41.433Z","updated_at":"2026-01-31T04:05:42.081Z","avatar_url":"https://github.com/roessland.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Withoutings\n\nDemo application for talking with Withings API. It is written in Go with few dependencies, and uses PostgreSQL as a\ndatabase. The code is organized using DDD-ish / Clean Architecture-ish principles, based on the book and articles\nby https://threedots.tech/.\n\n![screenshot-2024-03-03.png](docs/screenshot-2024-03-03.png)\n\n![screenshot-2023-05-01.png](docs/screenshot-2023-05-01.png)\n\n\n## Features\n\n### Currently available features\n\n- Lets users log in with Withings OAuth and stores their access token in the database.\n- Lets users subscribe to notifications from Withings.\n- Stores received notifications in the database.\n- Downloads available data relevant to the received notifications and stores it in the database.\n\n### Planned features\n\n- Forward received notifications and their payloads to webhooks, IFTTT, Dropbox, Google Drive, etc.\n- Download historical data, not just data corresponding to notifications.\n\n## Technologies used\nWithoutings uses a pragmatic stack that is simple to maintain and deploy:\n- Go\n- PostgreSQL\n- Server-side rendering with Go's html/template\n- No JavaScript so far. But might add HTMX.\n\n### ...and not used\n- Redis (unlogged tables are good enough)\n- ORM (sqlc is superior)\n- Dedicated queue/pubsub (Postgres all the way!)\n\n# Installation and setup\n\nThe application serves a website and runs services that talk with the Withings API. Therefore it must have a public URL\nthat can receive webhooks sent by the Withings Notification service.\n\n## Set up a Withings Developer account\n\nGo to the [Withings Developer Dashboard](https://developer.withings.com/dashboard/).\nCreate a new application.\n\n## Define environment variables\n\nSee [env.example.sh](env.example.sh). Make a copy of it named `env.dev.sh` and fill in the values.\n\n```bash\nsource env.sh \u0026\u0026 go run cmd/main.go\n```\n\nThe webhook secret must be added in the registered callback path in the Withings Developer Dashboard.\nSee `env.example.sh`.\n\n# Development\n\n## Forward remote port to local port\n\nTo receive webhooks in your development environment, you can forward a remote port to your local port.\n\nWithings calls `https://withings.mywebsite.com/auth/callback` which is\nforwarded to port 3628 on the server (e.g. using Caddy or nginx), which\nis again forwarded to port 3628 in your development environment.\n\n### Using SSH\n\n```bash\n# Using SSH\nssh -R 3628:127.0.0.1:3628 -N -f myuser@withings.mywebsite.com\n```\n\n### Using Caddy and Tailscale\n\nSet up Tailscale on your development machine and the server. Then add the following to your Caddyfile:\n\n```Caddyfile\nwithings-dev.example.com {\n        reverse_proxy /* \u003cdev-machine-name\u003e:3628 {\n        }\n}\n```\nThe server must also listen on the Tailscale interface. Configure that in `env.dev.sh`.\n```shell\nexport WOT_LISTEN_ADDR='\u003cdev-machine-tailscale-ip\u003e:3628';\n```\n\n## Migrations\n\nMigrations are managed using golang-migrate. The library is embedded in the build, so you can run migrations using `withoutings migrate`.\n\n### Create migration\n\nAppend a new migration file in the `migration` directory.\n\n### Run all necessary migrations\n\n```\nsource env.sh \u0026\u0026 withoutings migrate\n```\n\n### Revert migration\n\nManually revert by executing the `down` SQL from the migration file.\nRemember to also decrement the migration version in the `schema_migrations` table.\n\n## SQL queries\n\nGo code is generated from SQL queries using [sqlc](https://docs.sqlc.dev/).\nThe schema is inferred using the migration files.\n\n### Install sqlc\n\n```sh\nbrew install sqlc\n# or\ngo install github.com/kyleconroy/sqlc/cmd/sqlc@latest\n```\n\n## Mock generation\n\nMocks are generated using [mockery](https://github.com/vektra/mockery).\n\n### Install [mockery](https://github.com/vektra/mockery)\n\n```sh\nbrew install mockery\n```\n\n### Generate mocks\n\nFor now, you have to generate mocks using go generate.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froessland%2Fwithoutings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froessland%2Fwithoutings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froessland%2Fwithoutings/lists"}