GEO AI NestJS
NestJS module for AI Search Optimization. Provides dependency injection, middleware, guards, interceptors, and decorators — all wrapping geo-ai-core.
Requirements
- Node.js 20+
- NestJS 10+ (supports both v10 and v11)
- TypeScript 5.5+
Installation
bash
npm install geo-ai-nestThis installs geo-ai-core as a dependency automatically. @nestjs/common and @nestjs/core are peer dependencies — they must already be installed in your project.
Quick start
Import GeoAIModule in your root AppModule:
typescript
import { Module } from '@nestjs/common';
import { GeoAIModule } from 'geo-ai-nest';
@Module({
imports: [
GeoAIModule.forRoot({
siteName: 'My Store',
siteUrl: 'https://mystore.com',
provider: {
Products: [
{ title: 'Widget', url: '/products/widget', description: 'A great widget' },
],
Blog: [
{ title: 'Hello World', url: '/blog/hello', description: 'First post' },
],
},
crawlers: 'all',
cache: '24h',
crawlTracking: true,
}),
],
})
export class AppModule {}This automatically:
- Serves
/llms.txt,/llms-full.txt,/.well-known/llms.txtvia middleware - Serves
/robots-ai.txtvia controller - Detects and tracks AI bot visits
- Makes
GeoAIServiceavailable for injection throughout your app