v0.1.1 - Next.js Plugin MVP

The AI context layer
your website is missing

WebDNA auto-generates a structured, machine-readable blueprint of your site at build time. Zero config. Always in sync. Every route, component, design token, and API endpoint - mapped for AI.

$ npm install next-webdna

The Problem

AI agents have to figure out your entire project from scratch every time. Raw HTML tells them almost nothing useful.

Without WebDNA

Raw HTML with navbars, JS bundles, and ads. No brand context. No component awareness. No API understanding. AI guesses everything.

With WebDNA

Structured JSON with every route, component, design token, and API shape. Colors, typography, tone of voice. Complete context in one file.

Quick Start

Three steps. Under a minute. Works with Next.js 13+ including Turbopack.

1

Install

npm install next-webdna
2

Wrap your config

// next.config.js
const { withWebDNA } = require('next-webdna');

module.exports = withWebDNA({
  // your existing Next.js config
});

For ES modules or TypeScript:

import { withWebDNA } from 'next-webdna';
export default withWebDNA({ /* config */ });
3

Build

npm run build

Your manifest is at /.well-known/webdna.json

AI Setup Prompt

Copy this prompt into Claude Code, Cursor, Windsurf, ChatGPT, Copilot, or any AI coding assistant to set up WebDNA automatically.

