Skip to content

data-engine-thinking/samples

Repository files navigation

Data Engine Thinking — Samples

Sample code, design patterns, and solution patterns that accompany the book Data Engine Thinking by Roelant Vos and Dirk Lerner.

This repository builds the companion documentation site at docs.dataenginethinking.com.

Stack

  • Astro with Starlight
  • Content authored as Markdown/MDX under src/content/docs/
  • In-site search via Pagefind (built automatically on build)

Run it locally

This is a standard Astro project, so running it after a clone is just a few commands.

Prerequisites

  • Node.js ≥ 20.3 A version manager such as fnm or nvm is the easiest way to get a matching version.

  • pnpm — the package manager is pinned in package.json, so the simplest setup is to let Corepack provide it:

    corepack enable

Run

git clone https://github.com/data-engine-thinking/samples.git
cd samples
pnpm install      # install dependencies
pnpm dev          # starts dev server at http://localhost:2330

Then open http://localhost:2330. Changes to pages (src/content/docs/) and to code samples (code/) hot-reload in the browser.

To build and preview the site exactly as it is published:

pnpm build        # generate the static site into dist/
pnpm preview      # serve the built site locally

In-site search is generated by Pagefind during pnpm build, so it works in pnpm preview but not in pnpm dev.

Layout

Path Contents
src/content/docs/ All pages: chapters, patterns, sample setup, about, license
code/ Standalone SQL / Handlebars / metadata samples, organized by chapter
astro.config.ts Site config, navigation sidebar, fonts
src/styles/custom.css Brand theme layer over Starlight

Code samples

The runnable samples live under code/, mirroring the chapter and pattern structure, so they can be opened, edited, and run on their own. Pages pull them in at build time (remark-code-import), so editing a file under code/ and rebuilding updates the corresponding page — the page and the file never drift.

Because they are plain files in the repository, you can browse or download any of them directly from GitHub under code/.

Contributing

This is a living library. Improvements, new patterns, and fixes are welcome by Pull Request — small edits (typos, clarity, examples) are just as valuable as new patterns.

License

Distributed under the GNU General Public License v3.0.

Releases

No releases published

Contributors