Daniel López Azaña

Theme

Social Media

Blog

GNU/Linux, Open Source, Cloud Computing, DevOps and more...

What is JAMstack? Modern Architecture for Ultra-Fast Websites

JAMstack Architecture - JavaScript APIs Markup

Traditional web development forces you to choose between loading speed and dynamic functionality, resulting in slow sites that frustrate users or complex architectures that are hard to maintain. JAMstack (JavaScript, APIs, and Markup) eliminates this trade-off by pre-generating all content as static HTML files during build time, completely separating frontend from backend. In my 20+ years designing web architectures, JAMstack represents the most significant evolution in modern site development, enabling me to deliver projects like the Option Panel landing page in record time with exceptional performance.

What Does JAMstack Mean?

JAMstack is an acronym describing three fundamental components of a modern web architecture:

J
JavaScript
Interactivity and dynamic logic executed in the client’s browser without server dependencies.
A
APIs
Backend functionality served through reusable APIs accessible via HTTP/HTTPS from JavaScript.
M
Markup
Static HTML pre-generated during build time, served directly from CDN without server processing.

The fundamental difference: In JAMstack, pages are generated once during build time and served as static files, instead of being dynamically generated on every request like traditional architectures (WordPress, Django, Ruby on Rails).

JAMstack vs. Traditional Architecture

The architectural difference is radical and has profound implications for performance, security, and scalability:

Traditional Architecture (Monolithic)

flowchart TB A[User Browser] -->|HTTP Request| B[Web Server] B -->|Query| C[Database] C -->|Data| B B -->|Processing| D[HTML Generation] D -->|Rendering| E[HTML Response] E -->|Slow Response| A style A fill:#e3f2fd style B fill:#ffebee style C fill:#fff3e0 style D fill:#ffebee style E fill:#ffebee style A stroke:#1976d2 style B stroke:#c62828 style C stroke:#ef6c00 style D stroke:#c62828 style E stroke:#c62828
⏱️ Processing On Every Request
  • ❌ Server processes each visit individually.
  • ❌ Real-time database queries.
  • ❌ Accumulated latency from multiple components.
  • ❌ Server overloaded under high traffic.
  • ❌ Larger attack surface for hackers.

JAMstack Architecture (Modern)

flowchart TB A[User Browser] -->|HTTP Request| B[Global CDN] B -->|Static HTML| A A -->|JavaScript| C[Client Interaction] C -->|API Call| D[Serverless APIs] D -->|JSON| C E[Build Time] -.->|Pre-generates| B F[Headless CMS] -.->|Content| E style A fill:#e8f5e9 style B fill:#c8e6c9 style C fill:#a5d6a7 style D fill:#81c784 style E fill:#dcedc8 style F fill:#f0f4c3 style A stroke:#2e7d32 style B stroke:#388e3c style C stroke:#43a047 style D stroke:#4caf50 style E stroke:#689f38 style F stroke:#9e9d24
⚡ Served Instantly From CDN
  • ✅ HTML pre-generated during build.
  • ✅ Served from global edge locations.
  • ✅ No server processing on each visit.
  • ✅ Automatic unlimited scalability.
  • ✅ Minimal attack surface (static files only).

Advantages of JAMstack Over Traditional Architectures

After implementing dozens of JAMstack projects for enterprise clients over recent years, these are the most impactful advantages I’ve experienced:

1. Exceptional Performance

The most evident differentiating factor: JAMstack sites are dramatically faster than traditional architectures.

Why:

  • Pre-generated HTML - No server processing time on each visit.
  • Served from CDN - Content delivered from the edge location closest to users.
  • No database queries - All data logic resolved during build time.
  • Aggressive caching - Static files cached indefinitely.
  • Minimal JavaScript - Only essential code sent to the client.

Real-world impact:

  • Sub-second load times - Most pages load in under 1 second.
  • Perfect Core Web Vitals metrics - LCP < 1s, FID < 10ms, CLS < 0.05.
  • Fluid experience - No perceptible wait between page navigation.

