Active DevelopmentSystemsProduct

SceneForge

Local scene-to-video editor with a canonical project model, templates, timeline and history controls, autosave and recovery, and asynchronous Chromium/FFmpeg rendering with progress and cancellation.

JavaScriptTypeScriptReactFFmpegHeadlessNode.js
Private repository

The problem

Producing short motion graphics from code normally means either a heavyweight editor or a cloud rendering service. Neither lets you write a scene as ordinary HTML, CSS and JavaScript and get a video file back on your own machine.

Context and constraints

A local scene-to-video tool grown from its original manifest pipeline into an integrated editor. The canonical project model now connects templates, assets, timeline, history, persistence and rendering without cloud APIs or remote uploads.

  • Scene code is arbitrary HTML, CSS and JavaScript supplied by the user, so the editor preview and the renderer need different trust models.
  • Multiple scenes share a video timeline, so composition must keep their CSS isolated and their boundaries aligned.
  • Rendering drives a real browser and encoder. Progress and cancellation do not solve durable scheduling or capacity management.
  • Project settings carry output width, height and frame rate; scene boundaries must line up with the configured frame timeline.
  • One upstream dependency could not be installed from its published package at all, which forced a vendoring decision.

What I built

A package-based toolchain for shared schemas, templates, composition, assets, timeline, persistence, renderer and editor history. The React/Monaco editor integrates visual controls, playback, undo/redo, autosave and recovery. The Express API renders canonical projects asynchronously with progress and cancellation while retaining the legacy manifest path.

Architecture

The editor maintains a canonical project with templates, assets and timeline settings. Persistence supports autosave and recovery; the API tracks render jobs while composition, Chromium capture and FFmpeg produce the video.

authorresolvesavesubmitcompileplacerenderframesencodeEditorReact, Vite, MonacoCanonical projectScenes, assets, settingsRender jobsProgress and cancellat…CompositionsOne document per sceneTimelineStart and durationHeadless ChromeFrame captureFFmpegEncodeMP4Configured dimensions …Templates and assetsLocal project resourcesPersistenceAutosave, recovery, po…
Illustrative architecture drawn from the project documentation. It is not a screenshot of the editor and not a frame from a render — no render artifact is published with this project, so none is shown.
Editor
React, Vite, Monaco
Canonical project
Scenes, assets, settings
Render jobs
Progress and cancellation; in memory
Compositions
One document per scene
Timeline
Start and duration
Headless Chrome
Frame capture
FFmpeg
Encode
MP4
Configured dimensions and frame rate
Templates and assets
Local project resources
Persistence
Autosave, recovery, portable container

My contribution

Sole engineer. Rendering and composition pipeline, canonical project model, templates and assets, editor history and persistence, and frontend/backend integration.

Technical decisions

What was chosen, why, and what it cost.

Compile each scene into its own document

Decision
Every scene becomes a separate composition document, embedded into the output with its own start time and duration, rather than all scenes sharing one page.
Why
Separate documents give each scene its own CSS scope, so a scene can style the page body normally and cannot leak styles into the scene after it. Sharing a document would have made every selector a potential collision.
Trade-off
More documents to coordinate, and anything intended to persist across scenes has to be arranged deliberately rather than simply existing on the page.

The preview sanitises and never executes scene JavaScript

Decision
The in-browser preview renders sanitised markup only. Scene JavaScript runs during the render and nowhere else.
Why
The preview lives in the author's own browser session. Executing arbitrary scene JavaScript there would put the editor at the mercy of the content it is editing.
Trade-off
The preview cannot show scene JavaScript behaviour; its playback controls are not proof of parity with the renderer.

Strip script tags and reject navigating scene code

Decision
Script tags inside a scene's markup are stripped, JavaScript belongs in a dedicated field, and scene code that tries to navigate the page is rejected outright with a client error.
Why
A scene that navigates the rendering browser breaks the render for every scene after it, and inline scripts blur the boundary between markup and behaviour that the rest of the pipeline depends on.
Trade-off
A legitimate pattern — an inline bootstrap script — has to be rewritten to fit the manifest shape.

Vendor the character engine rather than depend on it

Decision
The mascot engine is committed into the repository as a pinned build, with refresh instructions recorded next to the code that uses it.
Why
Its published package cannot be installed — the manifest fails version parsing — so a normal dependency was not available.
Trade-off
Updates are manual and the vendored copy can drift from upstream, which is why the refresh procedure is documented rather than assumed.

Security and reliability

The failure modes that shaped the implementation.

Two trust models for the same code

The preview sanitises markup and never runs scene JavaScript; the renderer executes it in a browser it controls. The split is deliberate — the risky operation happens where the blast radius is a render job rather than the author's session.

Manifest limits are enforced, not assumed

Scene identifiers must match a restricted character set, and the manifest is capped at twenty scenes of sixty seconds each. Validation rules are covered by the test suite.

Breakout escaping is tested

Scene content is embedded into generated documents, so the tests specifically cover escaping that would otherwise let style or script content break out of its container.

Render job state is not durable

The asynchronous API reports progress and supports cancellation through an AbortController. Its active-job map is in memory, not a persistent scheduler or a tested concurrent-service guarantee.

Verification

How the implementation was checked, and how much of that can be shown publicly.

  • Backend test suiteevidenced

    The legacy backend suite covers manifest validation, timeline arithmetic and breakout escaping. Package tests cover project schemas, renderer planning/capture, persistence and editor history. Test sources and documented runs were inspected, not rerun for this update.

  • Environment check endpointevidenced

    A diagnostic endpoint reports whether Chrome, FFmpeg, disk and GPU are actually available, so a render failure can be told apart from a missing dependency.

  • Hardware-specific benchmark documentationevidenced

    The repository documents a pinned-rasterizer benchmark on named hardware and separates capture time from encoding time. It is a reported measurement, not a general speed claim or an independently repeated result.

  • No published render outputnot publicly evidenced

    The repository's output directory contains no committed video, so there is no render artifact to show and none is claimed. The pipeline is described rather than demonstrated.

  • Renderer determinism tests are documentedevidenced

    Renderer tests compare decoded frames from repeated renders and pin the rasterization backend. Documentation limits reproducibility to the same machine and configuration; these tests were not independently rerun here.

Results

  • The original manifest pipeline remains available; the integrated editor now renders canonical projects with configurable output settings and asynchronous job status.
  • Scenes are CSS-isolated from each other by construction rather than by naming convention.
  • Two upstream rendering quirks were diagnosed and worked around: a package that cannot be installed from its published manifest, and a build variant that throws inside its render loop under headless Chrome and paints nothing.

Limitations and disclosure

What this project does not do, and what cannot be shown publicly.

  • Rendering remains CPU-heavy. Job status and cancellation are implemented, but jobs are tracked in memory rather than a durable queue; restarting the backend loses job state.
  • The preview uses sanitized markup and CSS in a sandboxed iframe without scene JavaScript. Playback controls do not establish parity with rendered JavaScript animation.
  • The character engine is vendored as a pinned build because its published package fails to install, so updates are manual and can drift from upstream.
  • No committed render artifact is available to show. Tests and hardware-specific benchmarks are documented, but were not independently rerun for this portfolio update; no general performance guarantee is claimed.

The repository is private. This page summarizes reviewed source and documentation, including the legacy pipeline and newer editor packages. No private source, editor screenshot, rendered frame or video is published. The repository contains tests and hardware-specific benchmark documentation; no general performance or production-readiness guarantee is inferred.

Other projects in the same engineering domains.