# open_fresco v0.1.0 - Table of Contents

> Server-side OG-image / social-card rendering, built on Fresco. A scene model (text, image, shape, button) with fills/gradients, {{slot}} templating, measured word-wrap, anchoring, and responsive sizing — rendered to SVG or PNG (via the optional resvg dependency).

## Modules

- [OpenFresco](OpenFresco.md): OG-image / social-card scenes rendered server-side, built to run on
[Fresco](https://hex.pm/packages/fresco) canvases.
- [OpenFresco.Editor](OpenFresco.Editor.md): The browser editor stage — a `Phoenix.LiveComponent` that renders a scene
as a **server-authoritative** SVG preview and lets the user select, drag,
resize, reorder, and delete elements on a Fresco-style artboard.
- [OpenFresco.Editor.Ops](OpenFresco.Editor.Ops.md): Pure scene-mutation and hit-test operations for the editor — the
**server-authoritative** core the editor LiveComponent and its JS hook
drive. Keeping them pure (no LiveView, no DOM) makes the editing model
fully testable without a browser; the interactive layer is a thin shell
over these.
- [OpenFresco.Layout](OpenFresco.Layout.md): Resolves a scene's *computed* layout before it is drawn
- [OpenFresco.Measure](OpenFresco.Measure.md): Text measurement — the primitive that turns estimate-based layout into
**measurement-accurate** layout (the checklist's "same wrap points, same
measured sizes" gate).
- [OpenFresco.OgImport](OpenFresco.OgImport.md): Convert a `phoenix_kit_og` **canvas map** into an `OpenFresco.Scene` — the
concrete step that lets an og host migrate stored templates and render them
through open_fresco.
- [OpenFresco.Rasterizer](OpenFresco.Rasterizer.md): SVG → PNG conversion, browser-free. Adopts `phoenix_kit_og`'s approach: an
embedded resvg/tiny-skia backend when available, with graceful fallbacks.
- [OpenFresco.Renderer](OpenFresco.Renderer.md): The PNG facade: scene → SVG → raster → PNG bytes. Browser-free and
deterministic.
- [OpenFresco.Scene](OpenFresco.Scene.md): The scene model: a fixed-size canvas plus a z-ordered list of elements.
- [OpenFresco.Sizes](OpenFresco.Sizes.md): Named canvas-size presets for common social-card targets. Render a
responsive scene (one built with `Scene.place/1` insets) at any of these
with `Scene.put_size/3` — or use your own dimensions; nothing here is
required, `render/3` accepts any canvas size.
- [OpenFresco.Substitute](OpenFresco.Substitute.md): Inline token substitution — the templating model shared with
`phoenix_kit_og`, ported for byte-compatibility so stored templates
migrate without rewriting bindings.
- [OpenFresco.Svg](OpenFresco.Svg.md): Scene → SVG generator. The shared intermediate representation: the editor
preview and (later) the PNG rasterizer both consume this output, so what
you edit is what renders.

