Skip to content
SiteShiftCo

JAMstack

An architecture for building websites using JavaScript, APIs, and pre-built Markup, with content served from a CDN rather than a traditional web server.

Also known as: Jamstack

JAMstack is an architectural pattern for building websites where the front-end is pre-built into static markup, served from a CDN, and made dynamic where needed through JavaScript and APIs. The acronym stands for JavaScript, APIs, and Markup. The pattern was popularized by Netlify around 2016 and is now associated with frameworks such as Next.js, Nuxt, Astro, Hugo, Eleventy, and Gatsby.

The three core ideas

Markup (pre-built)

The HTML is generated ahead of time, typically by a static site generator. The output is static files that can be served from any file host or CDN. There is no server-side rendering on each request.

APIs (for dynamic functionality)

Anything that needs to be dynamic, forms, search, ecommerce checkout, authentication, comments, is handled by calling APIs. These can be third-party services (Stripe, Algolia, Auth0) or custom serverless functions.

JavaScript (for interactivity)

Client-side JavaScript handles interactivity, fetches data from APIs, and updates the page after load. This can range from minimal (a small contact form script) to a full single-page application.

How a JAMstack site is typically deployed

  1. Content is written in Markdown, fetched from a headless CMS, or pulled from APIs at build time
  2. A static site generator (or framework’s static export mode) produces the HTML, CSS, and JS files
  3. The output is uploaded to a CDN or static host (Cloudflare Pages, Netlify, Vercel, GitHub Pages, AWS S3)
  4. Dynamic features call APIs from the browser at runtime

Why JAMstack emerged

JAMstack was a response to the complexity and performance characteristics of traditional CMS-driven sites. Stated motivating factors included:

  • Performance. CDN-served static files load faster than server-rendered pages
  • Scalability. Static files are trivially cacheable; high traffic does not require scaling a database
  • Security. With no server-side execution and no database on the request path, the attack surface is reduced
  • Developer experience. Modern build tools, version control, and preview deployments
  • Cost. Static hosting on a CDN is often free or very inexpensive

Common JAMstack tools

  • Static site generators: Astro, Hugo, Eleventy, Jekyll, Gatsby, Next.js (static export), Nuxt (generate)
  • Headless CMS: Sanity, Contentful, Storyblok, Decap, Tina
  • Hosting: Cloudflare Pages, Netlify, Vercel, GitHub Pages
  • APIs: Stripe (payments), Algolia (search), Auth0 (auth), Formspree (forms), Snipcart (ecommerce)

Modern variants and evolution

The original JAMstack idea was strict pre-built static. Modern frameworks have introduced hybrid approaches:

  • Server-side rendering (SSR). Pages are rendered on the server per request, often at the edge
  • Incremental static regeneration (ISR). Pages are pre-built but rebuilt on a schedule or on demand
  • Partial hydration / islands architecture. Most of the page is static; only specific components run client-side JavaScript

These variants are sometimes described as Jamstack in a broader sense, though they relax the original strict definition. The Jamstack.org project itself rebranded to emphasize architecture over strict static rendering.

Tradeoffs

Strengths

  • Strong default performance and Core Web Vitals scores
  • Low hosting cost and easy scaling
  • Smaller security surface
  • Strong developer workflow with Git, preview deployments, and CI/CD

Weaknesses

  • Initial setup requires more developer involvement than a traditional CMS
  • Editing experience for non-technical users depends on additional tools
  • Build times can grow with site size (mitigated by incremental builds)
  • Real-time content requires additional architecture

When JAMstack tends to fit

  • Marketing sites, blogs, documentation, portfolios, small-to-medium ecommerce
  • Sites where performance and SEO are priorities
  • Projects with developer involvement and a clear content workflow
  • Sites with predictable update patterns rather than minute-by-minute changes

When other architectures tend to fit better

  • Applications requiring significant per-user state (banking, dashboards, social platforms)
  • Sites with thousands of contributors editing simultaneously
  • Real-time collaborative tools

Common misconceptions

  • “JAMstack means no JavaScript.” JavaScript is one of the three letters; JAMstack sites can use as much or as little as needed.
  • “JAMstack means no backend.” JAMstack sites use backends, they just access them through APIs rather than rendering pages with them.
  • “JAMstack and static are the same.” Static sites are one form of JAMstack. Modern JAMstack also includes SSR and hybrid approaches.