Project structure
The files and folders that npx kinetograph init makes, what each is for, and where generated files go.
npx kinetograph init makes a small project with a starter title card. Keep its layout: the commands, the agent skills and Studio all look for it.
The layout
npx kinetograph init my-videomy-video
├─ src
│ ├─ index.tsx registerRoot and the compositions
│ ├─ scenes
│ │ └─ Title.tsx the starter scene
│ ├─ components pieces used by more than one scene
│ ├─ lib helpers
│ └─ google-fonts.d.ts types for @remotion/google-fonts/<Family>
├─ public files for staticFile()
│ ├─ images
│ ├─ fonts
│ ├─ audio
│ └─ video
├─ out everything the commands write
├─ package.json
├─ tsconfig.json
└─ .gitignore
The entry is src/index.tsx. It is the file you give to every command, and it must call registerRoot:
import { Composition, registerRoot } from '@kinetographdev/core';
import { Title } from './scenes/Title';
registerRoot(() => (
<Composition id="Main" component={Title} durationInFrames={60} fps={30} width={1280} height={720} />
));package.json gets four scripts (still, strip, render and check) that run the matching commands on the entry.
npx kinetograph init my-video --htmlmy-video
├─ html
│ └─ index.html the page, with its root element and timeline
├─ public images, fonts, audio, video
├─ out everything the commands write
├─ package.json
└─ .gitignore
my-video
├─ index.html the main composition
├─ compositions mounted with data-composition-src
├─ assets files the page names by path
└─ out
└─ renders videos
The entry is html/index.html, or a HyperFrames project's index.html. hyperframes.json and the planning files are not read. See HyperFrames projects.
package.json gets the same scripts (still, strip and render), with lint in place of check, which needs TypeScript.
What goes where
public/holds the files you load withstaticFile('images/logo.png'). See Assets.out/holds what a command writes when you leave out-o:out/stills/forstill,out/sheets/forstripandonion, andout/renders/forrender. It is in.gitignore.- Beside the entry, Kinetograph keeps
kinetograph.lock.json(pins for remote files, in an HTML project) andpresets/(props saved in Studio). Commit both.
init never overwrites a file and does not run npm install.
Related topics
Compositions and props explains the file src/index.tsx, and Assets the public/ folder.