No description
  • TypeScript 80.2%
  • Dockerfile 19.8%
Find a file
2026-01-31 12:58:30 -05:00
.github/workflows thats a forkin 2026-01-30 15:56:50 -05:00
.dockerignore thats a forkin 2026-01-30 15:56:50 -05:00
.gitignore thats a forkin 2026-01-30 15:56:50 -05:00
bun.lock eugh bun 2026-01-30 16:24:06 -05:00
Dockerfile thats a forkin 2026-01-30 15:56:50 -05:00
env.example thats a forkin 2026-01-30 15:56:50 -05:00
index.ts fix: bruhurb format block height correctly 2026-01-31 12:08:15 -05:00
package.json thats a forkin 2026-01-30 15:56:50 -05:00
pnpm-lock.yaml thats a forkin 2026-01-30 15:56:50 -05:00
README.md add: showoff pic 2026-01-31 12:57:58 -05:00
showoff.png i always forget the git add 2026-01-31 12:58:30 -05:00
tsconfig.json thats a forkin 2026-01-30 15:56:50 -05:00

pogolo widget API server for umbrelOS

Forked from https://github.com/getumbrel/umbrel-public-pool-widget

widget

This is a server application that fetches data from a specified pogolo instance's API and serves it in a formatted JSON response that's expected by umbrelOS 1.0+ to display a widget.

The server is built using the bun JavaScript runtime and toolkit, and is containerized as a distroless Docker image for umbrelOS.

Application overview

The server application is defined in index.ts. It fetches data from the upstream pogolo API, formats the data into a specific JSON structure, and serves the formatted data at the /widgets/pool endpoint.

If the pogolo API request fails for any reason, the handler returns a default response with placeholder data, so that the umbrelOS widget will still show headers for the values.

Docker overview

The Dockerfile defines a multi-stage Docker build process. The first stage uses the official bun image to compile the server application into a binary. The second stage uses a distroless glibc image to create a minimal Docker image. The compiled binary is copied from the first stage into the second stage, and the binary is run when a container is started from the image.

The Dockerfile uses build arguments to target specific architectures (x86 and arm64) during the build process. The TARGETPLATFORM argument is used to select the appropriate bun target for the architecture.

Running locally

To run the server, you can build and run a Docker container using the Dockerfile. The server will start on port 3000 and will serve data at the /widgets/pool endpoint.

Note: You will need to set the POGOLO_API_URL environment variable to the host of your upstream API before starting the server.

To install dependencies:

bun install

To run:

bun run index.ts

This project was created using bun init in bun v1.2.2. Bun is a fast all-in-one JavaScript runtime.