Skip to content
screenjson

Microservice

greenlight

Greenlight is a Go/Svelte job-queue microservice that wraps screenjson-cli. It ingests from S3 or MinIO, runs pipelines of conversion, validation, encryption, and packaging tasks on a worker pool, and delivers results back to object storage.

greenlight hero image
Repository private
Container ghcr.io/screenjson/greenlight

What it is

Greenlight is a job queue manager for ScreenJSON. It’s what you put in front of an archive of 5,000 .fdx files, or a nightly pipeline that converts incoming submissions, or a multi-tenant SaaS that needs to expose conversion as a service without giving every user a shell on the CLI.

Under the hood it wraps screenjson-cli and adds everything you need to run that CLI reliably, at scale, against an object store: a Redis-backed queue, a worker pool, pluggable blob storage (S3, Azure, MinIO), a pipeline definition language for chaining tasks, a REST API, WebSocket progress events, and a Svelte admin UI.

S3 ingest → Redis job → Worker claims → Engine runs screenjson CLI → Upload to S3

What’s in the box

  • Backend in Go. A web server, REST API, WebSocket progress channel, and a worker pool that wraps the screenjson binary.
  • Frontend in Svelte + Tailwind. A single-page admin UI served by the Go process — job list, live progress, submission form, task catalogue.
  • Runtime contract. Every service exposes the same health, OpenAPI, auth, and queue/storage contracts so they compose cleanly.

Tasks

Tasks are declared in config/tasks.yml and composed into pipelines. Out of the box:

TaskInputOutput
convert-fdx-to-screenjson.fdxScreenJSON
convert-fountain-to-screenjson.fountainScreenJSON
convert-fadein-to-screenjson.fadeinScreenJSON
convert-pdf-to-screenjson.pdfScreenJSON
export-to-fdx.jsonFinal Draft
export-to-fountain.jsonFountain
export-to-fadein.jsonFadeIn
export-to-pdf.jsonPDF
validate-screenjson.jsonvalidation report
encrypt-screenjson.jsonencrypted ScreenJSON
decrypt-screenjson.jsondecrypted ScreenJSON
zip-outputanyZIP archive

Pipelines

Pipelines are declarative — an ordered list of tasks with shared variables:

{ "tasks": ["convert-fdx-to-screenjson", "validate-screenjson"] }

Multi-format delivery:

{ "tasks": ["export-to-fdx", "export-to-fountain", "export-to-pdf", "zip-output"] }

Encrypt-for-distribution with a shared secret:

{
  "tasks": ["convert-fountain-to-screenjson", "encrypt-screenjson"],
  "vars": { "encrypt_key": "mysecretkey123" }
}

Deploy

Docker

docker build -f deployment/Dockerfile -t screenjson/greenlight:latest .

Docker Compose

cd deployment
docker-compose up

That starts Redis, MinIO, and Greenlight on port 19000. Drop a file into the MinIO ingest/ bucket, pick a pipeline in the admin UI, watch it move through the worker pool.

Kubernetes

Greenlight is designed to scale horizontally. Run the Go binary as a Deployment, point it at a shared Redis and a shared S3-compatible bucket, set the worker pool size per-replica, and let Kubernetes handle the rest.

Developer setup

brew install go redis node
cp env.example backend/.env

# Backend
cd backend && go run cmd/greenlight/main.go

# Frontend (separate terminal)
cd frontend && npm i && npm run dev

API

Greenlight’s REST API accepts job submissions, lists queues, and streams progress over WebSocket. The full OpenAPI spec ships in the repo. The docs site has the auth, rate-limit, and webhook notification details.

When to use it

Use Greenlight when the CLI alone isn’t enough:

  • You have more than one job at a time and you care about order, priority, or retries.
  • Your content lives in S3/Azure/MinIO, not on a single disk.
  • You need a user-facing UI, a REST API, or webhook notifications for other services.
  • You want to scale workers horizontally under Kubernetes.

For a single-file, single-user workflow, screenjson-cli is the right tool. Greenlight is the tier above that.

Next