GitHub Pages documentation

PDF generation for AWS-first teams, without a second deployment story.

folio runs from the same container image in AWS Lambda or plain Docker, stores output in S3, and exposes HTML-to-PDF plus PDF operations through a single Fastify API.

Reference

API-first docs

Endpoint docs live in a dedicated reference page with request bodies, response examples, auth behavior, and route-specific notes.

Open API reference

Local dev

One compose file

Spin up the API and MinIO locally, generate a PDF, then test the rest of the routes against the same storage flow used in production.

View quick start

Operations

Built for AWS paths

The repo includes SAM deployment, Docker support, auth, metrics, and a smoke test flow so the service is ready for hosted use, not only demos.

Read deployment notes

Quick start

Start locally in a few commands

The local stack uses MinIO for S3-compatible storage and keeps the presigned URLs host-reachable from your browser.

# Copy and edit environment variables
cp .env.example .env

# Optional: local SAM deploy config
cp samconfig.example.toml samconfig.toml

# Start API + MinIO (local S3)
docker compose up

# Generate a PDF
curl -s -X POST http://localhost:8080/pdf/generate \
  -H "Content-Type: application/json" \
  -d '{"html":"<html><body><h1>Hello</h1></body></html>"}' | jq .

Runtime model

One image, two targets

The same container image runs in Lambda or as a regular Docker service. PDF bytes go directly to S3, which keeps the service aligned with Lambda’s ephemeral filesystem model.

Current routes

Core endpoints

  • GET /health and GET /metrics
  • POST /pdf/generate
  • GET /pdf/:id and DELETE /pdf/:id
  • POST /pdf/merge, /pdf/split, /pdf/compress, /pdf/pdfa

Deployment

Published by GitHub Pages, deployable to AWS Lambda

This docs site is published from the docs/ directory via GitHub Actions. The API itself deploys with SAM as a container image and includes a smoke test step after deployment.

Browse the API reference