Back to Blog
JSON-LDStructured-DataSchema.orgAstroNext.jsGEOTechnical-SEO

Building Connected JSON-LD Entity Graphs (Organization, Person, Service) in Astro & Next.js

How to build connected Schema.org JSON-LD entity graphs in Astro and Next.js: linking Organization, Person, Service, and Article nodes for enterprise GEO authority.

·7 min read·Fonda Digital Engineering

In the evolving discipline of Generative Engine Optimization (GEO) and enterprise technical SEO, structured data is no longer merely an optional trick to earn star ratings or breadcrumb rich snippets on Google.

For modern AI search crawlers (such as OpenAI’s GPTBot, PerplexityBot, and Google’s Gemini), Schema.org JSON-LD structured data is the definitive semantic source of truth.

When an LLM ingests a web page, natural language text requires probabilistic parsing and token inference. But when that same engine reads a cryptographically clean, unambiguous Connected JSON-LD Entity Graph, it ingests mathematically verifiable relationships:

  • Who authored this technical whitepaper?
  • What organization employs this author?
  • What specific software technologies does this organization have verifiable domain expertise in?
  • What service offerings does this platform provide to enterprise clients?

Yet in production audits across B2B technology websites, over 80% of implementations suffer from Schema Fragmentation: dumping five disconnected <script type="application/ld+json"> tags onto the page, forcing search bots to guess how nodes relate to one another.

Below is our senior engineering guide: detailing how to architect unified, connected Schema.org @graph structures in Astro and Next.js, link organizational entities, and maximize authority in generative search engines.


1. Disconnected Snippets vs. The Unified @graph Model

To understand entity graph architecture, consider the contrast between legacy fragmented markup and modern graph modeling:

┌────────────────────────────────────────────────────────────────────────┐
│                   Schema.org Architecture Comparison                   │
├───────────────────────────────────┬────────────────────────────────────┤
│ ❌ Fragmented Disconnected Schemas │ ✅ Unified Connected @graph Model  │
├───────────────────────────────────┼────────────────────────────────────┤
│ Script 1: {"@type": "Organization"│ {"@context": "https://schema.org", │
│   "name": "Fonda Digital"}        │  "@graph": [                       │
│ Script 2: {"@type": "TechArticle",│    {"@type": "Organization",       │
│   "headline": "Astro Edge..."}    │     "@id": "https://site/#org",...}│
│ Script 3: {"@type": "Person",     │    {"@type": "Person",             │
│   "name": "Daniel Fonda"}         │     "@id": "https://site/#author", │
│                                   │     "worksFor": {"@id": "#org"}},  │
│ Result: Search engines cannot     │    {"@type": "TechArticle",        │
│ confirm if Daniel Fonda works for │     "author": {"@id": "#author"},  │
│ Fonda Digital or wrote the piece! │     "publisher": {"@id": "#org"}}  │
│                                   │  ]}                                │
└───────────────────────────────────┴────────────────────────────────────┘

In the unified model, every entity is assigned a persistent, globally unique URI identifier (@id). Nodes do not duplicate nested information; they simply reference existing nodes via their @id pointer. This creates a clean, circular entity web that knowledge graph crawlers (Wikidata, Google Knowledge Graph, Perplexity entity extractors) parse with 100% relational fidelity.


2. The 4 Essential Nodes of a B2B Engineering Graph

A complete B2B technology platform entity graph connects four core Schema.org classes:

[1. ProfessionalService / Organization Node]
  │  ├── @id: "https://fondadigital.com/#organization"
  │  ├── address: Country 'SI' (EU Compliance Jurisdiction)
  │  └── knowsAbout: ["Astro", "Next.js", "WordPress Bedrock", "EU AI Act"]
  │
  ├──► [2. Service Offerings Nodes]
  │      ├── @id: "https://fondadigital.com/#service-white-label"
  │      └── provider: {"@id": "https://fondadigital.com/#organization"}
  │
  └──► [3. Author / Person Nodes]
         ├── @id: "https://fondadigital.com/#author-daniel"
         ├── worksFor: {"@id": "https://fondadigital.com/#organization"}
         └── sameAs: [GitHub, LinkedIn, ORCID URLs]
                 │
                 ▼
       [4. TechArticle / BlogPosting Node]
         ├── @id: "https://fondadigital.com/blog/slug/#article"
         ├── author: {"@id": "https://fondadigital.com/#author-daniel"}
         └── publisher: {"@id": "https://fondadigital.com/#organization"}

