Skip to content
Source
Sign inSign up
TanStack/devtools
Open History to see the last commit

index.tsx

124 lines4.6 KB

1import { createFileRoute } from '@tanstack/react-router'
2import {
3 Zap,
4 Server,
5 Route as RouteIcon,
6 Shield,
7 Waves,
8 Sparkles,
9} from 'lucide-react'
10import { emitRouteNavigation } from '../devtools'
11​
12export const Route = createFileRoute('/')({
13 component: App,
14 loader: () => {
15 emitRouteNavigation('Home', '/')
16 },
17})
18​
19function App() {
20 const features = [
21 {
22 icon: <Zap className="w-12 h-12 text-cyan-400" />,
23 title: 'Powerful Server Functions',
24 description:
25 'Write server-side code that seamlessly integrates with your client components. Type-safe, secure, and simple.',
26 },
27 {
28 icon: <Server className="w-12 h-12 text-cyan-400" />,
29 title: 'Flexible Server Side Rendering',
30 description:
31 'Full-document SSR, streaming, and progressive enhancement out of the box. Control exactly what renders where.',
32 },
33 {
34 icon: <RouteIcon className="w-12 h-12 text-cyan-400" />,
35 title: 'API Routes',
36 description:
37 'Build type-safe API endpoints alongside your application. No separate backend needed.',
38 },
39 {
40 icon: <Shield className="w-12 h-12 text-cyan-400" />,
41 title: 'Strongly Typed Everything',
42 description:
43 'End-to-end type safety from server to client. Catch errors before they reach production.',
44 },
45 {
46 icon: <Waves className="w-12 h-12 text-cyan-400" />,
47 title: 'Full Streaming Support',
48 description:
49 'Stream data from server to client progressively. Perfect for AI applications and real-time updates.',
50 },
51 {
52 icon: <Sparkles className="w-12 h-12 text-cyan-400" />,
53 title: 'Next Generation Ready',
54 description:
55 'Built from the ground up for modern web applications. Deploy anywhere JavaScript runs.',
56 },
57 ]
58​
59 return (
60 <div className="min-h-screen bg-gradient-to-b from-slate-900 via-slate-800 to-slate-900">
61 <section className="relative py-20 px-6 text-center overflow-hidden">
62 <div className="absolute inset-0 bg-gradient-to-r from-cyan-500/10 via-blue-500/10 to-purple-500/10"></div>
63 <div className="relative max-w-5xl mx-auto">
64 <div className="flex items-center justify-center gap-6 mb-6">
65 <img
66 src="/tanstack-circle-logo.png"
67 alt="TanStack Logo"
68 className="w-24 h-24 md:w-32 md:h-32"
69 />
70 <h1 className="text-6xl md:text-7xl font-black text-white [letter-spacing:-0.08em]">
71 <span className="text-gray-300">TANSTACK</span>{' '}
72 <span className="bg-gradient-to-r from-cyan-400 to-blue-400 bg-clip-text text-transparent">
73 START
74 </span>
75 </h1>
76 </div>
77 <p className="text-2xl md:text-3xl text-gray-300 mb-4 font-light">
78 The framework for next generation AI applications
79 </p>
80 <p className="text-lg text-gray-400 max-w-3xl mx-auto mb-8">
81 Full-stack framework powered by TanStack Router for React and Solid.
82 Build modern applications with server functions, streaming, and type
83 safety.
84 </p>
85 <div className="flex flex-col items-center gap-4">
86 <a
87 href="https://tanstack.com/start"
88 target="_blank"
89 rel="noopener noreferrer"
90 className="px-8 py-3 bg-cyan-500 hover:bg-cyan-600 text-white font-semibold rounded-lg transition-colors shadow-lg shadow-cyan-500/50"
91 >
92 Documentation
93 </a>
94 <p className="text-gray-400 text-sm mt-2">
95 Begin your TanStack Start journey by editing{' '}
96 <code className="px-2 py-1 bg-slate-700 rounded text-cyan-400">
97 /src/routes/index.tsx
98 </code>
99 </p>
100 </div>
101 </div>
102 </section>
103​
104 <section className="py-16 px-6 max-w-7xl mx-auto">
105 <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
106 {features.map((feature, index) => (
107 <div
108 key={index}
109 className="bg-slate-800/50 backdrop-blur-sm border border-slate-700 rounded-xl p-6 hover:border-cyan-500/50 transition-all duration-300 hover:shadow-lg hover:shadow-cyan-500/10"
110 >
111 <div className="mb-4">{feature.icon}</div>
112 <h3 className="text-xl font-semibold text-white mb-3">
113 {feature.title}
114 </h3>
115 <p className="text-gray-400 leading-relaxed">
116 {feature.description}
117 </p>
118 </div>
119 ))}
120 </div>
121 </section>
122 </div>
123 )