Skip to main content
Photo Sphere Viewer is developed in TypeScript and SASS. The repository is a Turborepo monorepo containing the core package, official adapters, and plugins. Builds are powered by tsup (an esbuild-based toolkit). Documentation is generated with VitePress and TypeDoc. Linting uses ESLint and Stylelint. Tests run with Mocha (unit) and Cypress (end-to-end).

Prerequisites

Node.js 24 or later is required. Older versions are not supported.
The repository uses Yarn 1 (Classic) as its package manager. Install dependencies from the repo root:
yarn install

Repo structure

repo/
├── packages/       # Core, adapters, and plugins (one package per directory)
├── docs/           # VitePress documentation site
├── cypress/        # Cypress end-to-end tests
├── build/          # Build scripts and utilities
└── package.json    # Root scripts (Turbo)
All packages/* entries are Yarn workspaces. Turbo is used to run tasks across all workspaces in the correct dependency order.

Development commands

Dev server

Launch a live-reloading dev server for all packages.

Documentation

Serve the VitePress documentation site locally.

Linting

Run ESLint and Stylelint across the entire repo.

Tests

Run unit tests (Mocha) and end-to-end tests (Cypress).

Dev server

# Start the dev server (watches all packages)
npm run serve

# Watch only selected packages (interactive prompt)
npm run serve-filter

Documentation

# Serve docs locally
npm run doc:serve

# Build the documentation
npm run doc:build

Building

# Build all packages
npm run build

Linting

# Run all linters
npm run lint

Testing

npm run test
Unit tests are written with Mocha and live alongside each package.
To test local changes in a consuming project, register all packages with npm link:
npm run npm-link
This runs npm link for every package in packages/*, making them available globally so you can link them into your project with npm link @photo-sphere-viewer/<package>.

Making changes

1

Fork and clone the repository

Fork the repo on GitHub, then clone your fork:
git clone https://github.com/<your-username>/Photo-Sphere-Viewer.git
cd Photo-Sphere-Viewer
yarn install
2

Start the dev server

Run the dev server to watch for changes across all packages:
npm run serve
Use npm run serve-filter to watch only the packages you are actively editing.
3

Make your changes

Edit source files inside packages/<package-name>/src/. TypeScript and SASS files are compiled automatically while the dev server is running.
4

Run linting and tests

Before opening a pull request, make sure linting and tests pass:
npm run lint
npm run test
5

Open a pull request

Push your branch and open a pull request against main on the upstream repository.

Credits

The following photos and videos are used across the demos:
DemoAuthor
sphere, sphere-tiles, cubemap, cubemap-tilesDamien Sorel
sphere-tiles-24k, cubemap-tiles-24kGreg Zaal
artist-workshopOliksiy Yakovlyev
equirectangular-videoMettle Communications
cubemap-videoThe Dalí Museum
dualfisheyeJonna Luostari

Build docs developers (and LLMs) love