How makinacorpus/screamshotter works
Screamshotter is a Django microservice that accepts a webpage URL and screenshot options, validates them, invokes a Node/Puppeteer capture, and returns PNG or base64 JSON. Its API also supports the browsable interface; deployment settings enable optional Sentry reporting and an external Puppeteer endpoint. The sampled Python code shows API dispatch and capture invocation; browser internals are represented by the JavaScript entry point, but its implementation was not excerpted.
Main entry points: views.py Screenshot Endpoint · puppeteer.py Capture Runner · index.js Puppeteer Script · urls.py API Routing
Components 12
HTTP API
- API Routing
src/screenshotter/urls.py - Screenshot Endpoint
src/screenshotter/views.py - Request Validation
src/screenshotter/serializer.py - Response Renderers
src/screenshotter/renderers.py
Screenshot Capture
- Capture Runner
src/screenshotter/puppeteer.py - Puppeteer Script
src/screenshotter/js/index.js
Configuration
- Capture Settings
src/screenshotter/settings.py - Service Settings
src/screamshotter/settings/__init__.py
External Services
- Sentry
- External Puppeteer
Other components
- API Client
- Target Webpage
Connections 11
- API Client → API Routing: sends request
README.md - API Routing → Screenshot Endpoint: routes to
src/screenshotter/urls.py - Screenshot Endpoint → Request Validation: validates with
src/screenshotter/views.py - Screenshot Endpoint → Capture Runner: invokes capture
src/screenshotter/views.py - Screenshot Endpoint → Response Renderers: selects renderer
src/screenshotter/views.py - Capture Runner → Capture Settings: reads settings
src/screenshotter/puppeteer.py - Capture Runner → Puppeteer Script: runs script
src/screenshotter/puppeteer.py - Puppeteer Script → Target Webpage: captures page
- Puppeteer Script → External Puppeteer: may connect
README.md - Capture Runner → Service Settings: reads service settings
src/screenshotter/puppeteer.py - Service Settings → Sentry: initializes reporting
src/screamshotter/settings/__init__.py