{"id":28427209,"url":"https://github.com/fulygon/homepage-widgets-gateway","last_synced_at":"2025-07-03T23:30:43.364Z","repository":{"id":289233989,"uuid":"970064532","full_name":"FuLygon/homepage-widgets-gateway","owner":"FuLygon","description":"API Gateway that minimize response data for Homepage widgets","archived":false,"fork":false,"pushed_at":"2025-05-07T06:00:37.000Z","size":129,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-05T12:09:38.680Z","etag":null,"topics":["dashboard","gateway-api","homepage"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FuLygon.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}},"created_at":"2025-04-21T12:06:48.000Z","updated_at":"2025-05-07T06:00:35.000Z","dependencies_parsed_at":"2025-04-23T05:27:30.435Z","dependency_job_id":null,"html_url":"https://github.com/FuLygon/homepage-widgets-gateway","commit_stats":null,"previous_names":["fulygon/homepage-proxy-server","fulygon/homepage-widgets-gateway"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/FuLygon/homepage-widgets-gateway","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuLygon%2Fhomepage-widgets-gateway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuLygon%2Fhomepage-widgets-gateway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuLygon%2Fhomepage-widgets-gateway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuLygon%2Fhomepage-widgets-gateway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FuLygon","download_url":"https://codeload.github.com/FuLygon/homepage-widgets-gateway/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuLygon%2Fhomepage-widgets-gateway/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263420723,"owners_count":23464000,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["dashboard","gateway-api","homepage"],"created_at":"2025-06-05T12:09:44.288Z","updated_at":"2025-07-03T23:30:43.353Z","avatar_url":"https://github.com/FuLygon.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# API Gateway for Homepage Widgets Integration\n\n[![Publish to GitHub Container Registry](https://github.com/FuLygon/homepage-widgets-gateway/actions/workflows/publish-package.yaml/badge.svg)](https://github.com/FuLygon/homepage-widgets-gateway/actions/workflows/publish-package.yaml)\n\nA simple API Gateway for integrating with [Homepage](https://github.com/gethomepage/homepage) widgets.\n\n_But why? Homepage already has a bunch of widgets already integrated, and it already worked out of the box?_\nYes it does, and if you didn't expose your Homepage instance to the public, you can ignore this and use existing integrations Homepage already has.\n\nBut if you are exposing your homepage instance to the public, you need to know that some Homepage integrations are returning **way too much** data to the client, including _possibly_ sensitive data. You can verify this with browser **DevTools**, and start inspecting the response of all the `GET /api/services/proxy` API made by Homepage. Some of the example widgets that are responding too much data than needed are:\n\n- [Adguard Home](https://gethomepage.dev/widgets/services/adguard-home): the response includes information such as most queried/blocked domains, client list and their IP, ...\n- [Nginx Proxy Manager](https://gethomepage.dev/widgets/services/nginx-proxy-manager): the response includes information such as the proxy hosts, their domain name, forwarded host/port, advanced config, ...\n- [Portainer](https://gethomepage.dev/widgets/services/portainer): the response includes information related to docker like container command/entrypoint, which image was used, port and network settings, ...\n- [Gotify](https://gethomepage.dev/widgets/services/gotify): the response includes a lot of sensitive data such as application/client token, message content, ...\n\nThis API Gateway will minimize the amount the data responded that Homepage needed to render.\n\n## How it works\n\nFairly simple, Homepage will make an API request of a specific integration via this API Gateway instead of directly into the target service. This API Gateway then makes a request to the target service to fetch the data, similar to how the existing Homepage integrations work, but it will process the response and only return the data needed back to Homepage. This way, no unnecessary data will be exposed to the public.\n\nMost of the integrations and mapping will be using existing implementation from [source code](https://github.com/gethomepage/homepage/tree/dev/src/widgets) by Homepage as a reference to process the data.\n\nIf it's not possible to map the responding data for Homepage integration, then [Custom API](https://gethomepage.dev/widgets/services/customapi) will be used as a fallback method for integrating. I _might_ as well use it to implement other integrations that I need but aren't supported by Homepage.\n\n## Supported Integrations\n\nCurrently only support a few integrations:\n\n- Adguard Home\n- Gotify\n- Linkwarden\n- Nginx Proxy Manager\n- Portainer\n- Uptime Kuma\n- WUD (What's Up Docker)\n\nIntegrations that Homepage doesn't support (will be using Custom API widget):\n\n- ASF (ArchiSteamFarm)\n- Komodo\n- WireGuard\n- Your Spotify\n\nInitially I planned to make this only for my own Homepage instance. So if there are any integrations that aren't supported, then tough luck. I don't plan to add more integrations unless I need them.\n\nBut if you implement your own integrations, feel free to open a PR if you want, and I'll check it out.\n\nAlso note that this should only be used if the current Homepage widgets expose too much sensitive data. If not, it's better to use the existing implementation by Homepage.\n\n## Setting up the API Gateway\n\n### Docker Installation\n\n- Prepare the `.env` file:\n\n```bash\nwget https://raw.githubusercontent.com/fulygon/homepage-widgets-gateway/main/.env.example -O .env\n```\n\n- Modify the `.env` to your need. Then deploy the service with docker. Compose file example:\n\n```yaml\nservices:\n  homepage:\n    image: ghcr.io/gethomepage/homepage:latest\n    container_name: homepage\n    # other configurations for homepage service\n\n  homepage-widgets-gateway:\n    image: ghcr.io/fulygon/homepage-widgets-gateway:latest\n    container_name: homepage-widgets-gateway\n    env_file: .env\n```\n\n### Source Installation\n\nMake sure [Go](https://go.dev/doc/install) is installed.\n\n- Clone the repo:\n\n```bash\ngit clone https://github.com/FuLygon/homepage-widgets-gateway.git\ncd homepage-widgets-gateway\n```\n\n- Prepare the `.env` file:\n\n```bash\ncp .env.example .env\n```\n\n- Modify the `.env` file to your need. Then build and run:\n\n```bash\ngo build -o homepage-widgets-gateway ./cmd/main.go\n./homepage-widgets-gateway\n```\n\n## Configuration\n\nAn example Homepage widgets configuration with the API Gateway can be found [here](docs/homepage-widgets.md).\n\nNote that the API Gateway is not meant to be accessed **publicly**, only accessible by Homepage proxy. So make sure to configure your network settings (port mapping, firewall rules, ...)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffulygon%2Fhomepage-widgets-gateway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffulygon%2Fhomepage-widgets-gateway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffulygon%2Fhomepage-widgets-gateway/lists"}