chaispots
v0.0.11
Published
Veeva-first ChaiSpots Key Message builder
Downloads
41
Readme
ChaiSpots
ChaiSpots is a local Node/browser tool for building Veeva-style interactive Key Message presentations from imported slides, PDFs, images, videos, overlays, hitspots, and custom code.
The tool runs locally, launches a browser-based builder, and exports delivery-ready Key Message folders/ZIPs.
Status
ChaiSpots is currently pre-release and under active development.
The main CLI command is:
chaispotsThe preferred alias is:
chai-spotsOlder Veeva-specific command names should be considered legacy.
Requirements
Node.js and npm
ChaiSpots is a Node ESM package and requires a modern Node/npm environment.
Recommended development environment:
Node.js 20+
npm 10+The project has been developed/tested with Node 24.
Ghostscript
Ghostscript is required for PDF import/conversion.
Install Ghostscript before using PDF import.
macOS / Homebrew:
brew install ghostscriptUbuntu / Debian:
sudo apt install ghostscriptWindows:
Install Ghostscript using the official Windows installer, then make sure the gs executable is available from your terminal path.
Confirm installation:
gs --versionIf Ghostscript is missing, the builder can still run, but PDF import will fail.
Install package dependencies
From the ChaiSpots package root:
nvm use v24
npm installLink the CLI during local development
From the package root:
npm linkThen confirm the CLI is available:
chaispots --help
chai-spots --helpRecommended development workflow
Use one folder for the package source and a separate folder for test projects.
Dev/
chai-spots-veeva-npm/
chaispots-test-project/From the package root:
cd /path/to/chai-spots-veeva-npm
npm install
npm linkFrom an empty test/client project folder:
cd /path/to/chaispots-test-project
chaispots watchThis keeps package-owned source separate from project-owned files.
Package root vs project root
ChaiSpots uses two important locations.
Package root
The package root contains the reusable tool source:
app/
src/
bin/
package.json
README.mdIt owns:
builder source
server routes
build tasks
docs
runtime files
export logic
templatesProject root
The project root is the folder where chaispots is launched.
It owns:
project state
imported slides
imported assets
imported videos
preview output
export output
recovery dataThe package should not write project data into the package source folder unless you intentionally run the builder from the package root for testing.
Common commands
Start the builder server:
chaispots startBuild, watch source files, start the server, and open the builder:
chaispots watchBuild the browser app only:
chaispots buildOpen the user guide:
chaispots docsOpen the developer guide:
chaispots devdocsShow terminal help:
chaispots --helpnpm scripts
From the package root, common development scripts are:
npm run build
npm run watch
npm run docs
npm run devdocsIf a script is unavailable, use the matching CLI command directly.
Local guides
ChaiSpots includes local package-owned documentation.
User guide:
chaispots docsDeveloper guide:
chaispots devdocsThe user guide explains how to operate the tool.
The developer guide explains how the tool is structured internally.
Project output
ChaiSpots creates project-owned folders in the folder where the command is launched.
Current/target project structure:
project-folder/
chaispots.json
assets/
slides/
thumbs/
videos/
preview/
export/
recovery/Folder purpose:
assets/ Supporting files imported into Key Messages or Shared Resources
slides/ Imported slide artwork from PDFs or image sequences
thumbs/ Builder thumbnails
videos/ Imported video files
preview/ Local browser preview output
export/ Local/Veeva export output
recovery/ Recovery snapshotsOlder development builds may still create _chaispots_projects/current/. The intended pre-release direction is a flatter project-root structure.
Builder output
The package may create a package-owned builder output folder:
_chaispots_builder/This folder is safe to rebuild and should contain only reusable builder UI output.
It should never contain client/project-specific data such as imported slides, videos, hitspots, project settings, previews, or exports.
Basic usage flow
- Install dependencies.
- Install Ghostscript.
- Link or install the package.
- Create/open a project folder.
- Run
chaispots watch. - Import slides, PDFs, or images.
- Add hitspots, overlays, videos, assets, and custom code.
- Save the project.
- Build a preview.
- Export the final delivery output.
Importing
ChaiSpots supports or is intended to support:
PDF import/conversion
image sequence import
static asset import
video import
overlay image importPDF import requires Ghostscript.
Imported slide artwork should be optimized using the shared slide image settings, including max width and image quality.
Preview
Preview builds a local browser version of the project for testing interactions before export.
Use preview to test:
Key Message navigation
hitspots
overlays
videos
custom code
Shared Resources
direct-only slides
swipe behaviorExport
Export builds local delivery output, including Key Message folders/ZIPs, Shared Resources, runtime files, and diagnostics.
Typical export output lives under:
export/Generated export files should usually be rebuilt from the builder rather than edited manually.
Runtime API
Exported Key Messages expose a runtime API on:
window.CHAI
window.SPOTSCommon helpers include:
CHAI.gotoKeyMessage(id)
CHAI.gotoPrevious()
CHAI.overlay.show(id)
CHAI.overlay.hide(id)
CHAI.overlay.toggle(id)
CHAI.overlay.hideAll()
CHAI.storage.get(key, fallback)
CHAI.storage.set(key, value)
CHAI.storage.remove(key)
CHAI.getPreviousKeyMessageId()
CHAI.getLastPageViewElapsedMinutes()Use the local guide for the full CHAI API reference.
Troubleshooting
Port already in use
macOS/Linux:
lsof -i :3000
lsof -ti :3000 | xargs kill -9Windows PowerShell:
netstat -ano | findstr :3000
taskkill /PID <PID> /FPDF import fails
Check Ghostscript:
gs --versionIf the command fails, install Ghostscript or fix your terminal path.
CLI command not found
Relink the package:
cd /path/to/chai-spots-veeva-npm
npm linkThen retry:
chaispots --helpWrong project folder
Confirm you launched chaispots from the folder that should own the project files.
pwd
chaispots watchDevelopment notes
Keep these boundaries clear:
HTML owns structure.
CSS owns presentation.
JS owns behavior/state.
Node tasks own filesystem/build/import/export workflows.
Runtime files own exported presentation behavior.Avoid:
project data in package folders
hardcoded project paths
duplicated import/export image processing
builder-only logic inside runtime output
runtime behavior hidden inside UI modulesLicense
Private/internal package.
https://lucide.dev/icons/
