Skip to content
Apexify.jsDocs
Apexify.js version v5.4.5

Recipes · guide

Why ApexPainter — goals & when to use

Current Apexify.js 6.0.0 documentation for Why ApexPainter — goals & when to use.

apexify.jsRuntime: nodeCURRENTSince 6.0.0

Apexify.js centers on ApexPainter: a Node-friendly façade over @napi-rs/canvas (and optional FFmpeg-backed createVideo). You describe what should appear on a bitmap — backgrounds, images, text, charts, paths — and get Buffer outputs you can save, upload, base64-encode, or pipe into GIF / video tooling.


What problem Apexify solves

NeedHow ApexPainter helps
Server-side thumbnails, cards, OG imagescreateCanvas → createImage / createText → save / outPut
_repeatable branded layoutsCanvasConfig (and SceneBuilder / templates when you want graphs / $ assets)
Data viz as PNGcreateBarChart / createPieChart / … → same buffer pipeline
Short motioncreateGIF, animate
Media housekeepingcreateVideo (probe, trim, filters, …); videoPipeline + createAudio for editor-style stacks when FFmpeg is available
Batch / pipelinesbatch (parallel), chain (sequential buffer handoff), painter.image (stitch, compress, resize, …)

The library’s goal is to keep one mental model: canvas-sized bitmap → layered draws → PNG bytes, plus helpers that orbit that core (pixels, hit tests, standalone painter.image file ops).


Why a single façade (ApexPainter)

  • Shared defaults — output type (buffer, base64, …), save counter session, assets for $ resolution.
  • Discoverability — painter.path2d, painter.pixels, painter.detect, painter.image, painter.video group related APIs instead of flat dozens of imports.
  • Composable pipelines — chain can mix createCanvas, path2d.draw, createText without juggling hidden global state.

Implementation detail (lib-next/): logic is split into creates/, facets.ts, domain folders (gif/, video/, chart/) — ApexPainter stays the stable surface for consumers.


What you can realistically achieve

  • Automation: cron / CI / bots generating images from JSON / DB rows.
  • Products: invite cards, leaderboards, coupon graphics, progress badges (components), chart snapshots for Slack / email.
  • Tooling: bulk resize / palette extract / stitch (painter.image), lightweight FFmpeg scripts via createVideo.

See What you can build for a feature-by-feature mapping.


When something else might fit better

SituationAlternative mindset
Browser-only UI (live DOM canvas, no Node buffers)Native canvas / Skia / WebGL in the client — Apexify targets server / worker-with-node-canvas workflows.
Print-first PDF / CMYK / multipage layoutDedicated layout / PDF engines — Apexify focuses raster PNG / JPEG / WebP.
Full video editors (NLE)createVideo + videoPipeline cover transcode, trim, captions, and SFX — not a drag-and-drop timeline UI; you build the editor UX yourself.

How recipes fit

Recipes encode one vertical slice (“social card”, “daily chart PNG”) using the mental model above. Feature guides document every option. Read Recipes hub for recipe-*.mdx conventions.


Next steps