Prerequisites
Before you start, make sure you have the following installed:| Tool | Version | Notes |
|---|---|---|
| Node.js | 20 | See .nvmrc. Use nvm to switch versions automatically. |
| pnpm | 10 or higher | The project uses pnpm as its package manager. |
| Git | Any recent version | Required to clone the repo and compute the commit hash used in the build output. |
Setup
Fork and clone the repository
Fork stremio/stremio-web on GitHub, then clone your fork:
Use the correct Node.js version
The repository includes an
.nvmrc file pinned to Node.js 20. If you use nvm:Install dependencies
package.json.Available scripts
All scripts are defined inpackage.json and run with pnpm run <script>.
pnpm start — development server
pnpm start — development server
Starts the Webpack dev server in development mode with source maps and live rebuilds.
pnpm run start-prod — production dev server
pnpm run start-prod — production dev server
Starts the Webpack dev server in production mode. Useful for testing the optimized build locally.
pnpm run build — production build
pnpm run build — production build
Compiles and bundles the application to the
build/ directory. Output filenames include the current Git commit hash.pnpm test — run unit tests
pnpm test — run unit tests
Runs the Jest test suite.
pnpm run lint — run ESLint
pnpm run lint — run ESLint
Lints all files under The linter enforces:
src/ using the ESLint configuration in eslint.config.mjs.typescript-eslintrecommended and stylistic rules- React plugin rules
@stylistic/eslint-pluginformatting rules (4-space indent, single quotes, semicolons)- No
console.log(onlyconsole.warnandconsole.errorare allowed) - Strict equality (
===)
pnpm run scan-translations — translation key scan
pnpm run scan-translations — translation key scan
Scans the source tree for translation keys and reports any that are missing from the translation files. Runs the test at
tests/i18nScan.test.js via Jest.TypeScript compilation
The project uses a mixed JavaScript/TypeScript codebase. TypeScript is configured intsconfig.json:
strict: trueis enabled — all new TypeScript code must be strictly typed.allowJs: trueallows importing existing JavaScript files from TypeScript.- The
stremio/*path alias maps tosrc/*, so you can import withimport Foo from 'stremio/components/Foo'. - TypeScript is compiled by
ts-loaderduring the Webpack build, not bytscdirectly.