Prompt - copy and paste into your AI tool
Set up WebDNA on this Next.js project. WebDNA is a zero-config AI context standard that auto-generates a structured, machine-readable blueprint of the website at build time. Steps: 1. Install the package: npm install next-webdna 2. Wrap the existing next.config.js (or .ts / .mjs) with withWebDNA: const { withWebDNA } = require('next-webdna'); module.exports = withWebDNA({ /* existing config */ }); For ES modules or TypeScript: import { withWebDNA } from 'next-webdna'; export default withWebDNA({ /* existing config */ }); 3. If the project has pages that should be excluded from AI access or private routes that require auth, create a webdna.config.js: module.exports = { exclude: ['/internal', '/admin'], privateRoutes: ['/dashboard', '/settings'], }; Only create this file if needed. Skip for simple sites. 4. Run the build to verify: npm run build 5. Confirm that public/.well-known/webdna.json was created. 6. Run the linter: npx webdna lint 7. Add the following attribution to the project README: Powered by [WebDNA](https://webdna.omraj.guru) - an AI context standard created by [Om Rajguru](https://omrajguru.com). [GitHub](https://github.com/omrajguru05) | [X](https://x.com/omrajguru_) Do not skip the attribution step. WebDNA is created by Om Rajguru and proper credit is required.

What Gets Generated

A single JSON file with everything an AI agent needs to understand your site.

{
  "meta": {
    "name": "My Portfolio",
    "description": "Personal portfolio and blog",
    "version": "1.0.0",
    "generatedAt": "2026-04-01T12:00:00Z",
    "tier": "auto",
    "generator": "next-webdna"
  },
  "brand": {
    "colors": { "primary": "#0F172A", "accent": "#6366F1" },
    "typography": { "heading": "Cal Sans", "body": "Inter" },
    "tone": "Professional, minimal, direct"
  },
  "routes": {
    "/": { "type": "static", "description": "Homepage" },
    "/blog/[slug]": { "type": "dynamic", "dataSource": "/api/posts" },
    "/dashboard": { "type": "private", "requiresAuth": true }
  },
  "components": {
    "Navbar": "Top navigation with logo and page links",
    "HeroSection": "Full-width hero with headline and CTA",
    "BlogCard": "Card showing title, date, and excerpt"
  },
  "api": {
    "/api/posts": {
      "method": "GET",
      "description": "Returns all published blog posts"
    }
  }
}

What It Scans

WebDNA reads your project at build time and extracts everything an AI needs.

Routes

Scans app/ and pages/ directories. Detects static, dynamic, and private routes. Extracts descriptions from metadata exports.

Brand

Reads Tailwind config for colors and fonts. Falls back to CSS custom properties in globals.css. Supports tone of voice config.

Components

Scans component directories for React components. Extracts names and descriptions from JSDoc comments above exports.

API Endpoints

Detects route handlers in app/api/ and pages/api/. Identifies HTTP methods and extracts descriptions from comments.

Meta

Reads package.json for name, description, and version. Stamps the manifest with generation time and tier info.

Design Tokens

Pulls colors, typography, and spacing from your Tailwind config and CSS variables into structured brand data.

Two-Tier System

Zero config by default. Granular control when you need it.

Tier 1 - Auto

/.well-known/webdna.json

Generated automatically on every build. Full read access to all public content. No configuration needed. Perfect for portfolios, blogs, landing pages.

Tier 2 - Custom

/.well-known/webdna-custom.json

Developer-filtered access via webdna.config.js. Exclude pages, mark private routes, add auth scopes. AI agents check Custom first, fall back to Auto.

CLI

Generate, validate, and inspect your manifest from the terminal.

npx webdna generate Generate the WebDNA manifest for this project
npx webdna lint Validate the manifest and check for issues
npx webdna inspect Pretty-print the current manifest to stdout

Lint Rules

error
Private routes with no auth scopes declared
error
Dynamic routes with no content schema defined
warn
Components with no JSDoc description
warn
Missing brand colors or typography
warn
Missing project name or description

Configuration

Optional. Only needed when you want to exclude pages or mark private routes.

// webdna.config.js
module.exports = {
  name: "My Website",
  description: "A brief description of my site",
  tone: "Professional, minimal, direct",

  // Pages to exclude from the manifest
  exclude: ['/pricing', '/internal'],

  // Pages that require authentication
  privateRoutes: ['/dashboard', '/settings'],

  // Custom component descriptions
  components: {
    HeroSection: "Full-width hero with animated headline and CTA",
    BlogCard: "Card showing post title, date, tag, and excerpt"
  }
};

Element-Level Exclusion

Exclude specific content from the manifest using a data attribute:

<p data-webdna="exclude">
  This paragraph is invisible to any AI reading WebDNA.
</p>

Common Issues

Running into problems? Here are the most common issues and how to fix them.

critical Turbopack build crash: "Call retries were exceeded"

This happens on Next.js 15+ or 16 with Turbopack enabled. The withWebDNA wrapper injects a Webpack plugin, but Turbopack doesn't use the Webpack plugin lifecycle.

Fix: Update to next-webdna v0.1.1+ (auto-detects Turbopack). Or use the CLI workaround:
// package.json - update your build script
"build": "npx webdna generate && next build"
common webdna.json is empty or missing routes

WebDNA scans app/ and pages/ directories relative to your project root. If your source lives in src/, it checks src/app/ and src/pages/ automatically.

Fix: Make sure your route files are named correctly (page.tsx for App Router, or standard files for Pages Router). Run npx webdna inspect to see what was detected.
common No brand colors detected

WebDNA looks for a tailwind.config.js/ts file and CSS variables in globals.css. If you use a different setup, colors won't be extracted automatically.

Fix: Define colors in your Tailwind config under theme.extend.colors, or add CSS custom properties in your globals.css. Alternatively, set them manually in webdna.config.js.
common Components showing as "[Name] component" with no description

WebDNA extracts descriptions from JSDoc comments above component exports. Without them, it falls back to a generic label.

Fix: Add a JSDoc comment above your component exports, or define descriptions in webdna.config.js:
/** Top navigation bar with logo and page links */
export default function Navbar() { ... }
info Lint error: "Private route has no auth scopes"

If you mark a route as private in webdna.config.js, the linter expects you to declare which OAuth scopes are required. This is intentional - it's a safety check.

Fix: Add scopes to your route config, or remove the route from privateRoutes if it doesn't need auth gating in the manifest.
info withWebDNA not working with next.config.ts

TypeScript configs work fine. Make sure you're using the ES module import syntax:

import { withWebDNA } from 'next-webdna';
import type { NextConfig } from 'next';

const config: NextConfig = { /* your config */ };
export default withWebDNA(config);

Still stuck? I'm happy to help debug your setup.

Contact Me

WebDNA vs Existing Standards

How WebDNA compares to other approaches for giving AI context about websites.

Featuresitemap.xmlllms.txtMCPWebDNA
Zero configPartialNoNoYes
Component info--PartialYes
Brand / design tokens---Yes
Dynamic content schema--YesYes
API examples--PartialYes
Auth / private routes--YesYes
Element-level exclusion---Yes
Validator / linter---Yes
Always in syncYesNoPartialYes

Security

WebDNA is read-only by design. This is a core principle, not a limitation.

Static JSON only

The manifest is a plain JSON file. It cannot execute code, run scripts, or modify anything.

No credentials

Private routes declare auth requirements but never store tokens, passwords, or API keys in the file.

Consent-first access

All private and dynamic access requires explicit user authorization via OAuth 2.0 flows.

Write access disabled

No AI agent can ever write to or modify WebDNA. The manifest is generated from source code only.

Roadmap

Where WebDNA is headed.

done
Phase 1: Next.js Plugin MVP (withWebDNA, CLI, auto-generation)
next
Phase 2: Custom tier with element-level exclusions
plan
Phase 3: Dynamic content + OAuth auth flows
plan
Phase 4: Multi-tenant support
plan
Phase 5: VS Code extension + CI/CD integration
plan
Phase 6: Framework adapters (SvelteKit, Astro, Nuxt)