In the Option Panel landing page project, we achieved near-instantaneous load times rivaling native applications.

2. Drastically Improved Security

Minimal attack surface: No dynamic server, no accessible database, no vulnerable plugins.

Inherent protection:

  • No executable server code - Attackers only find static HTML files.
  • No exposed database - No SQL injection, no database attacks.
  • No vulnerable plugins - Unlike WordPress with hundreds of security-questionable plugins.
  • No server-side user sessions - Sessions handled client-side or via external APIs.
  • DDoS attacks automatically mitigated - Modern CDNs absorb and filter malicious traffic.

WordPress comparison:

WordPress requires constant security updates for core, themes, and plugins. A vulnerability in any plugin can compromise the entire site. JAMstack completely eliminates this concern by having no executable code on the web server.

3. Unlimited Scalability with Minimal Costs

Automatic scaling without intervention: CDNs handle millions of simultaneous visits without additional configuration.

Scalability advantages:

  • No traffic limits - CDN distributes load automatically.
  • No servers to scale - No need to increase server capacity for traffic spikes.
  • Predictable costs - Cost is primarily CDN bandwidth, not server resources.
  • Resistance to viral spikes - If your site goes viral, CDN handles it seamlessly.

Cost comparison:

AspectWordPress/Traditional CMSJAMstack
Hosting + DB██████░░░░ Moderate
(Shared/VPS, DB included)
██░░░░░░░░ Very low
(Generous free tiers)
Maintenance██████░░░░ Ongoing
(Updates, security, plugins)
██░░░░░░░░ Minimal
(Automatic rebuild)
Scaling cost██████████ Grows significantly
(CPU, RAM, more servers)
████░░░░░░ Grows linearly
(CDN bandwidth only)

Important note: Visual indicators (█) show costs, not scalability capacity. JAMstack scales better than WordPress (handles more traffic with fewer resources). For small/moderate-traffic sites, both are economical. Key difference: with high traffic, WordPress requires more server resources (CPU, RAM, additional servers) with non-linear cost growth, while JAMstack only pays CDN bandwidth linearly and predictably. Both costs increase with traffic, but JAMstack is more efficient and economical at scale.

4. Better Developer Experience

Faster and more pleasant development: Modern static site generators offer superior DX (Developer Experience).

Developer benefits:

  • Instant hot reload - Changes reflected immediately during development.
  • Full code control - Not limited by CMS restrictions.
  • Modern tooling - Frameworks like Astro, Next.js, Gatsby with excellent tooling.
  • Natural Git workflow - Entire site lives in version control.
  • Automatic deployments - Push to main branch and site regenerates automatically.
  • Preview deployments - Each pull request generates automatic site preview.

Example workflow:

# 1. Local development with hot reload
npm run dev

# 2. Commit and push to Git
git add .
git commit -m "Add new blog post about JAMstack"
git push origin main

# 3. Automatic deployment
# Hosting service (Netlify, Vercel, Cloudflare Pages) detects push,
# runs build automatically, and deploys new version in seconds.

5. Exceptional SEO

Perfectly indexable static HTML: Search engines love JAMstack sites.

SEO advantages:

  • Complete HTML on first load - No JavaScript blocking initial render.
  • Perfect load speed - Google prioritizes fast sites in rankings.
  • Optimal Core Web Vitals - Perfect metrics positively impact SEO.
  • No indexing issues - All content in static HTML.
  • Clean URL structure - Easy to configure SEO-friendly URLs.

Compared to SPAs (Single Page Applications) that depend on JavaScript to render content, JAMstack provides complete HTML immediately, facilitating search engine indexing.

The JAMstack ecosystem has matured dramatically, with enterprise-ready tools for every component:

Static Site Generators (SSG)

Astro ⭐ My personal favorite

  • Philosophy: “Island Architecture” - JavaScript only where needed.
  • Unique advantage: Support for components from any framework (React, Vue, Svelte, etc.).
  • Performance: Best in market - generates pure HTML without unnecessary JavaScript.
  • Ideal for: Landing pages, blogs, documentation, portfolios.
  • My experience: Used in www.daniloaz.com and multiple client projects with exceptional results.

