Start here · Lesson 1 of 15 · 5 min

Welcome. Here's the plan.

What you'll build, what Contentful is, and how to tell if your project needs it.

You’re going to build a Learn Hub: a small site that lists courses and lessons. The words and images live in Contentful. The website is built with Astro. When someone hits Publish in Contentful, the live site updates on its own.

By the last lesson you’ll also have a one-page fit report that says, with numbers, whether Contentful is the right tool for your team.

What Contentful is

Contentful is a headless CMS. It gives your team a web app for writing and organizing content, and it gives your code an API to read that content as JSON. It has no themes and no pages. How the content looks is your job.

Contentful (backend) Astro (frontend)
Who uses it Writers and editors, in a web app Visitors
What it does Stores structured content Turns it into fast HTML
Hosted on Contentful’s cloud Vercel

If you took Astro from Scratch, this is the same idea as the headless WordPress module. The difference: WordPress gives you posts and pages. Contentful makes you design your own content types first. That’s more work up front and far more flexible later.

When it fits, and when it doesn’t

Question Points to Contentful Points to Markdown in the repo
Who writes? People who don’t use git Engineers, in pull requests
Where does content show up? A site plus apps, chat, email One website
Review before publish? Roles, drafts, scheduling Pull request review
Languages Built-in locales A folder per language
Cost A paid plan for real projects Free

Keep this table in mind. You’ll answer it for real in lesson 14.

What you’ll build, lesson by lesson

  1. A content model: Author, Lesson, and Course types that link to each other
  2. Entries and images for one real course
  3. API calls with curl, then with GraphQL
  4. An Astro site that loads Contentful entries as content collections
  5. Lesson pages with rich text, code samples, and resized images
  6. A webhook that rebuilds the site on publish
  7. A preview site for drafts
  8. A migration script that changes the content model safely
  9. The fit report, and a lesson on how to talk about all of this in a technical interview

Before you start

  • Astro basics. Pages, layouts, content collections, and dynamic routes. Lessons 1 to 16 of Astro from Scratch cover all of it.
  • Node.js 22.23 or newer. Check with node -v.
  • Free GitHub and Vercel accounts for the deploy lesson.
  • A free Contentful account. You’ll make one in the next lesson.