This is a personal web page screenshotting service. Basically, it exposes an API that I can use to generate screenshot of any URL. By personal I mean that only I can use it. It is secured with JWT. But it is open source, and you can run your own instance.
It is deployed to Vercel and is inspired by Vercel’s Open Graph Image as a Service. The main difference is that this service is designed to be reusable across many use cases. It can capture arbitrary URLs and run arbitrary code. It is multi-tenant. I can reuse this service without having to share secrets.
→ Read the project introduction post for more info.
See the website for usage information.
Note: Do not send pull requests to this repository to add a new tenant. Instead, please deploy personal-puppeteer
to your own account.
-
Generate an RS256 keypair for JWT signing.
-
Edit api/auth.ts and add a new entry to the
allowList
. -
Within less than a minute Vercel will deploy the changes allowing the new tenant to use the API right away.
yarn
yarn vercel dev
This setup uses the recently-released AWS Lambda Base Images to get a development environment as closest to the actual serverless function when run in Vercel as possible. This allows you to locally test, e.g. how fonts are rendered.
docker-compose build
docker-compose run server yarn vercel login
docker-compose up
yarn
yarn vercel