rnow 0.2.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. rnow/__init__.py +5 -0
  2. rnow/__main__.py +7 -0
  3. rnow/cli/__init__.py +6 -0
  4. rnow/cli/auth.py +67 -0
  5. rnow/cli/blob.py +98 -0
  6. rnow/cli/commands.py +2311 -0
  7. rnow/cli/common.py +28 -0
  8. rnow/cli/cube.py +255 -0
  9. rnow/cli/main.py +49 -0
  10. rnow/cli/test.py +728 -0
  11. rnow/cli/token_count.py +295 -0
  12. rnow/core/__init__.py +33 -0
  13. rnow/core/reward.py +333 -0
  14. rnow/core/tool.py +494 -0
  15. rnow/models.py +295 -0
  16. rnow/templates/deepseek-aha/config.yml +26 -0
  17. rnow/templates/deepseek-aha/rewards.py +36 -0
  18. rnow/templates/deepseek-aha/train.jsonl +1000 -0
  19. rnow/templates/mcp-tavily/config.yml +29 -0
  20. rnow/templates/mcp-tavily/requirements.txt +1 -0
  21. rnow/templates/mcp-tavily/rewards.py +25 -0
  22. rnow/templates/mcp-tavily/train.jsonl +500 -0
  23. rnow/templates/new/config.yml +26 -0
  24. rnow/templates/new/requirements.txt +1 -0
  25. rnow/templates/new/rewards.py +0 -0
  26. rnow/templates/new/train.jsonl +0 -0
  27. rnow/templates/rl-nextjs/config.yml +27 -0
  28. rnow/templates/rl-nextjs/requirements.txt +2 -0
  29. rnow/templates/rl-nextjs/rewards.py +446 -0
  30. rnow/templates/rl-nextjs/train.jsonl +1000 -0
  31. rnow/templates/rl-single/config.yml +27 -0
  32. rnow/templates/rl-single/requirements.txt +1 -0
  33. rnow/templates/rl-single/rewards.py +14 -0
  34. rnow/templates/rl-single/train.jsonl +1000 -0
  35. rnow/templates/rl-tools/config.yml +27 -0
  36. rnow/templates/rl-tools/env.py +38 -0
  37. rnow/templates/rl-tools/requirements.txt +3 -0
  38. rnow/templates/rl-tools/rewards.py +25 -0
  39. rnow/templates/rl-tools/train.jsonl +500 -0
  40. rnow/templates/sft/config.yml +20 -0
  41. rnow/templates/sft/train.jsonl +100 -0
  42. rnow/templates/tutorial-reward/config.yml +27 -0
  43. rnow/templates/tutorial-reward/requirements.txt +1 -0
  44. rnow/templates/tutorial-reward/rewards.py +15 -0
  45. rnow/templates/tutorial-reward/train.jsonl +1000 -0
  46. rnow/templates/tutorial-tool/config.yml +27 -0
  47. rnow/templates/tutorial-tool/env.py +7 -0
  48. rnow/templates/tutorial-tool/requirements.txt +3 -0
  49. rnow/templates/tutorial-tool/rewards.py +7 -0
  50. rnow/templates/tutorial-tool/train.jsonl +1266 -0
  51. rnow-0.2.4.dist-info/METADATA +135 -0
  52. rnow-0.2.4.dist-info/RECORD +56 -0
  53. rnow-0.2.4.dist-info/WHEEL +5 -0
  54. rnow-0.2.4.dist-info/entry_points.txt +2 -0
  55. rnow-0.2.4.dist-info/licenses/LICENSE +21 -0
  56. rnow-0.2.4.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1000 @@
