Repository navigation
Getting Started
Cosmic Lego runs on your computer and opens in a web browser. Set it up once, then reopen it when you want to explore or teach a lesson.
-
Install Node.js 20 or later and pnpm. You can check that both commands are available by running
node --versionandpnpm --versionin a terminal. -
Get the Cosmic Lego project. If you download the ZIP from Code → Download ZIP, unzip it first. Open a terminal in the project folder, alongside
package.json. -
Install the dependencies and start the app.
pnpm install --frozen-lockfile --ignore-scripts npm start
-
Open the address printed in the terminal. It is usually
http://127.0.0.1:4317/. Keep the terminal running while you use the app. If that port is already occupied and you need a separate session, runnpm start -- --port 0and use the new address it prints.
On later visits you only need npm start. On macOS, you can also double-click Start Cosmic Lego.command in the project folder after installation. It opens a running roadmap if it finds one, or starts one and opens the browser.
- On Explore astronomy, choose Available now in the Study menu. Select Exoplanets, then Planetary transits.
- Choose Watch the transit study. Press Play or drag the timeline to compare the silhouettes on the star with the measured brightness. As the two foreground shadows overlap, what happens to the light blocked by the smaller planet?
- Choose Roadmap in the player to return to the same topic. For an editable study, choose Open workspace on the roadmap.
Before stopping a session in which you made edits, open Project → Save locally or download a copy. In the terminal that started the app, press Ctrl+C to stop it. Workspace and transit study · Projects and export