feat(geo): add llms.txt AI crawler manifest#121
Conversation
Every public page now emits Open Graph and Twitter card tags (title, description, url, image) so links render branded previews on LinkedIn, Slack, WhatsApp and X. - Add a branded 1200x630 social card generated with next/og, served site-wide via app/opengraph-image and reused for app/twitter-image. - Add buildMetadata() helper that produces matching title/description/ canonical plus OG and Twitter card objects for each page. - Route home and auth pages through the helper; add OG/Twitter defaults to the root layout for inheritance. Refs #106
Footer links now resolve to real pages or anchors instead of placeholders that fell back to the homepage, and the previously missing contact and legal pages exist. - Footer: grouped Product/Company/Legal navigation with a real contact email, on-page anchors (#how-it-works, #faq), the parent company site, and links to the new pages. - Add /contact (indexable) with a real, monitored address. - Add /privacy and /terms minimal legal pages (noindex,follow). - Add SitePage shell for consistent standalone-page layout. Refs #112
Serve a robots.txt that allows public pages, blocks the API and gated admin/user areas, and points crawlers to the sitemap. Refs #107
Serve a sitemap.xml listing the public, indexable pages with last-modified, change frequency, and priority. The page list lives in a central publicRoutes constant so adding a public page updates the sitemap from one place; gated, admin, and API routes are excluded. Refs #108
Emit JSON-LD on every page so search and AI answer engines can identify the product, the organization behind it, and its offering. - Site-wide @graph (Organization, WebSite, SoftwareApplication) rendered from the root layout. - Organization mirrors Ajared coverage: legal name, two locations (Toronto, Abuja) with addresses and geo, contact point, and sameAs. - SoftwareApplication describes Retailytics with category, offer (free trial), and a feature list. - FAQPage emitted on the home page from the existing FAQ content. - BreadcrumbList on standalone pages via SitePage. Refs #109
Serve an llms.txt manifest at the site root so AI crawlers know what Retailytics is and which pages are authoritative. Includes a product summary, the core pages, a company description, and key features, generated from the shared site config to stay in sync. Refs #110
|
Claude finished @prudentbird's task —— View job Code Review Complete ✅Reviewed PR #121: feat(geo): add llms.txt AI crawler manifest Todo List
Code Review FeedbackOverall Assessment✅ Strong implementation - This is a well-structured Next.js API route that follows best practices for serving static content. Code Quality & Best Practices✅ Excellent Structure:
✅ Configuration Management:
Security Analysis✅ No Security Issues Identified:
Performance Considerations✅ Excellent Performance:
💡 Enhancement Opportunity: return new Response(body, {
headers: {
'Content-Type': 'text/plain; charset=utf-8',
'Cache-Control': 'public, max-age=3600, s-maxage=86400',
},
});Technical Implementation✅ Correct Next.js Patterns:
Potential Issues
export function GET() {
try {
const body = `# ${siteConfig.name}...`;
return new Response(body, {
headers: {
'Content-Type': 'text/plain; charset=utf-8',
},
});
} catch (error) {
return new Response('Error generating manifest', { status: 500 });
}
}Test Coverage📝 Test Recommendations:
Example test structure: describe('/llms.txt route', () => {
it('should return plain text content', async () => {
const response = await GET();
expect(response.headers.get('content-type')).toBe('text/plain; charset=utf-8');
});
it('should include all required sections', async () => {
const response = await GET();
const text = await response.text();
expect(text).toContain('# Retailytics');
expect(text).toContain('## Core pages');
expect(text).toContain('## Company');
expect(text).toContain('## Key features');
expect(text).toContain('## Legal');
});
});Standards Compliance✅ LLMs.txt Specification:
Final Verdict🎉 Excellent Implementation - This PR demonstrates solid engineering practices with a clean, secure, and performant solution. The code is production-ready with only minor enhancement opportunities. Recommendation: ✅ APPROVE - No blocking issues identified. The implementation is well-crafted and follows best practices. |
Summary
Serves an
llms.txtmanifest at the site root (src/app/llms.txt/route.ts,text/plain) so AI crawlers get a clear, authoritative description instead of guessing.Contents (generated from the shared site config so it can't drift):
Done when (issue #110)
llms.txtmanifest is served at the site root with a product summary, the core pages, a company description, and key features.Validation
npm run typecheck✅ /npm run build✅ —/llms.txtbuilds as a static route.next start: served astext/plain; charset=utf-8with correct absolute URLs.Notes
Stacked on #109 (targets
feat/seo-109-structured-data).Closes #110