Next.js

  • Company: Vercel
  • Advantage: Hybrid SSG + SSR + integrated API routes.
  • Ecosystem: Huge React community.
  • Ideal for: Complex applications with mixed static and dynamic content needs.

Gatsby

  • Advantage: Integrated GraphQL for data querying.
  • Plugins: Massive plugin ecosystem for any data source.
  • Ideal for: Complex sites with multiple content sources.

Hugo

  • Language: Go
  • Advantage: Extremely fast build speed.
  • Ideal for: Sites with thousands of pages needing ultra-fast builds.

Eleventy (11ty)

  • Advantage: Simplicity and templating flexibility.
  • No framework - Pure HTML with any template language.
  • Ideal for: Developers preferring simplicity over abstractions.

Headless CMS (Content Management)

Directus

  • Type: Open-source, self-hosted or cloud.
  • Advantage: Automatic REST and GraphQL API over any SQL database.
  • Ideal for: Projects needing full backend control.
  • My experience: Used in Option Panel landing page for lead management.

Contentful

  • Type: Premium SaaS.
  • Advantage: Intuitive interface, robust APIs, enterprise scalability.
  • Ideal for: Non-technical content teams.

Strapi

  • Type: Open-source, JavaScript/Node.js.
  • Advantage: Customizable, self-hosted, automatic API.
  • Ideal for: Teams with JavaScript experience.

Sanity

  • Type: SaaS with real-time editor.
  • Advantage: Structured content, real-time, powerful queries.
  • Ideal for: Complex content with multiple relationships.

Hosting and Deployment

Vercel

  • Specialization: Next.js (though supports any framework).
  • Advantage: Instant deployments, automatic PR previews, integrated analytics.
  • CDN: Automatic global.
  • Pricing: Generous free tier, scalable pricing.

Netlify

  • Specialization: All-in-one platform for JAMstack.
  • Advantage: Serverless functions, integrated forms, split testing.
  • CDN: Global edge network.
  • Pricing: Generous free tier, affordable pro plans.

Cloudflare Pages

  • Specialization: Integration with Cloudflare ecosystem.
  • Advantage: World’s fastest CDN, integrated Workers, unlimited bandwidth.
  • Pricing: Extremely generous free tier.

AWS Amplify

  • Specialization: AWS integration.
  • Advantage: Full AWS services access, integrated CI/CD.
  • Ideal for: Projects already on AWS needing deep integration.

When to Use JAMstack?

JAMstack isn’t suitable for every project. Here’s my criteria based on real experience:

✅ Ideal Use Cases for JAMstack

Landing Pages and Corporate Sites:

  • Mostly static content that changes occasionally.
  • Maximum priority on load speed and conversion.
  • Need for minimal hosting costs.
  • Example: Option Panel landing page developed in 1 week with exceptional performance.

Blogs and Content Sites:

  • Regular publishing of articles or documentation.
  • Critical SEO for organic traffic.
  • Multiple authors or content approval workflows.
  • Example: This blog at daniloaz.com/blog.

Technical Documentation:

  • Product, API, or open source project documentation.
  • Full-text search and clear navigation.
  • Documentation versioning.

Small/Medium E-commerce:

  • Product catalog with inventory management via API.
  • Checkout handled by specialized services (Stripe, Shopify Buy Button).
  • Priority on load speed for conversion.

Portfolios and Personal Sites:

  • Project and professional experience showcase.
  • Low maintenance and minimal costs.
  • Maximum control over design and code.

❌ Cases Where JAMstack Is NOT the Best Option

Highly Dynamic Web Applications:

  • Real-time dashboards with multi-user data.
  • Collaborative applications like Google Docs.
  • Social platforms with personalized feeds.

Sites with Constantly Changing Content:

  • News portals with dozens of new articles per hour.
  • Classified sites with thousands of new listings daily.
  • Any site where content changes faster than you can rebuild.