1. The Organization / ProfessionalService Node

Establishes the corporate identity, legal entity status, physical headquarters, and domain competencies. Using the knowsAbout array allows you to explicitly declare engineering proficiencies to AI search engines.

2. The Service Nodes

Formally details the commercial B2B offerings (e.g. White-Label Engineering, Operational AI Automation, Core Web Vitals Remediation), mapping pricing models, delivery regions (European Union), and SLA terms.

3. The Person (Author) Node

Establishes human expertise (E-E-A-T). By linking the author node to external verified profiles (LinkedIn, GitHub, technical publications) via sameAs, search engines verify that the content was authored by a qualified practitioner rather than generated by an anonymous scraper.

4. The TechArticle Node

Represents the specific technical guide, explicitly referencing the author and publisher via their canonical @id URIs.


3. Production Code: The Astro Schema Graph Builder

In Astro, rather than manually writing JSON strings across multiple .astro layout files, build a centralized TypeScript utility:

// src/lib/seo/schema-builder.ts

export interface GraphArticleMeta {
  title: string;
  description: string;
  canonicalUrl: string;
  pubDate: Date;
  updatedDate?: Date;
  authorName: string;
  authorUrl?: string;
  tags?: string[];
}

export function buildPageEntityGraph(meta: GraphArticleMeta) {
  const baseUrl = 'https://fondadigital.com';
  const orgId = `${baseUrl}/#organization`;
  const websiteId = `${baseUrl}/#website`;
  const authorId = `${baseUrl}/#author-${meta.authorName.toLowerCase().replace(/\s+/g, '-')}`;
  const pageId = `${meta.canonicalUrl}#webpage`;
  const articleId = `${meta.canonicalUrl}#article`;

  return {
    '@context': 'https://schema.org',
    '@graph': [
      // 1. Organization Entity
      {
        '@type': 'ProfessionalService',
        '@id': orgId,
        'name': 'Fonda Digital',
        'url': baseUrl,
        'logo': `${baseUrl}/logo.png`,
        'address': {
          '@type': 'PostalAddress',
          'addressCountry': 'SI',
          'addressRegion': 'Central Europe',
        },
        'geo': {
          '@type': 'GeoCoordinates',
          'latitude': '46.0569',
          'longitude': '14.5058',
        },
        'knowsAbout': [
          'Astro.js',
          'Next.js 16',
          'Tailwind CSS v4',
          'WordPress Bedrock',
          'EU AI Act Compliance',
          'European Accessibility Act (EAA)',
        ],
      },

      // 2. Author Entity
      {
        '@type': 'Person',
        '@id': authorId,
        'name': meta.authorName,
        'url': meta.authorUrl || baseUrl,
        'worksFor': { '@id': orgId },
        'jobTitle': 'Senior Software Architect',
      },

      // 3. WebSite Entity
      {
        '@type': 'WebSite',
        '@id': websiteId,
        'url': baseUrl,
        'name': 'Fonda Digital',
        'publisher': { '@id': orgId },
        'inLanguage': 'en',
      },

      // 4. TechArticle Entity
      {
        '@type': 'TechArticle',
        '@id': articleId,
        'isPartOf': { '@id': pageId },
        'headline': meta.title,
        'description': meta.description,
        'url': meta.canonicalUrl,
        'mainEntityOfPage': { '@id': meta.canonicalUrl },
        'datePublished': meta.pubDate.toISOString(),
        'dateModified': (meta.updatedDate || meta.pubDate).toISOString(),
        'author': { '@id': authorId },
        'publisher': { '@id': orgId },
        'inLanguage': 'en',
        'keywords': meta.tags ? meta.tags.join(', ') : undefined,
      },
    ],
  };
}

