examples.ts 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. export type Example = {
  2. slug: string;
  3. title: string;
  4. description: string;
  5. tags: string[];
  6. githubPath: string;
  7. demoUrl?: string;
  8. };
  9. const GITHUB_BASE =
  10. "https://github.com/vercel-labs/json-render/tree/main/examples";
  11. export const examples: Example[] = [
  12. {
  13. slug: "chat",
  14. title: "Chat",
  15. description:
  16. "AI chat app with tool calling, streaming UI, and rich components powered by the AI SDK.",
  17. tags: ["React", "Next.js", "AI"],
  18. githubPath: "examples/chat",
  19. demoUrl: "https://chat-demo.json-render.dev",
  20. },
  21. {
  22. slug: "dashboard",
  23. title: "Dashboard",
  24. description:
  25. "AI-generated dashboard with drag-and-drop, charts, and real-time data binding.",
  26. tags: ["React", "Next.js", "AI"],
  27. githubPath: "examples/dashboard",
  28. demoUrl: "https://dashboard-demo.json-render.dev",
  29. },
  30. {
  31. slug: "no-ai",
  32. title: "No AI",
  33. description:
  34. "Static specs rendered without any AI — forms, cards, tables, and more from hardcoded JSON.",
  35. tags: ["React", "Next.js"],
  36. githubPath: "examples/no-ai",
  37. demoUrl: "https://no-ai-demo.json-render.dev",
  38. },
  39. {
  40. slug: "svelte",
  41. title: "Svelte",
  42. description:
  43. "Svelte renderer demo with counter, todo list, and two-way data binding.",
  44. tags: ["Svelte", "Vite"],
  45. githubPath: "examples/svelte",
  46. demoUrl: "https://svelte-demo.json-render.dev",
  47. },
  48. {
  49. slug: "svelte-chat",
  50. title: "Svelte Chat",
  51. description: "AI chat app built with SvelteKit and the Svelte renderer.",
  52. tags: ["Svelte", "SvelteKit", "AI"],
  53. githubPath: "examples/svelte-chat",
  54. demoUrl: "https://json-render-svelte-chat-demo.labs.vercel.dev",
  55. },
  56. {
  57. slug: "vue",
  58. title: "Vue",
  59. description:
  60. "Vue renderer demo with counter, todo list, and two-way data binding.",
  61. tags: ["Vue", "Vite"],
  62. githubPath: "examples/vue",
  63. demoUrl: "https://vue-demo.json-render.dev",
  64. },
  65. {
  66. slug: "solid",
  67. title: "Solid",
  68. description:
  69. "Solid renderer demo with counter, todo list, and two-way data binding.",
  70. tags: ["Solid", "Vite"],
  71. githubPath: "examples/solid",
  72. demoUrl: "https://solid-demo.json-render.dev",
  73. },
  74. {
  75. slug: "vite-renderers",
  76. title: "Multi-Framework Renderers",
  77. description:
  78. "Same spec rendered with React, Vue, Svelte, and Solid side by side — hot-swappable at runtime.",
  79. tags: ["React", "Vue", "Svelte", "Solid", "Vite"],
  80. githubPath: "examples/vite-renderers",
  81. },
  82. {
  83. slug: "react-email",
  84. title: "React Email",
  85. description:
  86. "Generate HTML and plain-text emails from json-render specs using React Email.",
  87. tags: ["React", "Email"],
  88. githubPath: "examples/react-email",
  89. demoUrl: "https://react-email-demo.json-render.dev",
  90. },
  91. {
  92. slug: "react-pdf",
  93. title: "React PDF",
  94. description:
  95. "Generate PDF documents from json-render specs with @react-pdf/renderer.",
  96. tags: ["React", "PDF"],
  97. githubPath: "examples/react-pdf",
  98. demoUrl: "https://react-pdf-demo.json-render.dev",
  99. },
  100. {
  101. slug: "react-three-fiber",
  102. title: "React Three Fiber",
  103. description:
  104. "3D scenes generated from json-render specs using Three.js and React Three Fiber.",
  105. tags: ["React", "3D"],
  106. githubPath: "examples/react-three-fiber",
  107. demoUrl: "https://react-three-fiber-demo.json-render.dev",
  108. },
  109. {
  110. slug: "react-native",
  111. title: "React Native",
  112. description:
  113. "Mobile app rendering json-render specs with Expo and React Native.",
  114. tags: ["React Native", "Expo"],
  115. githubPath: "examples/react-native",
  116. },
  117. {
  118. slug: "remotion",
  119. title: "Remotion",
  120. description: "Generate videos from json-render specs using Remotion.",
  121. tags: ["React", "Video"],
  122. githubPath: "examples/remotion",
  123. demoUrl: "https://remotion-demo.json-render.dev",
  124. },
  125. {
  126. slug: "image",
  127. title: "Image",
  128. description:
  129. "Generate OG images and social cards from json-render specs using Satori.",
  130. tags: ["React", "Image"],
  131. githubPath: "examples/image",
  132. demoUrl: "https://image-demo.json-render.dev",
  133. },
  134. {
  135. slug: "mcp",
  136. title: "MCP App",
  137. description:
  138. "MCP server that serves shadcn UIs to Claude, ChatGPT, Cursor, and VS Code.",
  139. tags: ["React", "MCP", "Vite"],
  140. githubPath: "examples/mcp",
  141. },
  142. ];
  143. export const allTags = Array.from(
  144. new Set(examples.flatMap((e) => e.tags)),
  145. ).sort();
  146. export function getGitHubUrl(example: Example): string {
  147. return `${GITHUB_BASE}/${example.slug}`;
  148. }