@ai-guide/nextjs
v0.17.14
Published
Next.js plugin for AI Guide - automatic build-time extraction and runtime validation
Maintainers
Readme
@ai-guide/nextjs
Next.js plugin for AI Guide - automatic build-time extraction and runtime validation.
Installation
npm install @ai-guide/nextjs @ai-guide/reactUsage
Add to your next.config.js:
const { withAiGuide } = require('@ai-guide/nextjs');
module.exports = withAiGuide({
// Your existing Next.js config
});That's it! AI Guide will automatically:
- Extract components during build time
- Generate a manifest of all interactive elements
- Validate at runtime with real DOM
- Send data to AI Guide backend for embeddings
Features
- Zero Configuration: Just wrap your config
- Build-Time Extraction: Hooks into Next.js webpack
- Runtime Semantic Matching: Uses hologram-based feature extraction (no ID injection needed)
- Dynamic Content: Captures API data and conditional renders
- Type Safe: Full TypeScript support
- Framework Agnostic: Works with any React-based framework
How It Works
Build Time
- Extracts all Button, Link, and Form components
- Generates manifest with routes and actions
- Stores in
.next/ai-guide-manifest.json
Runtime
- Collects semantic hologram features (visual, semantic, heuristic vectors)
- Captures dynamic content and state
- Sends hologram data to Brain service for matching
- No build-time ID injection required - pure semantic matching
Requirements
- Next.js 13.0.0 or higher
- React 18.0.0 or higher
License
MIT