Enterprise E-commerce with Thousands of Products:

  • Massive catalogs with tens of thousands of SKUs.
  • Complex real-time inventory management.
  • Dynamic personalizations based on user behavior.

Note: Hybrid solutions exist (Incremental Static Regeneration in Next.js) that mitigate some limitations.

How to Get Started with JAMstack

If you want to start developing JAMstack sites, here’s my recommended roadmap based on how I’d teach a traditional developer:

1. Choose a Static Site Generator

To start, I recommend Astro:

  • Gentle learning curve.
  • Exceptional documentation.
  • Out-of-the-box performance without complex optimization.
  • Support for components from multiple frameworks.

Quick installation:

# Create new Astro project
npm create astro@latest

# Navigate to project and run dev server
cd my-jamstack-project
npm run dev

Within minutes you’ll have a functioning site at http://localhost:4321 with hot reload.

2. Understand Build Time vs. Runtime Separation

Fundamental concept:

  • Build time: When you run npm run build and generate static HTML files.
  • Runtime: When users visit your site and browsers download the HTML.

At build time you can:

  • Query databases.
  • Call external APIs.
  • Process Markdown, images, assets.
  • Generate pages dynamically based on data.

At runtime (browser):

  • You only have static HTML + CSS + minimal JavaScript.
  • User interactions handled via JavaScript.
  • Dynamic data obtained via client-side APIs.

3. Integrate a Headless CMS (Optional)

If you need non-technical clients or editors to manage content:

Simple option: Markdown + Git

  • Content in .md files in your repository.
  • Editors commit changes to Git (or use interfaces like NetlifyCMS).
  • Automatic rebuild on each push.

Advanced option: Headless CMS

  • Directus, Contentful, Strapi for visual content management.
  • API to fetch content during build time.
  • Webhooks trigger automatic rebuild when publishing changes.

4. Deploy on JAMstack Platform

Deployment on Netlify (simplest option):

  1. Push your project to GitHub/GitLab.
  2. Connect repository in Netlify.
  3. Netlify automatically detects framework.
  4. Configure build command (npm run build) and output directory (dist).
  5. Automatic deployment - your site will be live in minutes.

Continuous configuration:

  • Each push to main branch deploys automatically.
  • Pull requests generate preview deployments.
  • Rollback to previous versions with one click.

5. Add Dynamic Functionality via APIs

For contact forms:

  • Netlify Forms - Free integrated solution.
  • Formspree - Specialized form service.
  • Custom API - Your own serverless API (AWS Lambda, Netlify Functions).

For authentication:

  • Auth0 - Complete authentication solution.
  • Supabase Auth - Open-source, includes database.
  • AWS Cognito - If your infrastructure is on AWS.

For search:

  • Algolia - Ultra-fast search, generous free tier.
  • Meilisearch - Open-source, self-hosted.
  • Simple client-side search - For small sites, JSON-based search.

Practical Example: Landing Page with Astro

Here’s a simplified example of structuring a professional JAMstack landing page:

Project structure:

my-landing/
├── src/
│   ├── pages/
│   │   └── index.astro          # Homepage
│   ├── components/
│   │   ├── Hero.astro            # Hero section
│   │   ├── Features.astro        # Features section
│   │   └── ContactForm.astro     # Contact form
│   ├── layouts/
│   │   └── Layout.astro          # Base layout
│   └── styles/
│       └── global.css            # Global styles
├── public/
│   └── images/                   # Static images
├── astro.config.mjs              # Astro configuration
└── package.json

Example page with CMS data:

---
// src/pages/index.astro
import Layout from '../layouts/Layout.astro';
import Hero from '../components/Hero.astro';
import Features from '../components/Features.astro';

// Fetch data from CMS during build time
const response = await fetch('https://your-cms.com/api/landing-page');
const pageData = await response.json();
---

