Contributing
Thanks for helping. Tomato Player is meant to be a community ecosystem: skins, plugins, providers and integrations from anyone. This guide gets you from clone to merged PR.
Setup
shgit clone https://github.com/playlikeboy/tomato-playercd tomato-playerpnpm install # Node 18+ and pnpm 9pnpm buildpnpm testpnpm playground # http://localhost:5173/examples/playground/
Repository layout
packages/core/ engine (state, events, providers, skins, plugins)ui/ accessible control primitives + base CSSskins/<name>/ one package per skinplugins/<name>/ one package per pluginproviders/<name>/ hls, dashintegrations/ react, vue, sveltetomato-player/ batteries-included bundle, <tomato-player>, CDN builddocs/ Markdown docs (source of truth) + researchexamples/ playground and CDN exampletemplates/ scaffolding used by `pnpm new`scripts/ validate, size budgets, scaffolder, dev server
Make a skin or plugin
shpnpm new skin aurora "Northern-lights inspired skin"pnpm new plugin sleep-timer "Pause after N minutes"
Then read Create a skin or Create a plugin.
Quality gates
pnpm run check runs everything CI runs:| Command | What it checks |
|---|---|
pnpm build | Every package builds (ESM, CJS, .d.ts; IIFE for the bundle). |
pnpm typecheck | Strict TypeScript, including noUncheckedIndexedAccess. |
pnpm test | Vitest + happy-dom, run against sources. |
pnpm validate | Package manifests: naming, tomato.kind, exports, README, scoped skin CSS, engines as peers only. |
pnpm size | Gzip budgets: core 6 KB, ui 11 KB, skin 4.5 KB, plugin 1.5 KB. |
Principles for changes
- No import-time side effects. Everything must be SSR-safe.
- Clean up. Anything you add must be removed by
destroy(). - Accessibility is not optional. Real buttons, names, keyboard support, visible focus.
- Small by default. Heavy dependencies go behind
import()and are optional peers. - No trademarks. Skins may be inspired by familiar patterns, but they must not copy logos, fonts or icons, and must be labeled unofficial.
- Respect licenses. Keep upstream notices. Check
THIRD_PARTY_NOTICES.mdwhen adding a dependency.
Commits and releases
Use Conventional Commits (
feat(skins): …, fix(core): …, docs: …). Packages are versioned together while the project is 0.x.Code of conduct
Be kind. See CODE_OF_CONDUCT.md.
Website
The site at https://playlikeboy.github.io/tomato-player/ is a Next.js app in
apps/website, built with the Astryx design system (custom tomato theme in apps/website/themes/). It renders docs/ and the root Markdown files at build time, runs live demos against the workspace packages and builds a Pagefind search index. It is deployed by .github/workflows/pages.yml on every push to main. Pull requests get a downloadable site-preview-pr-<n> artifact.shpnpm site:dev # builds the packages, then http://localhost:3000