Tokokino is a client-heavy screenshot and video composer built with Next.js. It focuses on fast, in-browser editing — backgrounds, overlays, device frames, 3D shapes, text and annotation layers, templates, and a per-canvas animation timeline — exporting stills (PNG/JPEG/WebP) or animations (WebM/MP4/GIF) entirely on-device, with share flows backed by Cloudflare services.
- Next.js
16.2.12, React19.2.x, TypeScript5.9.x - Zustand for editor state
- Tailwind CSS v4 + shadcn/ui
- Mediabunny + WebCodecs for local video encoding and audio muxing
- Bundled AV1 WebAssembly decoder fallback for Safari/WebKit video export (runs entirely client-side when native AV1 decode is unavailable)
- OpenNext Cloudflare for build/deploy runtime
- Cloudflare D1 (
TOKOKINO_DB) for app/auth metadata - Cloudflare R2 for share/draft/media storage
- Node.js 20+
- pnpm 9+
git clone https://github.com/shivabhattacharjee/tokokino.git
cd tokokino
pnpm installCopy the example env file and fill in the values you need:
cp .env.example .env.localpnpm devBuild and run the production image:
docker build -t tokokino .
docker run --env-file .env.local -p 3000:3000 tokokinoRun the dev target:
docker build --target dev -t tokokino-dev .
docker run --env-file .env.local -p 3000:3000 -v "$PWD:/app" tokokino-devThe production image runs pnpm build:next during build and starts with pnpm start.
wrangler.jsonc configures the D1 binding as TOKOKINO_DB.
Apply migrations:
pnpm exec wrangler d1 migrations apply tokokino-db --local
pnpm exec wrangler d1 migrations apply tokokino-db --remotepnpm dev- Next.js dev with Turbopackpnpm typecheck- TypeScript check (tsc --noEmit)pnpm test- Vitest suites intests/pnpm lint- ESLintpnpm lint:fix- ESLint autofixpnpm lint:strict- ESLint with--max-warnings=0pnpm build- OpenNext Cloudflare buildpnpm build:next- Next.js production buildpnpm format- oxfmt on all TypeScript filespnpm format:check- oxfmt check for TypeScript filespnpm preview- OpenNext Cloudflare previewpnpm deploy- OpenNext Cloudflare deploypnpm cf-typegen- regeneratecloudflare-env.d.tsfrom Wrangler bindingspnpm build:thumbs- build overlay thumbspnpm build:backgrounds- build background thumbs/manifestpnpm build:shapes- build 3D shape thumbs/manifest
Install local overlay/device assets:
bash scripts/install-assets-local.shPaths used:
public/assets/overlays/thumbspublic/assets/device-mockupspublic/assets/device-mockups/thumbnails
See CONTRIBUTING.md.
AGPL-3.0. See LICENSE.