JAMstack
Web architecture using JavaScript, APIs, and Markup—pre-built pages with dynamic functionality.
JAMstack is a modern web architecture that pre-renders pages at build time and uses JavaScript and APIs for dynamic functionality.
What JAM stands for: - JavaScript: Client-side dynamic functionality - APIs: Server-side functionality via APIs - Markup: Pre-built HTML pages
How it works: 1. Pages are pre-rendered at build time 2. Static HTML is served from a CDN 3. JavaScript adds interactivity 4. APIs handle dynamic data and operations
Benefits: - Performance: Pre-built pages load instantly - Security: No server to attack - Scalability: CDNs handle any traffic - Developer experience: Decoupled architecture - Cost: Cheap to host static files
Common stack: - Framework: Next.js, Astro, Nuxt - Hosting: Vercel, Netlify, Cloudflare Pages - CMS: Contentful, Sanity, headless WordPress - Backend: Supabase, Firebase, custom APIs
When to use JAMstack: ✅ Content-heavy sites (blogs, docs, marketing) ✅ E-commerce with SSG/ISR ✅ Apps with predictable data patterns ❌ Highly dynamic, real-time apps ❌ Apps with complex server-side logic
Examples
- •A marketing site built with Next.js on Vercel
- •Documentation site using Astro
- •E-commerce with static product pages and dynamic cart