Skip to content

Repository files navigation

PPTKit

PPTKit is a developer-first TypeScript toolkit for building structured, editable presentations. It provides a format-independent authoring model, a stable Canonical Presentation IR, an independent layout stage, and editable PPTX output without exposing OOXML to application code.

Project status: PPTKit is under active pre-release development. Preview packages are available on npm, and the public API may still change before a stable release.

Features

  • Method-managed presentation and slide authoring with stable document-wide IDs.
  • Canonical Presentation IR v1 with complete diagnostics and materialized defaults.
  • Rich text, themes, paints, strokes, layouts, placeholders, notes, and accessibility metadata.
  • Images, preset shapes, anchored connectors, nested groups, and native editable tables.
  • Detached layout resolution for connector anchors and image contain/cover behavior.
  • Editable PPTX generation with native layouts, theme parts, notes, tables, media, and relationships.
  • Browser-neutral byte generation plus a Node.js adapter for local assets and file output.
  • Modern-browser SVG previews for slide QA without parsing or rendering PPTX.

Installation

PPTKit's development and installation toolchain requires Node.js 20 or newer. The default Core, SVG renderer, and PPTX byte-generation entry points run in modern browsers without Node APIs. Install the current preview packages with pnpm:

pnpm add @pptkit/core @pptkit/pptx-exporter

or:

npm install @pptkit/core @pptkit/pptx-exporter

Use @pptkit/core for authoring and validation. Use the default exporter entry for browser generation, or the Node entry when writing a local .pptx file:

PPTKit is currently pre-release. See Install PPTKit for package entry points, runtime requirements, and asset behavior. Then continue with the Quick Start to create your first deck.

Presentation Skill

The ordinary-user pptkit-presentation skill and its guided presentation workflow now live in the separate PPTKit Presentation product repository.

Quick Start

The following example assumes PPTKit is installed in your project and writes an editable hello-pptkit.pptx file.

import{createPresentation,validatePresentation}from"@pptkit/core";import{writePptx}from"@pptkit/pptx-exporter/node";constpresentation=createPresentation({metadata: {title: "Hello PPTKit",author: "Example Team"},theme: {colors: {accent1: "2457D6"}},});constslide=presentation.addSlide();slide.addElement({type: "text",content: [{runs: [{text: "Hello ",style: {fontSize: 36}},{text: "PPTKit",style: {fontSize: 36,bold: true,color: {theme: "accent1"}},},],}],box: {x: 64,y: 64,width: 520,height: 72},});constdiagnostics=validatePresentation(presentation);if(diagnostics.some((diagnostic)=>diagnostic.severity==="error")){thrownewError(JSON.stringify(diagnostics,null,2));}constresult=awaitwritePptx(presentation,{output: "./hello-pptkit.pptx",});console.log(result.status,result.output,result.warnings);

See the full Quick Start for validation, browser generation, assets, and warnings. Contributors can run the checked example from the Developer Workflow.

Packages

PackageResponsibility
@pptkit/coreAuthoring model, elements, assets, themes/layouts, validation, and Canonical IR.
@pptkit/layoutDetached connector and image geometry resolution.
@pptkit/pptx-exporterBrowser-neutral editable PPTX generation and Node.js file output.
@pptkit/svg-rendererBrowser-oriented SVG preview generation from resolved presentation state.
@pptkit/cliThin command workflow shell; its authoring command surface is not stable yet.

Parser packages remain roadmap work. See the package overview.

Architecture

The implemented forward pipeline is:

Authoring Model → validation/normalization → Canonical IR v1
→ Layout Result → PPTX Package Model → .pptx

The separation keeps mutable authoring state, layout behavior, and OOXML packaging independently testable. Start with the Architecture Overview and Core Authoring Model.

Documentation

Development

This section is for contributors working from the PPTKit monorepo. The complete Developer Workflow covers setup, validation, documentation checks, and the examples workbench.

pnpm install
pnpm dev
pnpm build
pnpm typecheck
pnpm lint
pnpm test

pnpm dev starts the local examples workbench at http://localhost:3210. See CONTRIBUTING.md for contribution expectations.

Roadmap

The project roadmap separates implemented foundations, public-preview gates, layout fidelity, import/round-trip work, ecosystem expansion, and deferred Office features.

Contributing

Issues and contributions should preserve package ownership, add focused tests, update public/architecture documentation, and pass build, typecheck, lint, and test checks. See CONTRIBUTING.md for the complete workflow.

License

PPTKit is licensed under the MIT License.

About

Modern presentation generation toolkit for JavaScript.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages