Skip to content

Create graphs like star-history but for Umami

License

Notifications You must be signed in to change notification settings

ari-party/umami-views

Repository files navigation

umami views

License TypeScript Express.js Airbnb ESLint Docker

graph with umami views data built on star-history

usage

$ curl -G https://example.com/svg \
    # The share url provided by Umami
    -d 'shareURL=https://umami.is/share/abcdefghijklmnop/example.com' \
    # Either light or dark, defaults to dark
    -d 'theme=light' \
    # Don't include if you don't want the svg to be transparent (value can be anything)
    -d 'transparent=1' \

the server sets the cache-control header to max-age=3600, stale-while-revalidate=21600 so clients cache the response(s) for an hour and revalidate within 6.

installation

docker

# Pull the Docker image
$ docker pull ghcr.io/ari-party/umami-views:latest

$ docker run -d --name umami-views -p 8080:8080 ghcr.io/ari-party/umami-views:latest
# `-d detached`, it will run in the background
# `--name umami-views`, assign a name to prevent a random name
# `-p 8080:8080`, replace the lefthand 8080 with a port that you prefer,
#                 the server will be available on that port for you

manual

# Clone the repository
$ git clone https://github.com/ari-party/umami-views.git

# Install the dependencies with pnpm (install with `npm i -g pnpm`)
$ pnpm install

# Copy the `.env.example` file as `.env` and edit the port to your wish

# Start the server
$ pnpm start