Finish

That is Music, and that is Puzzle. Everything you built is running on the right, full size. Here is what went into it:

  • The CLI made the app, ran it, and added pieces and palettes.
  • One file, three parts: every view, layout and component is a .pzl file of template, script and style.
  • The router maps paths to views, with layouts, :id params and a catch-all.
  • The datastore holds albums and tracks as models, seeded by fixtures, and re-renders whatever read a record when it changes.
  • Views print data with expressions, {#if}, {#for}, display functions and translations, and keep their own state.
  • Components take props, call back through callback props, and take markup through children, slots and families.
  • Animations bring rows in and out, fade pages, and cascade cards as they scroll into view.
  • Puzzle Pieces gave Music a dialog and toasts that are yours to change, and a palette to dress them.

Take it home

Download Music saves the whole project as a zip: package.json, puzzle.config.js, every file under app/, pieces.lock, and a README. Then:

npm install
npx puzzle dev --fixtures

The albums come from app/fixtures.js, which only --fixtures loads, so a build ships without them.

Where next

The Puzzle docs go deeper on everything here, and the Puzzle Pieces library shows every piece running, ready to add. Now make something of your own.

Chapters