# PhoenixKitOG v0.1.0 - Table of Contents

> OpenGraph template + hierarchical assignment module for PhoenixKit

## Pages

- [Changelog](changelog.md)

## Modules

- [PhoenixKitOG](PhoenixKitOG.md): OpenGraph template + hierarchical assignment plugin for PhoenixKit.
- [PhoenixKitOG.ActivityLog](PhoenixKitOG.ActivityLog.md): Thin wrapper around `PhoenixKit.Activity.log/1` for the OG plugin.
- [PhoenixKitOG.Assignments](PhoenixKitOG.Assignments.md): Context for binding templates to scopes inside a consumer module's
hierarchy.
- [PhoenixKitOG.Canvas](PhoenixKitOG.Canvas.md): Pure helpers for manipulating a template's canvas JSON. The editor LV
calls these on the in-memory canvas map; persistence is a separate
`Templates.update/2` step.
- [PhoenixKitOG.Errors](PhoenixKitOG.Errors.md): Central mapping from error atoms (returned by `PhoenixKitOG.Templates`,
`PhoenixKitOG.Assignments`, and the render pipeline) to translated,
user-facing strings.
- [PhoenixKitOG.Paths](PhoenixKitOG.Paths.md): Centralized path helpers — every link routes through
`PhoenixKit.Utils.Routes.path/1` so the configured admin prefix and
locale handling are honored.

- [PhoenixKitOG.Render](PhoenixKitOG.Render.md): Top-level rendering facade. Given a template + binding values,
produces a PNG (cached) and returns its public URL.
- [PhoenixKitOG.Render.Cache](PhoenixKitOG.Render.Cache.md): On-disk cache for rendered OG PNGs.
- [PhoenixKitOG.Render.Placeholder](PhoenixKitOG.Render.Placeholder.md): Stand-in image for previews and any other spot that needs a
reference visual when a real image slot is unresolved.
- [PhoenixKitOG.Render.Rasterizer](PhoenixKitOG.Render.Rasterizer.md): SVG → PNG conversion. Shells out to `rsvg-convert` (librsvg). The
binary is part of the `librsvg2-bin` package on Debian/Ubuntu — if
not installed, rendering returns `{:error, :rasterizer_missing}` and
`refine_og/4` falls back to the input OG map so nothing crashes
user-facing.
- [PhoenixKitOG.Render.Svg](PhoenixKitOG.Render.Svg.md): Converts a canvas spec + binding values into a clean SVG string
suitable for rasterization by `rsvg-convert` / librsvg.
- [PhoenixKitOG.Routes](PhoenixKitOG.Routes.md): Route registration for routes that can't be inlined on a `Tab` —
notably the per-template editor at `/admin/open-graph/:uuid/edit`.
- [PhoenixKitOG.Schemas.Assignment](PhoenixKitOG.Schemas.Assignment.md): Binds a template to a scope inside a consumer module's hierarchy.
- [PhoenixKitOG.Schemas.Template](PhoenixKitOG.Schemas.Template.md): A reusable OpenGraph design — canvas + ordered elements with variable
bindings. Persisted as JSONB so the structure can evolve (new element
types) without a schema change.
- [PhoenixKitOG.Slots](PhoenixKitOG.Slots.md): Scans a canvas for `{{slot}}` references — the abstract, template-
local names that get wired to concrete module variables at assignment
time.
- [PhoenixKitOG.Templates](PhoenixKitOG.Templates.md): Context for managing OpenGraph templates. CRUD only — the editor and
renderer live elsewhere.
- [PhoenixKitOG.Variables](PhoenixKitOG.Variables.md): Registry + resolver for module-exposed variables that templates can
bind their slots to.
- [PhoenixKitOG.Web.AssignmentsLive](PhoenixKitOG.Web.AssignmentsLive.md): Assignments admin — the overview of every template binding + a
single modal for creating **or** editing an assignment.
- [PhoenixKitOG.Web.EditorLive](PhoenixKitOG.Web.EditorLive.md): The OG template editor — WYSIWYG SVG canvas on the left, element
library + property panel on the right.
- [PhoenixKitOG.Web.EditorLive.Template](PhoenixKitOG.Web.EditorLive.Template.md): HEEx render template for the OG editor. Split out from the LV module
so the event-handler code stays scannable.
- [PhoenixKitOG.Web.ImageController](PhoenixKitOG.Web.ImageController.md): Serves rendered OG PNGs from the on-disk cache.
- [PhoenixKitOG.Web.TemplatesLive](PhoenixKitOG.Web.TemplatesLive.md): Admin landing page for the OG module — lists templates and the
create/delete actions. The visual editor is Phase 2; this page only
carries minimal CRUD scaffolding so the module is interactive end-to-end.