And in your Astro layout (src/layouts/PostLayout.astro):

---
import { buildPageEntityGraph } from '../lib/seo/schema-builder';

const { title, description, pubDate, updatedDate, author, tags } = Astro.props;
const canonicalUrl = new URL(Astro.url.pathname, 'https://fondadigital.com').href;

const schemaData = buildPageEntityGraph({
  title,
  description,
  canonicalUrl,
  pubDate,
  updatedDate,
  authorName: author || 'Fonda Digital Engineering',
  tags,
});
---

<head>
  <!-- Other head tags -->
  <script type="application/ld+json" set:html={JSON.stringify(schemaData)} />
</head>

4. Next.js App Router Implementation

If your team is deploying on Next.js 15 or 16 App Router, implement the identical @graph payload inside your server component page.tsx or layout:

// app/blog/[slug]/page.tsx
import { buildPageEntityGraph } from '@/lib/seo/schema-builder';

export default async function BlogPostPage({ params }: { params: { slug: string } }) {
  const post = await fetchPostBySlug(params.slug);
  const jsonLdGraph = buildPageEntityGraph({
    title: post.title,
    description: post.description,
    canonicalUrl: `https://fondadigital.com/blog/${params.slug}/`,
    pubDate: new Date(post.publishedAt),
    authorName: post.author,
    tags: post.tags,
  });

  return (
    <article>
      <script
        type="application/ld+json"
        dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLdGraph) }}
      />
      <h1>{post.title}</h1>
      <div dangerouslySetInnerHTML={{ __html: post.contentHtml }} />
    </article>
  );
}

5. Integrating BreadcrumbList and FAQPage into the Master Graph

To maximize SERP real estate without adding separate JSON-LD tags, append BreadcrumbList and FAQPage nodes directly to the root @graph array:

// Appending Breadcrumb and FAQ nodes to existing graph
export function attachFaqAndBreadcrumbsToGraph(
  baseGraph: any,
  breadcrumbs: { name: string; url: string }[],
  faqs: { question: string; answer: string }[]
) {
  // 1. Append BreadcrumbList
  baseGraph['@graph'].push({
    '@type': 'BreadcrumbList',
    '@id': `${baseGraph['@graph'][3]['url']}#breadcrumbs`,
    'itemListElement': breadcrumbs.map((crumb, idx) => ({
      '@type': 'ListItem',
      'position': idx + 1,
      'name': crumb.name,
      'item': crumb.url,
    })),
  });

  // 2. Append FAQPage if FAQs exist
  if (faqs && faqs.length > 0) {
    baseGraph['@graph'].push({
      '@type': 'FAQPage',
      '@id': `${baseGraph['@graph'][3]['url']}#faq`,
      'mainEntity': faqs.map((faq) => ({
        '@type': 'Question',
        'name': faq.question,
        'acceptedAnswer': {
          '@type': 'Answer',
          'text': faq.answer,
        },
      })),
    });
  }

  return baseGraph;
}

By consolidating all page features into a single connected graph, search engine bots parse breadcrumbs, FAQ rich snippets, and organizational authoritativeness in a single parse pass without schema conflicts.


6. Automated Schema Validation in CI/CD with Vitest

Never deploy unstructured or syntactically invalid JSON-LD to production. A single unescaped quote or missing required property (such as omitting @id or itemListElement) breaks the entire graph.

We integrate automated schema assertions into our pre-merge test suite:

// tests/schema-validation.test.ts
import { describe, it, expect } from 'vitest';
import { buildPageEntityGraph } from '../src/lib/seo/schema-builder';

