page.tsx 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. import Link from "next/link";
  2. import { Button } from "@/components/ui/button";
  3. export const metadata = {
  4. title: "Introduction | json-render",
  5. };
  6. export default function DocsPage() {
  7. return (
  8. <article>
  9. <h1 className="text-3xl font-bold mb-4">Introduction</h1>
  10. <p className="text-muted-foreground mb-8">
  11. json-render is a library for building AI-powered UIs with enterprise-grade guardrails.
  12. </p>
  13. <h2 className="text-xl font-semibold mt-12 mb-4">What is json-render?</h2>
  14. <p className="text-sm text-muted-foreground mb-4 leading-relaxed">
  15. Unlike vibe-coding tools that let AI generate arbitrary code, json-render gives AI a
  16. constrained vocabulary. You define what components exist, what props they take, and
  17. what actions are available. AI generates JSON that matches your schema, and your
  18. components render it natively.
  19. </p>
  20. <h2 className="text-xl font-semibold mt-12 mb-4">Why json-render?</h2>
  21. <div className="space-y-4 mb-8">
  22. <div>
  23. <h3 className="font-medium mb-1">Consistency</h3>
  24. <p className="text-sm text-muted-foreground">
  25. AI only uses your approved components. No random UI patterns.
  26. </p>
  27. </div>
  28. <div>
  29. <h3 className="font-medium mb-1">Safety</h3>
  30. <p className="text-sm text-muted-foreground">
  31. Actions are declared by name, you control what they do.
  32. </p>
  33. </div>
  34. <div>
  35. <h3 className="font-medium mb-1">Flexibility</h3>
  36. <p className="text-sm text-muted-foreground">
  37. Define a catalog, let AI generate JSON, render it your way.
  38. </p>
  39. </div>
  40. </div>
  41. <h2 className="text-xl font-semibold mt-12 mb-4">How it works</h2>
  42. <ol className="list-decimal list-inside space-y-2 text-sm text-muted-foreground mb-8">
  43. <li>You define the catalog — what components exist, what props they take</li>
  44. <li>AI generates JSON — constrained to your catalog</li>
  45. <li>You render it — with your own components</li>
  46. <li>Actions are safe — AI declares intent, you implement it</li>
  47. </ol>
  48. <div className="flex gap-3 mt-12">
  49. <Button size="sm" asChild>
  50. <Link href="/docs/installation">Get Started</Link>
  51. </Button>
  52. <Button size="sm" variant="outline" asChild>
  53. <Link href="/docs/quick-start">Quick Start</Link>
  54. </Button>
  55. </div>
  56. </article>
  57. );
  58. }