<Layout title={pageData.title} description={pageData.description}>
  <Hero 
    title={pageData.hero.title} 
    subtitle={pageData.hero.subtitle}
    ctaText={pageData.hero.ctaText}
    ctaUrl={pageData.hero.ctaUrl}
  />
  
  <Features features={pageData.features} />
  
  <!-- More sections... -->
</Layout>

This code executes once during build, generates static HTML with all data, and the result is served instantly from CDN.

Conclusion

JAMstack represents the natural evolution of modern web development, combining the best of static architectures (speed, security, simplicity) with dynamic capabilities (APIs, JavaScript) when you need them.

Fundamental advantages:

  • Exceptional performance - Sub-second load times.
  • Improved security - Minimal attack surface.
  • Automatic scalability - No traffic limits.
  • Minimal costs - 10-20x more economical than traditional hosting.
  • Better developer experience - Modern tools and efficient workflow.

In my 20+ years developing web architectures, JAMstack is the most effective approach I’ve used for most corporate sites, landing pages, and blogs. Projects like the Option Panel landing page demonstrate you can deliver enterprise solutions in record time without compromising quality.

If you’re considering JAMstack for your next project, my recommendation is clear: start with Astro, deploy on Netlify or Vercel, and experience the difference in performance and simplicity.


Need a Professional JAMstack Site?

If you’re looking to develop a high-performance landing page, corporate site, or blog leveraging JAMstack advantages, I can help you design and develop an optimized solution that maximizes speed, conversion, and maintainability.

My services include:

  • JAMstack architecture and development with Astro, Next.js, or Gatsby.
  • Headless CMS integration (Directus, Contentful, Strapi).
  • Performance optimization and Core Web Vitals.
  • Technical SEO and analytics configuration.
  • Deployment and CI/CD on modern platforms.

I’m available 20 hours/week for remote projects.

Get in Touch

JAMstack Astro Web architecture Static sites Performance CDN Modern development
Daniel López Azaña

About the author

Daniel López Azaña

Tech entrepreneur and cloud architect with over 20 years of experience transforming infrastructures and automating processes.

Specialist in AI/LLM integration, Rust and Python development, and AWS & GCP architecture. Restless mind, idea generator, and passionate about technological innovation and AI.

Related articles

terraform-and-route53-logos

How to quickly import all records from a Route53 DNS zone into Terraform

The terraform import command allows you to import into HashiCorp Terraform resources that already existed previously in the provider we are working with, in this case AWS. However, it only allows you to import those records one by one, with one run of terraform import at a time. This, apart from being extremely tedious, in some situations becomes impractical. This is the case for the records of a Route53 DNS zone. The task can become unmanageable if we have multiple DNS zones, each one with tens or hundreds of records. In this article I offer you a bash script that will allow you to import in Terraform all the records of a Route53 DNS zone in a matter of seconds or a few minutes.

February 8, 2022
Script to automatically change all gp2 volumes to gp3 with aws-cli

Script to automatically change all gp2 volumes to gp3 with aws-cli

Last December Amazon announced its new EBS gp3 volumes, which offer better performance and a cost saving of 20% compared to those that have been used until now (gp2). Well, after successfully testing these new volumes with multiple clients, I can do nothing but recommend their use, because they are all advantages and in these 2 and a half months that have passed since the announcement I have not noticed any problems or side effects.

February 16, 2021
AWS security groups

How to automatically update all your AWS EC2 security groups when your dynamic IP changes

One of the biggest annoyances when working with AWS and your Internet connection has a dynamic IP is that when it changes, you immediately stop accessing to all servers and services protected by an EC2 security group whose rules only allow traffic to certain specific IP’s instead of allowing open connections to everyone (0.0.0.0.0/0).Certainly the simplest thing to do is always allowing traffic on a given port to everyone, so that even if you have a dynamic IP on your Internet connection you will always be able to continue accessing even if it changes. But opening traffic on a port to everyone is not the right way to proceed from a security point of view, because then any attacker will be able to access that port without restrictions, and that is not what you want.

January 12, 2021

Comments

Be the first to comment

Submit comment