Skip to content

Fork and run the source

A fork of this repository can build and run the workspace using its local packages. Use this path to contribute to StratoLMS or work from source; use the quickstart to create a standalone course project.

Install Git, Node.js 22.19.0 or newer, and the pinned pnpm 11.22.0. .nvmrc records the minimum Node version used by CI. If pnpm is missing:

Terminal window
npm install --global pnpm@11.22.0
node --version
pnpm --version

Use GitHub’s Fork button, clone your fork, and add the original repository as the upstream remote. Replace YOUR-USERNAME:

Terminal window
git clone https://github.com/YOUR-USERNAME/StratoLMS.git
cd StratoLMS
git remote add upstream https://github.com/kryzpt/StratoLMS.git
git switch -c my-first-change
pnpm install --frozen-lockfile
pnpm --filter stratolms build
pnpm --filter @stratolms/store build
pnpm --filter create-stratolms build

If you already have the source checkout, start at pnpm install.

Copy templates/starter/.env.example to apps/demo/.env. In PowerShell:

Terminal window
Copy-Item templates/starter/.env.example apps/demo/.env

On macOS or Linux:

Terminal window
cp templates/starter/.env.example apps/demo/.env

Keep an existing .env rather than overwriting your settings. Generate a local secret and paste the result into STRATO_SECRET in that file:

Terminal window
node -e "console.log(require('node:crypto').randomBytes(32).toString('hex'))"

Keep PUBLIC_SITE_URL=http://localhost:4321. The demo enables optional progress, dashboard and xAPI features for testing. For its local memory-store profile, generate a separate value for LEARNER_ID_KEY, set STRATO_UNSAFE_MEMORY_STORE=1, and set OWNER_EMAILS to your local test address. Leave real payment, email and xAPI credentials unset while browsing the sample. Provider-dependent actions require separate configuration; a demo is not a qualified payment installation. Local memory data is lost when its process ends.

Terminal window
pnpm dev

Open the localhost URL printed by Astro. No npm publication is needed. To work with the starter’s default-off configuration instead, copy the environment example to templates/starter/.env and run pnpm --filter @stratolms/starter dev; its example course starts in draft.

Never commit .env or .dev.vars. The example contains placeholders and is safe to commit; generated secrets are not.

Start with pnpm lint, pnpm typecheck, pnpm test, and pnpm verify:docs. For the full ordered gate, install Gitleaks 8.30.1, verify the release checksum, and put it on PATH or set GITLEAKS_BIN to the executable’s absolute path. For example, in PowerShell:

Terminal window
$env:GITLEAKS_BIN = 'C:\Tools\gitleaks.exe'
pnpm check:all
pnpm verify:secrets

check:all supplies synthetic test configuration and prepares local package archives. It does not publish anything. A missing Gitleaks binary fails archive preparation; it is not a passing secret check. The archive consumer test needs registry network access. Keep local settings separate from these test fixtures.

Browser checks run separately and rebuild their required Node outputs:

Terminal window
pnpm exec playwright install chromium firefox webkit
pnpm test:browser:release

Linux CI also needs Playwright’s OS dependencies (playwright install --with-deps). Vercel qualification runs on Linux; Docker validation needs a Docker-capable host. Record checks you could not run in your pull request.

Edit shared site files in templates/starter, then run pnpm sync:template and pnpm verify:template. Edit demo content directly under apps/demo/src/content. The contribution guide describes package boundaries, tests, DCO sign-offs, and opening a pull request.

To use a fork for your own course, retain the MIT copyright and license notices, replace sample content and branding, and follow the deployment guide. Keep the monorepo workspace intact when using local packages; copying only templates/starter leaves workspace:* dependencies unresolved. See the maintainer’s release procedure for the runtime, store and CLI archive inventory.