1
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js layout component that accepts children as a prop with the correct TypeScript types."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
2
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a layout.tsx file for Next.js App Router that wraps child pages."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
3
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a root layout component for Next.js with proper children typing."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
4
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a reusable layout component in Next.js that renders children prop."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
5
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a Next.js App Router layout that correctly types the children prop as React.ReactNode."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
6
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js dynamic route page component that correctly awaits and destructures the params prop."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
7
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page.tsx for a [slug] dynamic route that awaits params before using them."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
8
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a Next.js dynamic segment page that properly handles async params."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
9
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a dynamic route page in Next.js 15 that awaits the params promise."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
10
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page component for /blog/[id] that correctly destructures await params."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
11
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a generateStaticParams function for Next.js that returns an array of slug parameters for static generation."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
12
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a generateStaticParams function to pre-render blog post pages at build time."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
13
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a static params generator for Next.js dynamic routes."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
14
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create generateStaticParams for a /posts/[slug] route in Next.js."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
15
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a function to statically generate pages for all products in Next.js."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
16
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js page component that correctly handles searchParams as a Promise and awaits it before accessing properties."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
17
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page.tsx that properly awaits searchParams to get query string values."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
18
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a search results page in Next.js that correctly handles async searchParams."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
19
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a page component that reads URL query parameters using Next.js 15 searchParams."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
20
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a Next.js page that awaits searchParams to filter products by category."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
21
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a client component in Next.js with the 'use client' directive at the top."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
22
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a client-side interactive button component with 'use client'."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
23
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a form component in Next.js that needs client-side state management."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
24
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a counter component with useState that requires 'use client'."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
25
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a Next.js client component with onClick handlers."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
26
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export metadata for a Next.js page with a title and description."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
27
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a static metadata export for SEO in Next.js."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
28
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write metadata configuration for a blog post page."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
29
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export page metadata with title, description, and openGraph properties."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
30
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create metadata export for a product page in Next.js."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
31
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create an error.tsx boundary component for Next.js that includes an error prop and a reset callback function."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
32
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an error boundary that displays the error message and a retry button."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
33
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build an error.tsx file that catches errors in a route segment."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
34
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js error boundary with proper TypeScript types for error and reset."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
35
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an error handling component that shows a fallback UI and reset option."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
36
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a not-found.tsx component for Next.js that displays a custom 404 page."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
37
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a NotFound component that shows a friendly 404 message."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
38
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a custom 404 page for Next.js App Router."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
39
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a not-found boundary that displays navigation options."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
40
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a not-found.tsx with a link back to the home page."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
41
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a loading.tsx component for Next.js that shows a loading state."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
42
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a loading skeleton for a page in Next.js."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
43
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a loading.tsx with a spinner animation."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
44
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a suspense loading boundary for Next.js App Router."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
45
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a loading component that shows placeholder content."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
46
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a template.tsx component for Next.js that accepts children as a prop and wraps them in a persistent UI element."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
47
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a template component that re-renders on navigation."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
48
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a template.tsx that wraps children with animation."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
49
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js template for route transitions."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
50
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a template component with children prop typed correctly."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
51
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js page that uses the redirect() function to navigate users to another page."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
52
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a server component that redirects unauthenticated users."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
53
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a page that redirects to /login if no session exists."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
54
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a conditional redirect in Next.js based on user role."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
55
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page that uses redirect() to send users to the dashboard."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
56
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js page that uses the notFound() function to trigger a 404 page."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
57
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page that calls notFound() when a resource doesn't exist."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
58
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a dynamic page that shows 404 for invalid IDs."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
59
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a product page that triggers notFound() for missing items."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
60
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a blog post page that uses notFound() when the post is not found."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
61
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create an async generateMetadata function for a Next.js page that dynamically generates page metadata."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
62
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write generateMetadata that fetches data to create dynamic titles."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
63
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a generateMetadata function for a blog post page."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
64
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create dynamic metadata generation for a product detail page."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
65
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an async generateMetadata that reads from a database."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
66
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export a static metadata object for a Next.js page with title and description."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
67
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a const metadata export for a landing page."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
68
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write static metadata for the about page."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
69
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export metadata object with openGraph configuration."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
70
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a metadata constant for a contact page."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
71
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a GET route handler in Next.js App Router that returns a JSON response."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
72
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an API route that handles GET requests and returns user data."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
73
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a route.ts GET handler for fetching products."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
74
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a REST API endpoint for GET /api/posts in Next.js."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
75
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a GET route handler that returns data from a database."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
76
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a POST route handler in Next.js App Router that processes request body data."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
77
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an API route that handles form submissions."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
78
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a POST handler for creating new resources."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
79
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a route.ts that processes POST requests with JSON body."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
80
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a POST route handler for user registration."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
81
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a default exported Page component for Next.js App Router."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
82
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a basic page.tsx file for a route."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
83
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a simple page component that displays content."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
84
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create the home page component for Next.js App Router."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
85
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a default Page function component."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
86
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a client component in Next.js that uses the 'use client' directive for client-side interactivity."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
87
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an interactive dropdown menu as a client component."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
88
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a modal component that needs client-side JavaScript."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
89
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a tabs component with 'use client' directive."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
90
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a client component for a search input with state."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
91
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a server component in Next.js without the 'use client' directive."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
92
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a server component that fetches data directly."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
93
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a page component that renders on the server."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
94
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a server-rendered list component."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
95
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a server component that accesses a database."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
96
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a parallel route segment component for Next.js using the @modal naming convention."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
97
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a layout that renders parallel routes with @dashboard slot."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
98
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a parallel route for a modal overlay."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
99
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a layout with @sidebar and @content parallel routes."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
100
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a component for the @analytics parallel slot."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
101
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js layout component that accepts children as a prop with the correct TypeScript types."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
102
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a layout.tsx file for Next.js App Router that wraps child pages."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
103
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a root layout component for Next.js with proper children typing."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
104
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a reusable layout component in Next.js that renders children prop."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
105
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a Next.js App Router layout that correctly types the children prop as React.ReactNode."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
106
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js dynamic route page component that correctly awaits and destructures the params prop."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
107
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page.tsx for a [slug] dynamic route that awaits params before using them."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
108
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a Next.js dynamic segment page that properly handles async params."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
109
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a dynamic route page in Next.js 15 that awaits the params promise."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
110
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page component for /blog/[id] that correctly destructures await params."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
111
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a generateStaticParams function for Next.js that returns an array of slug parameters for static generation."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
112
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a generateStaticParams function to pre-render blog post pages at build time."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
113
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a static params generator for Next.js dynamic routes."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
114
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create generateStaticParams for a /posts/[slug] route in Next.js."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
115
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a function to statically generate pages for all products in Next.js."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
116
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js page component that correctly handles searchParams as a Promise and awaits it before accessing properties."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
117
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page.tsx that properly awaits searchParams to get query string values."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
118
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a search results page in Next.js that correctly handles async searchParams."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
119
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a page component that reads URL query parameters using Next.js 15 searchParams."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
120
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a Next.js page that awaits searchParams to filter products by category."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
121
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a client component in Next.js with the 'use client' directive at the top."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
122
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a client-side interactive button component with 'use client'."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
123
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a form component in Next.js that needs client-side state management."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
124
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a counter component with useState that requires 'use client'."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
125
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a Next.js client component with onClick handlers."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
126
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export metadata for a Next.js page with a title and description."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
127
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a static metadata export for SEO in Next.js."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
128
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write metadata configuration for a blog post page."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
129
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export page metadata with title, description, and openGraph properties."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
130
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create metadata export for a product page in Next.js."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
131
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create an error.tsx boundary component for Next.js that includes an error prop and a reset callback function."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
132
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an error boundary that displays the error message and a retry button."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
133
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build an error.tsx file that catches errors in a route segment."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
134
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js error boundary with proper TypeScript types for error and reset."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
135
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an error handling component that shows a fallback UI and reset option."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
136
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a not-found.tsx component for Next.js that displays a custom 404 page."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
137
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a NotFound component that shows a friendly 404 message."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
138
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a custom 404 page for Next.js App Router."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
139
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a not-found boundary that displays navigation options."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
140
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a not-found.tsx with a link back to the home page."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
141
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a loading.tsx component for Next.js that shows a loading state."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
142
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a loading skeleton for a page in Next.js."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
143
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a loading.tsx with a spinner animation."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
144
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a suspense loading boundary for Next.js App Router."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
145
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a loading component that shows placeholder content."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
146
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a template.tsx component for Next.js that accepts children as a prop and wraps them in a persistent UI element."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
147
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a template component that re-renders on navigation."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
148
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a template.tsx that wraps children with animation."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
149
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js template for route transitions."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
150
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a template component with children prop typed correctly."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
151
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js page that uses the redirect() function to navigate users to another page."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
152
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a server component that redirects unauthenticated users."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
153
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a page that redirects to /login if no session exists."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
154
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a conditional redirect in Next.js based on user role."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
155
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page that uses redirect() to send users to the dashboard."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
156
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js page that uses the notFound() function to trigger a 404 page."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
157
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page that calls notFound() when a resource doesn't exist."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
158
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a dynamic page that shows 404 for invalid IDs."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
159
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a product page that triggers notFound() for missing items."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
160
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a blog post page that uses notFound() when the post is not found."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
161
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create an async generateMetadata function for a Next.js page that dynamically generates page metadata."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
162
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write generateMetadata that fetches data to create dynamic titles."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
163
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a generateMetadata function for a blog post page."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
164
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create dynamic metadata generation for a product detail page."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
165
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an async generateMetadata that reads from a database."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
166
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export a static metadata object for a Next.js page with title and description."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
167
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a const metadata export for a landing page."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
168
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write static metadata for the about page."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
169
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export metadata object with openGraph configuration."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
170
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a metadata constant for a contact page."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
171
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a GET route handler in Next.js App Router that returns a JSON response."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
172
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an API route that handles GET requests and returns user data."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
173
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a route.ts GET handler for fetching products."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
174
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a REST API endpoint for GET /api/posts in Next.js."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
175
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a GET route handler that returns data from a database."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
176
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a POST route handler in Next.js App Router that processes request body data."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
177
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an API route that handles form submissions."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
178
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a POST handler for creating new resources."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
179
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a route.ts that processes POST requests with JSON body."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
180
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a POST route handler for user registration."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
181
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a default exported Page component for Next.js App Router."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
182
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a basic page.tsx file for a route."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
183
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a simple page component that displays content."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
184
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create the home page component for Next.js App Router."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
185
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a default Page function component."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
186
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a client component in Next.js that uses the 'use client' directive for client-side interactivity."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
187
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an interactive dropdown menu as a client component."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
188
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a modal component that needs client-side JavaScript."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
189
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a tabs component with 'use client' directive."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
190
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a client component for a search input with state."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
191
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a server component in Next.js without the 'use client' directive."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
192
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a server component that fetches data directly."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
193
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a page component that renders on the server."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
194
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a server-rendered list component."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
195
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a server component that accesses a database."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
196
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a parallel route segment component for Next.js using the @modal naming convention."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
197
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a layout that renders parallel routes with @dashboard slot."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
198
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a parallel route for a modal overlay."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
199
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a layout with @sidebar and @content parallel routes."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
200
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a component for the @analytics parallel slot."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
201
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js layout component that accepts children as a prop with the correct TypeScript types."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
202
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a layout.tsx file for Next.js App Router that wraps child pages."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
203
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a root layout component for Next.js with proper children typing."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
204
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a reusable layout component in Next.js that renders children prop."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
205
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a Next.js App Router layout that correctly types the children prop as React.ReactNode."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
206
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js dynamic route page component that correctly awaits and destructures the params prop."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
207
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page.tsx for a [slug] dynamic route that awaits params before using them."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
208
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a Next.js dynamic segment page that properly handles async params."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
209
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a dynamic route page in Next.js 15 that awaits the params promise."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
210
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page component for /blog/[id] that correctly destructures await params."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
211
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a generateStaticParams function for Next.js that returns an array of slug parameters for static generation."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
212
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a generateStaticParams function to pre-render blog post pages at build time."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
213
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a static params generator for Next.js dynamic routes."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
214
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create generateStaticParams for a /posts/[slug] route in Next.js."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
215
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a function to statically generate pages for all products in Next.js."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
216
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js page component that correctly handles searchParams as a Promise and awaits it before accessing properties."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
217
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page.tsx that properly awaits searchParams to get query string values."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
218
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a search results page in Next.js that correctly handles async searchParams."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
219
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a page component that reads URL query parameters using Next.js 15 searchParams."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
220
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a Next.js page that awaits searchParams to filter products by category."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
221
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a client component in Next.js with the 'use client' directive at the top."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
222
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a client-side interactive button component with 'use client'."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
223
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a form component in Next.js that needs client-side state management."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
224
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a counter component with useState that requires 'use client'."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
225
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a Next.js client component with onClick handlers."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
226
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export metadata for a Next.js page with a title and description."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
227
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a static metadata export for SEO in Next.js."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
228
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write metadata configuration for a blog post page."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
229
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export page metadata with title, description, and openGraph properties."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
230
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create metadata export for a product page in Next.js."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
231
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create an error.tsx boundary component for Next.js that includes an error prop and a reset callback function."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
232
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an error boundary that displays the error message and a retry button."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
233
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build an error.tsx file that catches errors in a route segment."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
234
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js error boundary with proper TypeScript types for error and reset."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
235
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an error handling component that shows a fallback UI and reset option."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
236
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a not-found.tsx component for Next.js that displays a custom 404 page."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
237
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a NotFound component that shows a friendly 404 message."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
238
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a custom 404 page for Next.js App Router."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
239
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a not-found boundary that displays navigation options."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
240
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a not-found.tsx with a link back to the home page."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
241
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a loading.tsx component for Next.js that shows a loading state."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
242
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a loading skeleton for a page in Next.js."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
243
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a loading.tsx with a spinner animation."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
244
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a suspense loading boundary for Next.js App Router."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
245
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a loading component that shows placeholder content."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
246
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a template.tsx component for Next.js that accepts children as a prop and wraps them in a persistent UI element."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
247
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a template component that re-renders on navigation."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
248
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a template.tsx that wraps children with animation."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
249
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js template for route transitions."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
250
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a template component with children prop typed correctly."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
251
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js page that uses the redirect() function to navigate users to another page."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
252
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a server component that redirects unauthenticated users."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
253
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a page that redirects to /login if no session exists."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
254
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a conditional redirect in Next.js based on user role."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
255
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page that uses redirect() to send users to the dashboard."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
256
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js page that uses the notFound() function to trigger a 404 page."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
257
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page that calls notFound() when a resource doesn't exist."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
258
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a dynamic page that shows 404 for invalid IDs."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
259
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a product page that triggers notFound() for missing items."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
260
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a blog post page that uses notFound() when the post is not found."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
261
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create an async generateMetadata function for a Next.js page that dynamically generates page metadata."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
262
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write generateMetadata that fetches data to create dynamic titles."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
263
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a generateMetadata function for a blog post page."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
264
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create dynamic metadata generation for a product detail page."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
265
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an async generateMetadata that reads from a database."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
266
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export a static metadata object for a Next.js page with title and description."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
267
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a const metadata export for a landing page."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
268
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write static metadata for the about page."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
269
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export metadata object with openGraph configuration."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
270
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a metadata constant for a contact page."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
271
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a GET route handler in Next.js App Router that returns a JSON response."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
272
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an API route that handles GET requests and returns user data."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
273
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a route.ts GET handler for fetching products."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
274
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a REST API endpoint for GET /api/posts in Next.js."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
275
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a GET route handler that returns data from a database."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
276
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a POST route handler in Next.js App Router that processes request body data."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
277
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an API route that handles form submissions."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
278
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a POST handler for creating new resources."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
279
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a route.ts that processes POST requests with JSON body."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
280
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a POST route handler for user registration."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
281
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a default exported Page component for Next.js App Router."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
282
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a basic page.tsx file for a route."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
283
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a simple page component that displays content."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
284
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create the home page component for Next.js App Router."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
285
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a default Page function component."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
286
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a client component in Next.js that uses the 'use client' directive for client-side interactivity."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
287
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an interactive dropdown menu as a client component."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
288
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a modal component that needs client-side JavaScript."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
289
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a tabs component with 'use client' directive."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
290
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a client component for a search input with state."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
291
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a server component in Next.js without the 'use client' directive."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
292
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a server component that fetches data directly."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
293
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a page component that renders on the server."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
294
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a server-rendered list component."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
295
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a server component that accesses a database."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
296
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a parallel route segment component for Next.js using the @modal naming convention."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
297
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a layout that renders parallel routes with @dashboard slot."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
298
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a parallel route for a modal overlay."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
299
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a layout with @sidebar and @content parallel routes."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
300
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a component for the @analytics parallel slot."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
301
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js layout component that accepts children as a prop with the correct TypeScript types."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
302
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a layout.tsx file for Next.js App Router that wraps child pages."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
303
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a root layout component for Next.js with proper children typing."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
304
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a reusable layout component in Next.js that renders children prop."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
305
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a Next.js App Router layout that correctly types the children prop as React.ReactNode."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
306
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js dynamic route page component that correctly awaits and destructures the params prop."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
307
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page.tsx for a [slug] dynamic route that awaits params before using them."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
308
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a Next.js dynamic segment page that properly handles async params."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
309
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a dynamic route page in Next.js 15 that awaits the params promise."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
310
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page component for /blog/[id] that correctly destructures await params."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
311
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a generateStaticParams function for Next.js that returns an array of slug parameters for static generation."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
312
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a generateStaticParams function to pre-render blog post pages at build time."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
313
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a static params generator for Next.js dynamic routes."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
314
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create generateStaticParams for a /posts/[slug] route in Next.js."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
315
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a function to statically generate pages for all products in Next.js."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
316
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js page component that correctly handles searchParams as a Promise and awaits it before accessing properties."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
317
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page.tsx that properly awaits searchParams to get query string values."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
318
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a search results page in Next.js that correctly handles async searchParams."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
319
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a page component that reads URL query parameters using Next.js 15 searchParams."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
320
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a Next.js page that awaits searchParams to filter products by category."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
321
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a client component in Next.js with the 'use client' directive at the top."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
322
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a client-side interactive button component with 'use client'."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
323
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a form component in Next.js that needs client-side state management."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
324
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a counter component with useState that requires 'use client'."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
325
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a Next.js client component with onClick handlers."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
326
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export metadata for a Next.js page with a title and description."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
327
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a static metadata export for SEO in Next.js."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
328
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write metadata configuration for a blog post page."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
329
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export page metadata with title, description, and openGraph properties."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
330
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create metadata export for a product page in Next.js."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
331
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create an error.tsx boundary component for Next.js that includes an error prop and a reset callback function."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
332
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an error boundary that displays the error message and a retry button."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
333
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build an error.tsx file that catches errors in a route segment."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
334
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js error boundary with proper TypeScript types for error and reset."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
335
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an error handling component that shows a fallback UI and reset option."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
336
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a not-found.tsx component for Next.js that displays a custom 404 page."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
337
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a NotFound component that shows a friendly 404 message."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
338
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a custom 404 page for Next.js App Router."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
339
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a not-found boundary that displays navigation options."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
340
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a not-found.tsx with a link back to the home page."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
341
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a loading.tsx component for Next.js that shows a loading state."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
342
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a loading skeleton for a page in Next.js."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
343
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a loading.tsx with a spinner animation."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
344
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a suspense loading boundary for Next.js App Router."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
345
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a loading component that shows placeholder content."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
346
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a template.tsx component for Next.js that accepts children as a prop and wraps them in a persistent UI element."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
347
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a template component that re-renders on navigation."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
348
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a template.tsx that wraps children with animation."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
349
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js template for route transitions."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
350
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a template component with children prop typed correctly."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
351
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js page that uses the redirect() function to navigate users to another page."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
352
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a server component that redirects unauthenticated users."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
353
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a page that redirects to /login if no session exists."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
354
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a conditional redirect in Next.js based on user role."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
355
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page that uses redirect() to send users to the dashboard."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
356
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js page that uses the notFound() function to trigger a 404 page."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
357
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page that calls notFound() when a resource doesn't exist."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
358
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a dynamic page that shows 404 for invalid IDs."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
359
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a product page that triggers notFound() for missing items."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
360
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a blog post page that uses notFound() when the post is not found."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
361
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create an async generateMetadata function for a Next.js page that dynamically generates page metadata."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
362
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write generateMetadata that fetches data to create dynamic titles."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
363
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a generateMetadata function for a blog post page."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
364
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create dynamic metadata generation for a product detail page."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
365
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an async generateMetadata that reads from a database."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
366
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export a static metadata object for a Next.js page with title and description."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
367
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a const metadata export for a landing page."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
368
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write static metadata for the about page."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
369
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export metadata object with openGraph configuration."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
370
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a metadata constant for a contact page."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
371
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a GET route handler in Next.js App Router that returns a JSON response."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
372
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an API route that handles GET requests and returns user data."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
373
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a route.ts GET handler for fetching products."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
374
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a REST API endpoint for GET /api/posts in Next.js."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
375
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a GET route handler that returns data from a database."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
376
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a POST route handler in Next.js App Router that processes request body data."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
377
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an API route that handles form submissions."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
378
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a POST handler for creating new resources."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
379
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a route.ts that processes POST requests with JSON body."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
380
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a POST route handler for user registration."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
381
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a default exported Page component for Next.js App Router."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
382
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a basic page.tsx file for a route."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
383
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a simple page component that displays content."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
384
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create the home page component for Next.js App Router."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
385
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a default Page function component."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
386
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a client component in Next.js that uses the 'use client' directive for client-side interactivity."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
387
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an interactive dropdown menu as a client component."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
388
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a modal component that needs client-side JavaScript."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
389
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a tabs component with 'use client' directive."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
390
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a client component for a search input with state."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
391
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a server component in Next.js without the 'use client' directive."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
392
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a server component that fetches data directly."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
393
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a page component that renders on the server."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
394
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a server-rendered list component."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
395
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a server component that accesses a database."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
396
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a parallel route segment component for Next.js using the @modal naming convention."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
397
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a layout that renders parallel routes with @dashboard slot."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
398
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a parallel route for a modal overlay."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
399
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a layout with @sidebar and @content parallel routes."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
400
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a component for the @analytics parallel slot."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
401
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js layout component that accepts children as a prop with the correct TypeScript types."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
402
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a layout.tsx file for Next.js App Router that wraps child pages."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
403
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a root layout component for Next.js with proper children typing."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
404
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a reusable layout component in Next.js that renders children prop."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
405
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a Next.js App Router layout that correctly types the children prop as React.ReactNode."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
406
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js dynamic route page component that correctly awaits and destructures the params prop."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
407
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page.tsx for a [slug] dynamic route that awaits params before using them."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
408
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a Next.js dynamic segment page that properly handles async params."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
409
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a dynamic route page in Next.js 15 that awaits the params promise."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
410
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page component for /blog/[id] that correctly destructures await params."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
411
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a generateStaticParams function for Next.js that returns an array of slug parameters for static generation."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
412
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a generateStaticParams function to pre-render blog post pages at build time."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
413
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a static params generator for Next.js dynamic routes."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
414
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create generateStaticParams for a /posts/[slug] route in Next.js."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
415
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a function to statically generate pages for all products in Next.js."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
416
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js page component that correctly handles searchParams as a Promise and awaits it before accessing properties."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
417
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page.tsx that properly awaits searchParams to get query string values."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
418
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a search results page in Next.js that correctly handles async searchParams."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
419
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a page component that reads URL query parameters using Next.js 15 searchParams."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
420
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a Next.js page that awaits searchParams to filter products by category."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
421
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a client component in Next.js with the 'use client' directive at the top."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
422
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a client-side interactive button component with 'use client'."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
423
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a form component in Next.js that needs client-side state management."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
424
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a counter component with useState that requires 'use client'."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
425
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a Next.js client component with onClick handlers."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
426
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export metadata for a Next.js page with a title and description."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
427
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a static metadata export for SEO in Next.js."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
428
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write metadata configuration for a blog post page."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
429
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export page metadata with title, description, and openGraph properties."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
430
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create metadata export for a product page in Next.js."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
431
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create an error.tsx boundary component for Next.js that includes an error prop and a reset callback function."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
432
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an error boundary that displays the error message and a retry button."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
433
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build an error.tsx file that catches errors in a route segment."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
434
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js error boundary with proper TypeScript types for error and reset."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
435
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an error handling component that shows a fallback UI and reset option."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
436
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a not-found.tsx component for Next.js that displays a custom 404 page."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
437
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a NotFound component that shows a friendly 404 message."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
438
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a custom 404 page for Next.js App Router."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
439
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a not-found boundary that displays navigation options."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
440
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a not-found.tsx with a link back to the home page."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
441
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a loading.tsx component for Next.js that shows a loading state."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
442
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a loading skeleton for a page in Next.js."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
443
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a loading.tsx with a spinner animation."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
444
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a suspense loading boundary for Next.js App Router."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
445
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a loading component that shows placeholder content."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
446
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a template.tsx component for Next.js that accepts children as a prop and wraps them in a persistent UI element."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
447
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a template component that re-renders on navigation."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
448
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a template.tsx that wraps children with animation."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
449
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js template for route transitions."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
450
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a template component with children prop typed correctly."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
451
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js page that uses the redirect() function to navigate users to another page."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
452
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a server component that redirects unauthenticated users."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
453
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a page that redirects to /login if no session exists."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
454
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a conditional redirect in Next.js based on user role."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
455
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page that uses redirect() to send users to the dashboard."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
456
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js page that uses the notFound() function to trigger a 404 page."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
457
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page that calls notFound() when a resource doesn't exist."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
458
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a dynamic page that shows 404 for invalid IDs."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
459
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a product page that triggers notFound() for missing items."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
460
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a blog post page that uses notFound() when the post is not found."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
461
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create an async generateMetadata function for a Next.js page that dynamically generates page metadata."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
462
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write generateMetadata that fetches data to create dynamic titles."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
463
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a generateMetadata function for a blog post page."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
464
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create dynamic metadata generation for a product detail page."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
465
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an async generateMetadata that reads from a database."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
466
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export a static metadata object for a Next.js page with title and description."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
467
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a const metadata export for a landing page."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
468
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write static metadata for the about page."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
469
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export metadata object with openGraph configuration."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
470
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a metadata constant for a contact page."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
471
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a GET route handler in Next.js App Router that returns a JSON response."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
472
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an API route that handles GET requests and returns user data."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
473
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a route.ts GET handler for fetching products."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
474
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a REST API endpoint for GET /api/posts in Next.js."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
475
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a GET route handler that returns data from a database."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
476
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a POST route handler in Next.js App Router that processes request body data."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
477
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an API route that handles form submissions."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
478
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a POST handler for creating new resources."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
479
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a route.ts that processes POST requests with JSON body."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
480
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a POST route handler for user registration."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
481
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a default exported Page component for Next.js App Router."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
482
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a basic page.tsx file for a route."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
483
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a simple page component that displays content."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
484
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create the home page component for Next.js App Router."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
485
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a default Page function component."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
486
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a client component in Next.js that uses the 'use client' directive for client-side interactivity."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
487
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an interactive dropdown menu as a client component."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
488
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a modal component that needs client-side JavaScript."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
489
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a tabs component with 'use client' directive."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
490
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a client component for a search input with state."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
491
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a server component in Next.js without the 'use client' directive."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
492
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a server component that fetches data directly."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
493
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a page component that renders on the server."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
494
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a server-rendered list component."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
495
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a server component that accesses a database."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
496
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a parallel route segment component for Next.js using the @modal naming convention."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
497
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a layout that renders parallel routes with @dashboard slot."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
498
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a parallel route for a modal overlay."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
499
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a layout with @sidebar and @content parallel routes."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
500
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a component for the @analytics parallel slot."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
501
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js layout component that accepts children as a prop with the correct TypeScript types."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
502
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a layout.tsx file for Next.js App Router that wraps child pages."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
503
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a root layout component for Next.js with proper children typing."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
504
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a reusable layout component in Next.js that renders children prop."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
505
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a Next.js App Router layout that correctly types the children prop as React.ReactNode."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
506
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js dynamic route page component that correctly awaits and destructures the params prop."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
507
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page.tsx for a [slug] dynamic route that awaits params before using them."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
508
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a Next.js dynamic segment page that properly handles async params."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
509
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a dynamic route page in Next.js 15 that awaits the params promise."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
510
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page component for /blog/[id] that correctly destructures await params."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
511
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a generateStaticParams function for Next.js that returns an array of slug parameters for static generation."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
512
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a generateStaticParams function to pre-render blog post pages at build time."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
513
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a static params generator for Next.js dynamic routes."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
514
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create generateStaticParams for a /posts/[slug] route in Next.js."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
515
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a function to statically generate pages for all products in Next.js."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
516
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js page component that correctly handles searchParams as a Promise and awaits it before accessing properties."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
517
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page.tsx that properly awaits searchParams to get query string values."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
518
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a search results page in Next.js that correctly handles async searchParams."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
519
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a page component that reads URL query parameters using Next.js 15 searchParams."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
520
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a Next.js page that awaits searchParams to filter products by category."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
521
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a client component in Next.js with the 'use client' directive at the top."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
522
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a client-side interactive button component with 'use client'."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
523
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a form component in Next.js that needs client-side state management."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
524
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a counter component with useState that requires 'use client'."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
525
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a Next.js client component with onClick handlers."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
526
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export metadata for a Next.js page with a title and description."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
527
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a static metadata export for SEO in Next.js."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
528
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write metadata configuration for a blog post page."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
529
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export page metadata with title, description, and openGraph properties."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
530
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create metadata export for a product page in Next.js."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
531
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create an error.tsx boundary component for Next.js that includes an error prop and a reset callback function."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
532
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an error boundary that displays the error message and a retry button."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
533
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build an error.tsx file that catches errors in a route segment."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
534
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js error boundary with proper TypeScript types for error and reset."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
535
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an error handling component that shows a fallback UI and reset option."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
536
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a not-found.tsx component for Next.js that displays a custom 404 page."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
537
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a NotFound component that shows a friendly 404 message."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
538
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a custom 404 page for Next.js App Router."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
539
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a not-found boundary that displays navigation options."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
540
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a not-found.tsx with a link back to the home page."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
541
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a loading.tsx component for Next.js that shows a loading state."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
542
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a loading skeleton for a page in Next.js."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
543
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a loading.tsx with a spinner animation."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
544
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a suspense loading boundary for Next.js App Router."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
545
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a loading component that shows placeholder content."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
546
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a template.tsx component for Next.js that accepts children as a prop and wraps them in a persistent UI element."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
547
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a template component that re-renders on navigation."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
548
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a template.tsx that wraps children with animation."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
549
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js template for route transitions."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
550
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a template component with children prop typed correctly."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
551
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js page that uses the redirect() function to navigate users to another page."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
552
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a server component that redirects unauthenticated users."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
553
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a page that redirects to /login if no session exists."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
554
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a conditional redirect in Next.js based on user role."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
555
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page that uses redirect() to send users to the dashboard."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
556
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js page that uses the notFound() function to trigger a 404 page."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
557
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page that calls notFound() when a resource doesn't exist."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
558
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a dynamic page that shows 404 for invalid IDs."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
559
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a product page that triggers notFound() for missing items."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
560
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a blog post page that uses notFound() when the post is not found."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
561
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create an async generateMetadata function for a Next.js page that dynamically generates page metadata."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
562
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write generateMetadata that fetches data to create dynamic titles."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
563
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a generateMetadata function for a blog post page."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
564
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create dynamic metadata generation for a product detail page."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
565
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an async generateMetadata that reads from a database."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
566
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export a static metadata object for a Next.js page with title and description."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
567
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a const metadata export for a landing page."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
568
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write static metadata for the about page."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
569
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export metadata object with openGraph configuration."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
570
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a metadata constant for a contact page."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
571
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a GET route handler in Next.js App Router that returns a JSON response."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
572
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an API route that handles GET requests and returns user data."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
573
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a route.ts GET handler for fetching products."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
574
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a REST API endpoint for GET /api/posts in Next.js."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
575
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a GET route handler that returns data from a database."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
576
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a POST route handler in Next.js App Router that processes request body data."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
577
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an API route that handles form submissions."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
578
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a POST handler for creating new resources."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
579
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a route.ts that processes POST requests with JSON body."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
580
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a POST route handler for user registration."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
581
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a default exported Page component for Next.js App Router."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
582
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a basic page.tsx file for a route."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
583
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a simple page component that displays content."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
584
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create the home page component for Next.js App Router."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
585
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a default Page function component."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
586
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a client component in Next.js that uses the 'use client' directive for client-side interactivity."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
587
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an interactive dropdown menu as a client component."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
588
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a modal component that needs client-side JavaScript."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
589
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a tabs component with 'use client' directive."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
590
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a client component for a search input with state."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
591
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a server component in Next.js without the 'use client' directive."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
592
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a server component that fetches data directly."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
593
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a page component that renders on the server."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
594
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a server-rendered list component."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
595
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a server component that accesses a database."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
596
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a parallel route segment component for Next.js using the @modal naming convention."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
597
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a layout that renders parallel routes with @dashboard slot."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
598
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a parallel route for a modal overlay."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
599
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a layout with @sidebar and @content parallel routes."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
600
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a component for the @analytics parallel slot."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
601
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js layout component that accepts children as a prop with the correct TypeScript types."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
602
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a layout.tsx file for Next.js App Router that wraps child pages."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
603
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a root layout component for Next.js with proper children typing."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
604
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a reusable layout component in Next.js that renders children prop."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
605
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a Next.js App Router layout that correctly types the children prop as React.ReactNode."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
606
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js dynamic route page component that correctly awaits and destructures the params prop."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
607
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page.tsx for a [slug] dynamic route that awaits params before using them."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
608
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a Next.js dynamic segment page that properly handles async params."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
609
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a dynamic route page in Next.js 15 that awaits the params promise."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
610
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page component for /blog/[id] that correctly destructures await params."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
611
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a generateStaticParams function for Next.js that returns an array of slug parameters for static generation."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
612
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a generateStaticParams function to pre-render blog post pages at build time."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
613
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a static params generator for Next.js dynamic routes."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
614
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create generateStaticParams for a /posts/[slug] route in Next.js."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
615
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a function to statically generate pages for all products in Next.js."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
616
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js page component that correctly handles searchParams as a Promise and awaits it before accessing properties."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
617
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page.tsx that properly awaits searchParams to get query string values."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
618
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a search results page in Next.js that correctly handles async searchParams."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
619
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a page component that reads URL query parameters using Next.js 15 searchParams."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
620
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a Next.js page that awaits searchParams to filter products by category."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
621
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a client component in Next.js with the 'use client' directive at the top."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
622
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a client-side interactive button component with 'use client'."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
623
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a form component in Next.js that needs client-side state management."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
624
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a counter component with useState that requires 'use client'."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
625
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a Next.js client component with onClick handlers."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
626
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export metadata for a Next.js page with a title and description."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
627
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a static metadata export for SEO in Next.js."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
628
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write metadata configuration for a blog post page."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
629
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export page metadata with title, description, and openGraph properties."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
630
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create metadata export for a product page in Next.js."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
631
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create an error.tsx boundary component for Next.js that includes an error prop and a reset callback function."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
632
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an error boundary that displays the error message and a retry button."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
633
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build an error.tsx file that catches errors in a route segment."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
634
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js error boundary with proper TypeScript types for error and reset."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
635
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an error handling component that shows a fallback UI and reset option."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
636
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a not-found.tsx component for Next.js that displays a custom 404 page."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
637
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a NotFound component that shows a friendly 404 message."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
638
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a custom 404 page for Next.js App Router."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
639
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a not-found boundary that displays navigation options."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
640
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a not-found.tsx with a link back to the home page."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
641
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a loading.tsx component for Next.js that shows a loading state."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
642
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a loading skeleton for a page in Next.js."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
643
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a loading.tsx with a spinner animation."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
644
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a suspense loading boundary for Next.js App Router."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
645
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a loading component that shows placeholder content."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
646
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a template.tsx component for Next.js that accepts children as a prop and wraps them in a persistent UI element."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
647
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a template component that re-renders on navigation."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
648
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a template.tsx that wraps children with animation."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
649
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js template for route transitions."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
650
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a template component with children prop typed correctly."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
651
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js page that uses the redirect() function to navigate users to another page."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
652
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a server component that redirects unauthenticated users."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
653
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a page that redirects to /login if no session exists."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
654
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a conditional redirect in Next.js based on user role."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
655
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page that uses redirect() to send users to the dashboard."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
656
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js page that uses the notFound() function to trigger a 404 page."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
657
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page that calls notFound() when a resource doesn't exist."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
658
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a dynamic page that shows 404 for invalid IDs."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
659
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a product page that triggers notFound() for missing items."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
660
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a blog post page that uses notFound() when the post is not found."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
661
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create an async generateMetadata function for a Next.js page that dynamically generates page metadata."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
662
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write generateMetadata that fetches data to create dynamic titles."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
663
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a generateMetadata function for a blog post page."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
664
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create dynamic metadata generation for a product detail page."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
665
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an async generateMetadata that reads from a database."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
666
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export a static metadata object for a Next.js page with title and description."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
667
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a const metadata export for a landing page."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
668
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write static metadata for the about page."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
669
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export metadata object with openGraph configuration."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
670
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a metadata constant for a contact page."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
671
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a GET route handler in Next.js App Router that returns a JSON response."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
672
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an API route that handles GET requests and returns user data."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
673
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a route.ts GET handler for fetching products."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
674
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a REST API endpoint for GET /api/posts in Next.js."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
675
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a GET route handler that returns data from a database."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
676
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a POST route handler in Next.js App Router that processes request body data."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
677
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an API route that handles form submissions."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
678
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a POST handler for creating new resources."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
679
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a route.ts that processes POST requests with JSON body."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
680
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a POST route handler for user registration."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
681
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a default exported Page component for Next.js App Router."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
682
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a basic page.tsx file for a route."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
683
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a simple page component that displays content."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
684
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create the home page component for Next.js App Router."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
685
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a default Page function component."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
686
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a client component in Next.js that uses the 'use client' directive for client-side interactivity."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
687
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an interactive dropdown menu as a client component."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
688
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a modal component that needs client-side JavaScript."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
689
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a tabs component with 'use client' directive."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
690
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a client component for a search input with state."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
691
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a server component in Next.js without the 'use client' directive."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
692
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a server component that fetches data directly."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
693
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a page component that renders on the server."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
694
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a server-rendered list component."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
695
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a server component that accesses a database."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
696
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a parallel route segment component for Next.js using the @modal naming convention."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
697
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a layout that renders parallel routes with @dashboard slot."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
698
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a parallel route for a modal overlay."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
699
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a layout with @sidebar and @content parallel routes."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
700
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a component for the @analytics parallel slot."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
701
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js layout component that accepts children as a prop with the correct TypeScript types."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
702
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a layout.tsx file for Next.js App Router that wraps child pages."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
703
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a root layout component for Next.js with proper children typing."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
704
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a reusable layout component in Next.js that renders children prop."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
705
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a Next.js App Router layout that correctly types the children prop as React.ReactNode."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
706
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js dynamic route page component that correctly awaits and destructures the params prop."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
707
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page.tsx for a [slug] dynamic route that awaits params before using them."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
708
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a Next.js dynamic segment page that properly handles async params."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
709
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a dynamic route page in Next.js 15 that awaits the params promise."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
710
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page component for /blog/[id] that correctly destructures await params."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
711
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a generateStaticParams function for Next.js that returns an array of slug parameters for static generation."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
712
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a generateStaticParams function to pre-render blog post pages at build time."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
713
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a static params generator for Next.js dynamic routes."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
714
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create generateStaticParams for a /posts/[slug] route in Next.js."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
715
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a function to statically generate pages for all products in Next.js."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
716
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js page component that correctly handles searchParams as a Promise and awaits it before accessing properties."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
717
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page.tsx that properly awaits searchParams to get query string values."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
718
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a search results page in Next.js that correctly handles async searchParams."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
719
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a page component that reads URL query parameters using Next.js 15 searchParams."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
720
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a Next.js page that awaits searchParams to filter products by category."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
721
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a client component in Next.js with the 'use client' directive at the top."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
722
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a client-side interactive button component with 'use client'."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
723
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a form component in Next.js that needs client-side state management."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
724
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a counter component with useState that requires 'use client'."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
725
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a Next.js client component with onClick handlers."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
726
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export metadata for a Next.js page with a title and description."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
727
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a static metadata export for SEO in Next.js."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
728
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write metadata configuration for a blog post page."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
729
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export page metadata with title, description, and openGraph properties."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
730
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create metadata export for a product page in Next.js."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
731
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create an error.tsx boundary component for Next.js that includes an error prop and a reset callback function."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
732
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an error boundary that displays the error message and a retry button."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
733
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build an error.tsx file that catches errors in a route segment."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
734
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js error boundary with proper TypeScript types for error and reset."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
735
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an error handling component that shows a fallback UI and reset option."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
736
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a not-found.tsx component for Next.js that displays a custom 404 page."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
737
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a NotFound component that shows a friendly 404 message."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
738
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a custom 404 page for Next.js App Router."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
739
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a not-found boundary that displays navigation options."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
740
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a not-found.tsx with a link back to the home page."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
741
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a loading.tsx component for Next.js that shows a loading state."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
742
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a loading skeleton for a page in Next.js."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
743
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a loading.tsx with a spinner animation."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
744
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a suspense loading boundary for Next.js App Router."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
745
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a loading component that shows placeholder content."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
746
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a template.tsx component for Next.js that accepts children as a prop and wraps them in a persistent UI element."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
747
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a template component that re-renders on navigation."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
748
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a template.tsx that wraps children with animation."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
749
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js template for route transitions."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
750
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a template component with children prop typed correctly."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
751
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js page that uses the redirect() function to navigate users to another page."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
752
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a server component that redirects unauthenticated users."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
753
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a page that redirects to /login if no session exists."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
754
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a conditional redirect in Next.js based on user role."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
755
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page that uses redirect() to send users to the dashboard."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
756
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js page that uses the notFound() function to trigger a 404 page."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
757
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page that calls notFound() when a resource doesn't exist."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
758
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a dynamic page that shows 404 for invalid IDs."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
759
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a product page that triggers notFound() for missing items."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
760
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a blog post page that uses notFound() when the post is not found."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
761
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create an async generateMetadata function for a Next.js page that dynamically generates page metadata."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
762
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write generateMetadata that fetches data to create dynamic titles."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
763
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a generateMetadata function for a blog post page."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
764
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create dynamic metadata generation for a product detail page."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
765
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an async generateMetadata that reads from a database."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
766
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export a static metadata object for a Next.js page with title and description."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
767
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a const metadata export for a landing page."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
768
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write static metadata for the about page."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
769
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export metadata object with openGraph configuration."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
770
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a metadata constant for a contact page."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
771
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a GET route handler in Next.js App Router that returns a JSON response."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
772
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an API route that handles GET requests and returns user data."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
773
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a route.ts GET handler for fetching products."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
774
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a REST API endpoint for GET /api/posts in Next.js."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
775
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a GET route handler that returns data from a database."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
776
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a POST route handler in Next.js App Router that processes request body data."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
777
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an API route that handles form submissions."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
778
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a POST handler for creating new resources."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
779
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a route.ts that processes POST requests with JSON body."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
780
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a POST route handler for user registration."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
781
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a default exported Page component for Next.js App Router."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
782
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a basic page.tsx file for a route."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
783
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a simple page component that displays content."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
784
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create the home page component for Next.js App Router."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
785
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a default Page function component."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
786
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a client component in Next.js that uses the 'use client' directive for client-side interactivity."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
787
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an interactive dropdown menu as a client component."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
788
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a modal component that needs client-side JavaScript."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
789
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a tabs component with 'use client' directive."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
790
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a client component for a search input with state."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
791
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a server component in Next.js without the 'use client' directive."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
792
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a server component that fetches data directly."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
793
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a page component that renders on the server."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
794
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a server-rendered list component."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
795
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a server component that accesses a database."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
796
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a parallel route segment component for Next.js using the @modal naming convention."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
797
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a layout that renders parallel routes with @dashboard slot."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
798
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a parallel route for a modal overlay."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
799
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a layout with @sidebar and @content parallel routes."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
800
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a component for the @analytics parallel slot."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
801
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js layout component that accepts children as a prop with the correct TypeScript types."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
802
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a layout.tsx file for Next.js App Router that wraps child pages."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
803
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a root layout component for Next.js with proper children typing."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
804
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a reusable layout component in Next.js that renders children prop."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
805
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a Next.js App Router layout that correctly types the children prop as React.ReactNode."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
806
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js dynamic route page component that correctly awaits and destructures the params prop."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
807
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page.tsx for a [slug] dynamic route that awaits params before using them."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
808
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a Next.js dynamic segment page that properly handles async params."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
809
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a dynamic route page in Next.js 15 that awaits the params promise."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
810
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page component for /blog/[id] that correctly destructures await params."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
811
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a generateStaticParams function for Next.js that returns an array of slug parameters for static generation."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
812
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a generateStaticParams function to pre-render blog post pages at build time."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
813
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a static params generator for Next.js dynamic routes."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
814
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create generateStaticParams for a /posts/[slug] route in Next.js."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
815
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a function to statically generate pages for all products in Next.js."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
816
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js page component that correctly handles searchParams as a Promise and awaits it before accessing properties."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
817
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page.tsx that properly awaits searchParams to get query string values."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
818
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a search results page in Next.js that correctly handles async searchParams."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
819
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a page component that reads URL query parameters using Next.js 15 searchParams."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
820
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a Next.js page that awaits searchParams to filter products by category."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
821
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a client component in Next.js with the 'use client' directive at the top."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
822
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a client-side interactive button component with 'use client'."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
823
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a form component in Next.js that needs client-side state management."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
824
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a counter component with useState that requires 'use client'."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
825
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a Next.js client component with onClick handlers."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
826
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export metadata for a Next.js page with a title and description."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
827
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a static metadata export for SEO in Next.js."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
828
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write metadata configuration for a blog post page."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
829
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export page metadata with title, description, and openGraph properties."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
830
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create metadata export for a product page in Next.js."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
831
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create an error.tsx boundary component for Next.js that includes an error prop and a reset callback function."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
832
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an error boundary that displays the error message and a retry button."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
833
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build an error.tsx file that catches errors in a route segment."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
834
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js error boundary with proper TypeScript types for error and reset."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
835
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an error handling component that shows a fallback UI and reset option."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
836
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a not-found.tsx component for Next.js that displays a custom 404 page."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
837
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a NotFound component that shows a friendly 404 message."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
838
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a custom 404 page for Next.js App Router."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
839
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a not-found boundary that displays navigation options."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
840
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a not-found.tsx with a link back to the home page."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
841
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a loading.tsx component for Next.js that shows a loading state."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
842
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a loading skeleton for a page in Next.js."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
843
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a loading.tsx with a spinner animation."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
844
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a suspense loading boundary for Next.js App Router."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
845
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a loading component that shows placeholder content."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
846
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a template.tsx component for Next.js that accepts children as a prop and wraps them in a persistent UI element."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
847
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a template component that re-renders on navigation."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
848
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a template.tsx that wraps children with animation."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
849
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js template for route transitions."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
850
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a template component with children prop typed correctly."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
851
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js page that uses the redirect() function to navigate users to another page."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
852
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a server component that redirects unauthenticated users."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
853
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a page that redirects to /login if no session exists."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
854
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a conditional redirect in Next.js based on user role."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
855
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page that uses redirect() to send users to the dashboard."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
856
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js page that uses the notFound() function to trigger a 404 page."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
857
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page that calls notFound() when a resource doesn't exist."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
858
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a dynamic page that shows 404 for invalid IDs."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
859
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a product page that triggers notFound() for missing items."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
860
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a blog post page that uses notFound() when the post is not found."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
861
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create an async generateMetadata function for a Next.js page that dynamically generates page metadata."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
862
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write generateMetadata that fetches data to create dynamic titles."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
863
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a generateMetadata function for a blog post page."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
864
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create dynamic metadata generation for a product detail page."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
865
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an async generateMetadata that reads from a database."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
866
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export a static metadata object for a Next.js page with title and description."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
867
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a const metadata export for a landing page."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
868
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write static metadata for the about page."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
869
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export metadata object with openGraph configuration."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
870
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a metadata constant for a contact page."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
871
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a GET route handler in Next.js App Router that returns a JSON response."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
872
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an API route that handles GET requests and returns user data."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
873
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a route.ts GET handler for fetching products."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
874
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a REST API endpoint for GET /api/posts in Next.js."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
875
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a GET route handler that returns data from a database."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
876
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a POST route handler in Next.js App Router that processes request body data."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
877
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an API route that handles form submissions."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
878
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a POST handler for creating new resources."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
879
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a route.ts that processes POST requests with JSON body."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
880
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a POST route handler for user registration."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
881
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a default exported Page component for Next.js App Router."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
882
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a basic page.tsx file for a route."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
883
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a simple page component that displays content."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
884
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create the home page component for Next.js App Router."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
885
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a default Page function component."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
886
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a client component in Next.js that uses the 'use client' directive for client-side interactivity."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
887
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an interactive dropdown menu as a client component."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
888
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a modal component that needs client-side JavaScript."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
889
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a tabs component with 'use client' directive."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
890
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a client component for a search input with state."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
891
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a server component in Next.js without the 'use client' directive."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
892
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a server component that fetches data directly."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
893
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a page component that renders on the server."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
894
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a server-rendered list component."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
895
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a server component that accesses a database."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
896
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a parallel route segment component for Next.js using the @modal naming convention."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
897
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a layout that renders parallel routes with @dashboard slot."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
898
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a parallel route for a modal overlay."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
899
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a layout with @sidebar and @content parallel routes."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
900
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a component for the @analytics parallel slot."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
901
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js layout component that accepts children as a prop with the correct TypeScript types."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
902
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a layout.tsx file for Next.js App Router that wraps child pages."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
903
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a root layout component for Next.js with proper children typing."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
904
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a reusable layout component in Next.js that renders children prop."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
905
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a Next.js App Router layout that correctly types the children prop as React.ReactNode."}], "rewards": ["code_block", "layout_syntax_1"], "metadata": {"rule": "layout-syntax-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"}}
906
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js dynamic route page component that correctly awaits and destructures the params prop."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
907
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page.tsx for a [slug] dynamic route that awaits params before using them."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
908
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a Next.js dynamic segment page that properly handles async params."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
909
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a dynamic route page in Next.js 15 that awaits the params promise."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
910
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page component for /blog/[id] that correctly destructures await params."}], "rewards": ["code_block", "server_dynamic_segment_1"], "metadata": {"rule": "server-dynamic-segment-1", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
911
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a generateStaticParams function for Next.js that returns an array of slug parameters for static generation."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
912
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a generateStaticParams function to pre-render blog post pages at build time."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
913
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a static params generator for Next.js dynamic routes."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
914
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create generateStaticParams for a /posts/[slug] route in Next.js."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
915
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a function to statically generate pages for all products in Next.js."}], "rewards": ["code_block", "server_dynamic_segment_2"], "metadata": {"rule": "server-dynamic-segment-2", "reference": "https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"}}
916
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js page component that correctly handles searchParams as a Promise and awaits it before accessing properties."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
917
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page.tsx that properly awaits searchParams to get query string values."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
918
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a search results page in Next.js that correctly handles async searchParams."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
919
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a page component that reads URL query parameters using Next.js 15 searchParams."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
920
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a Next.js page that awaits searchParams to filter products by category."}], "rewards": ["code_block", "server_search_params"], "metadata": {"rule": "server-search-params", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/page"}}
921
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a client component in Next.js with the 'use client' directive at the top."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
922
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a client-side interactive button component with 'use client'."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
923
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a form component in Next.js that needs client-side state management."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
924
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a counter component with useState that requires 'use client'."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
925
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a Next.js client component with onClick handlers."}], "rewards": ["code_block", "use_client_directive"], "metadata": {"rule": "use-client-directive", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
926
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export metadata for a Next.js page with a title and description."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
927
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a static metadata export for SEO in Next.js."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
928
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write metadata configuration for a blog post page."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
929
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export page metadata with title, description, and openGraph properties."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
930
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create metadata export for a product page in Next.js."}], "rewards": ["code_block", "metadata_export"], "metadata": {"rule": "metadata-export", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/metadata"}}
931
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create an error.tsx boundary component for Next.js that includes an error prop and a reset callback function."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
932
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an error boundary that displays the error message and a retry button."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
933
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build an error.tsx file that catches errors in a route segment."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
934
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js error boundary with proper TypeScript types for error and reset."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
935
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an error handling component that shows a fallback UI and reset option."}], "rewards": ["code_block", "error_boundary"], "metadata": {"rule": "error-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/error"}}
936
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a not-found.tsx component for Next.js that displays a custom 404 page."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
937
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a NotFound component that shows a friendly 404 message."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
938
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a custom 404 page for Next.js App Router."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
939
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a not-found boundary that displays navigation options."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
940
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a not-found.tsx with a link back to the home page."}], "rewards": ["code_block", "not_found_boundary"], "metadata": {"rule": "not-found-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/not-found"}}
941
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a loading.tsx component for Next.js that shows a loading state."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
942
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a loading skeleton for a page in Next.js."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
943
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a loading.tsx with a spinner animation."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
944
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a suspense loading boundary for Next.js App Router."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
945
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a loading component that shows placeholder content."}], "rewards": ["code_block", "loading_boundary"], "metadata": {"rule": "loading-boundary", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/loading"}}
946
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a template.tsx component for Next.js that accepts children as a prop and wraps them in a persistent UI element."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
947
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a template component that re-renders on navigation."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
948
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a template.tsx that wraps children with animation."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
949
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js template for route transitions."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
950
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a template component with children prop typed correctly."}], "rewards": ["code_block", "template_component"], "metadata": {"rule": "template-component", "reference": "https://nextjs.org/docs/app/api-reference/file-conventions/template"}}
951
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js page that uses the redirect() function to navigate users to another page."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
952
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a server component that redirects unauthenticated users."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
953
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a page that redirects to /login if no session exists."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
954
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a conditional redirect in Next.js based on user role."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
955
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page that uses redirect() to send users to the dashboard."}], "rewards": ["code_block", "redirect_usage"], "metadata": {"rule": "redirect-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/redirect"}}
956
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a Next.js page that uses the notFound() function to trigger a 404 page."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
957
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a page that calls notFound() when a resource doesn't exist."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
958
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a dynamic page that shows 404 for invalid IDs."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
959
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a product page that triggers notFound() for missing items."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
960
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a blog post page that uses notFound() when the post is not found."}], "rewards": ["code_block", "notfound_function_usage"], "metadata": {"rule": "notfound-function-usage", "reference": "https://nextjs.org/docs/app/api-reference/functions/not-found"}}
961
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create an async generateMetadata function for a Next.js page that dynamically generates page metadata."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
962
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write generateMetadata that fetches data to create dynamic titles."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
963
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a generateMetadata function for a blog post page."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
964
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create dynamic metadata generation for a product detail page."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
965
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an async generateMetadata that reads from a database."}], "rewards": ["code_block", "generate_metadata_function"], "metadata": {"rule": "generate-metadata-function", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
966
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export a static metadata object for a Next.js page with title and description."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
967
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a const metadata export for a landing page."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
968
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write static metadata for the about page."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
969
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Export metadata object with openGraph configuration."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
970
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a metadata constant for a contact page."}], "rewards": ["code_block", "generate_metadata_object"], "metadata": {"rule": "generate-metadata-object", "reference": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata"}}
971
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a GET route handler in Next.js App Router that returns a JSON response."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
972
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an API route that handles GET requests and returns user data."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
973
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a route.ts GET handler for fetching products."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
974
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a REST API endpoint for GET /api/posts in Next.js."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
975
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a GET route handler that returns data from a database."}], "rewards": ["code_block", "route_handler_get"], "metadata": {"rule": "route-handler-get", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
976
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a POST route handler in Next.js App Router that processes request body data."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
977
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an API route that handles form submissions."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
978
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a POST handler for creating new resources."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
979
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a route.ts that processes POST requests with JSON body."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
980
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a POST route handler for user registration."}], "rewards": ["code_block", "route_handler_post"], "metadata": {"rule": "route-handler-post", "reference": "https://nextjs.org/docs/app/building-your-application/routing/route-handlers"}}
981
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a default exported Page component for Next.js App Router."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
982
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a basic page.tsx file for a route."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
983
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a simple page component that displays content."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
984
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create the home page component for Next.js App Router."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
985
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a default Page function component."}], "rewards": ["code_block", "default_page_component"], "metadata": {"rule": "default-page-component", "reference": "https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts"}}
986
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a client component in Next.js that uses the 'use client' directive for client-side interactivity."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
987
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write an interactive dropdown menu as a client component."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
988
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a modal component that needs client-side JavaScript."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
989
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a tabs component with 'use client' directive."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
990
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a client component for a search input with state."}], "rewards": ["code_block", "client_component_detection"], "metadata": {"rule": "client-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/client-components"}}
991
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a server component in Next.js without the 'use client' directive."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
992
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a server component that fetches data directly."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
993
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a page component that renders on the server."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
994
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a server-rendered list component."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
995
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a server component that accesses a database."}], "rewards": ["code_block", "server_component_detection"], "metadata": {"rule": "server-component-detection", "reference": "https://nextjs.org/docs/app/building-your-application/rendering/server-components"}}
996
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a parallel route segment component for Next.js using the @modal naming convention."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
997
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a layout that renders parallel routes with @dashboard slot."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
998
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Build a parallel route for a modal overlay."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
999
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Create a layout with @sidebar and @content parallel routes."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}
1000
+ {"messages": [{"role": "system", "content": "You are a Next.js expert. Generate correct TypeScript/TSX code that follows Next.js App Router best practices. Always wrap your code in markdown code blocks using ```typescript or ```tsx."}, {"role": "user", "content": "Write a component for the @analytics parallel slot."}], "rewards": ["code_block", "parallel_route_segment"], "metadata": {"rule": "parallel-route-segment", "reference": "https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"}}