describe('JSON-LD Entity Graph Validation', () => {
  it('constructs a valid connected @graph with required nodes', () => {
    const graph = buildPageEntityGraph({
      title: 'Connected JSON-LD Entity Graphs in Astro',
      description: 'Senior engineering guide to building connected Schema.org graphs.',
      canonicalUrl: 'https://fondadigital.com/blog/connected-json-ld-entity-graphs-astro-nextjs/',
      pubDate: new Date('2026-11-09T08:00:00Z'),
      authorName: 'Daniel Fonda',
    });

    expect(graph['@context']).toBe('https://schema.org');
    expect(Array.isArray(graph['@graph'])).toBe(true);

    const nodes = graph['@graph'];
    const org = nodes.find((n: any) => n['@type'] === 'ProfessionalService');
    const author = nodes.find((n: any) => n['@type'] === 'Person');
    const article = nodes.find((n: any) => n['@type'] === 'TechArticle');

    expect(org).toBeDefined();
    expect(author).toBeDefined();
    expect(article).toBeDefined();

    // Verify mathematical connection: Article author points to Author @id
    expect(article.author['@id']).toBe(author['@id']);
    // Verify mathematical connection: Author worksFor points to Org @id
    expect(author.worksFor['@id']).toBe(org['@id']);
  });
});

7. Summary: Transforming Code into Verifiable Knowledge Graphs

In the generative search era, the websites that win dominant organic visibility are not those that attempt to trick search engines with keyword padding; they are the platforms that structure their technical expertise into clear, linked, verifiable knowledge networks.

By engineering:

  • Consolidated @graph JSON-LD structures.
  • Unambiguous @id URI entity references.
  • Explicit knowsAbout and sameAs authoritativeness linkages.
  • Clean integration in Astro and Next.js server components.

Your web architecture delivers pristine semantic signals directly into the indexing algorithms of ChatGPT, Perplexity, and Google, establishing your engineering agency as an unassailable industry authority.

To explore related technical GEO architectures and EU digital compliance standards:

Ready to upgrade your enterprise structured data into an authoritative connected entity graph? Contact our white-label engineering team to audit your technical schema.

Frequently Asked Questions

What is a connected JSON-LD entity graph and why does it outperform isolated schemas?→
A connected JSON-LD entity graph uses the Schema.org @graph array and explicit URI identifiers (@id) to mathematically link separate nodes—such as linking an Article author (@id: .../#person) to an author node, which in turn links to an employer Organization (@id: .../#organization). This allows search engines and AI models to understand topical authority and real-world entity relationships without ambiguity.
How do you prevent duplicate Schema.org definitions across modular frontend components?→
Rather than injecting fragmented <script type="application/ld+json"> blocks inside individual components, architect a centralized SchemaBuilder service in Astro or Next.js that aggregates page-level metadata into a single, deduplicated root @graph payload rendered cleanly in the HTML <head>.
What are the essential Schema.org node types for B2B engineering agencies?→
A complete B2B engineering entity graph includes: ProfessionalService or Organization (with address, geo coordinates, and knowsAbout arrays), Person (author with sameAs social profiles), WebSite, WebPage (with breadcrumbs), and TechArticle or BlogPosting (with explicit publisher references).
B2B White-Label

Scaling an agency? Offload your engineering bottlenecks.

Fonda Digital provides senior white-label full-stack development, headless migrations, and hardened WordPress builds under bilateral NDA. Predictable wholesale margins.

Schedule Partner Intake →
AGENCY PARTNER INTAKE

Let's build.

Book a partner fit call or submit your immediate project requirements below. All submissions are covered under mutual confidentiality.

Fonda Digital — White-Label

Senior engineering partner for digital and SEO agencies. Elastic capacity, strict NDAs, and predictable wholesale margins under your brand.

BASE:Ljubljana / Izola, Slovenia
RESPONSE WINDOW:Within 4 Business Hours (CET)
DIRECT CHANNEL:[email protected]
CURRENT TIME: LJUBLJANA--:--:-- CET
Current Agency Pipeline Volume

Automated spam protection.