Skip to content
GEO AI
AnalyzerCLIDocumentationSpecificationContact
Documentation

Getting Started

  • Introduction
  • Quick Start
  • Choose Your Package

GEO Specification

  • Overview
  • llms.txt
  • AI Metadata
  • Crawler Rules
  • Structured Signals
  • Scoring
  • Recommendations

Packages

  • GEO AI Core
  • GEO AI Next
  • GEO AI NestJSnew
  • NestJS — Module Setup
  • NestJS — Configuration
  • NestJS — Service API
  • NestJS — Middleware
  • NestJS — Guard
  • NestJS — Interceptor
  • NestJS — Decorators
  • NestJS — Content Provider
  • GEO AI Woo
  • GEO AI Shopify

Analyzer

  • Overview
  • Scoring
  • Recommendations

CLI

  • GEO AI CLI

Integrations

  • Laravelsoon

Reference

  • Configuration
  • API Reference
  • FAQ
DocsPackagesNestjsProvider

Custom Content Provider

For dynamic content from a database, CMS, or API, implement the ContentProvider interface.

ContentProvider interface

typescript
import { type ContentProvider } from 'geo-ai-nest';

class MyProvider implements ContentProvider {
  async getSections(options?: { locale?: string }) {
    return [
      {
        name: 'Products',
        type: 'product',
        resources: [
          { title: 'Widget', url: '/products/widget', description: 'A great widget' },
        ],
      },
    ];
  }
}

Database example

typescript
import { GeoAIModule, type ContentProvider } from 'geo-ai-nest';

class DatabaseProvider implements ContentProvider {
  constructor(private readonly productRepo: ProductRepository) {}

  async getSections(options?: { locale?: string }) {
    const products = await this.productRepo.findAll(options?.locale);
    const posts = await this.blogRepo.findPublished();

    return [
      {
        name: 'Products',
        type: 'product',
        resources: products.map(p => ({
          title: p.name,
          url: `/products/${p.slug}`,
          description: p.shortDescription,
          content: p.fullDescription,
          price: p.price,
        })),
      },
      {
        name: 'Blog',
        type: 'page',
        resources: posts.map(p => ({
          title: p.title,
          url: `/blog/${p.slug}`,
          description: p.excerpt,
          content: p.body,
        })),
      },
    ];
  }
}

// In your module:
GeoAIModule.forRootAsync({
  imports: [DatabaseModule],
  useFactory: (productRepo: ProductRepository) => ({
    siteName: 'My Store',
    siteUrl: 'https://mystore.com',
    provider: new DatabaseProvider(productRepo),
  }),
  inject: [ProductRepository],
})
PreviousNestJS — DecoratorsNextGEO AI Woo

On this page

  • ContentProvider interface
  • Database example
GEO AI

AI Search Optimization

AnalyzerCLIDocumentationSpecificationContactPrivacy Policy

© 2026 GEO AI · Open Source · MIT License