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

Home.tsx

187 lines7.5 KB

1"use client";
2​
3import Logo from "../../logo.svg?url";
4​
5export const Home = () => {
6 const features = [
7 {
8 icon: "⚛️",
9 title: "React Server Components",
10 description:
11 "Build with the latest React architecture. Stream HTML, reduce bundle sizes, and create lightning-fast experiences with true server-side rendering.",
12 },
13 {
14 icon: "☁️",
15 title: "Cloudflare-Native",
16 description:
17 "Deploy globally in seconds on Cloudflare Workers. Access D1 (SQL), R2 (Storage), KV, Durable Objects, Queues, and AI—all with zero config.",
18 },
19 {
20 icon: "🔄",
21 title: "Real-time by Default",
22 description:
23 "WebSockets, Server-Sent Events, and Cloudflare Durable Objects make real-time features effortless. Build chat, notifications, and live updates with ease.",
24 },
25 {
26 icon: "🎨",
27 title: "Modern DX",
28 description:
29 "Full TypeScript support, Vite-powered dev server, Tailwind CSS, and hot module replacement. The modern stack you love, with no configuration headaches.",
30 },
31 {
32 icon: "🚀",
33 title: "Server Functions",
34 description:
35 "Write backend logic alongside your components. Type-safe, co-located, and automatically bundled—no API routes needed.",
36 },
37 {
38 icon: "⚡",
39 title: "Edge Performance",
40 description:
41 "Sub-50ms response times worldwide. Your app runs on Cloudflare's global network, putting your code closer to every user.",
42 },
43 ];
44​
45 return (
46 <div className="min-h-screen bg-gradient-to-br from-gray-950 via-gray-900 to-gray-950 text-gray-100">
47 {/* Hero Section */}
48 <div className="relative overflow-hidden">
49 <div className="absolute inset-0 bg-[radial-gradient(ellipse_at_top,_var(--tw-gradient-stops))] from-red-900/20 via-transparent to-transparent"></div>
50​
51 <div className="relative max-w-7xl mx-auto px-6 py-16 sm:py-24">
52 {/* Logo */}
53 <div className="flex justify-center mb-8">
54 <img src={Logo} alt="RedwoodSDK" className="h-16 w-auto" />
55 </div>
56​
57 {/* Hero Content */}
58 <div className="text-center mb-16">
59 <h1 className="text-5xl sm:text-6xl lg:text-7xl font-bold mb-6 bg-gradient-to-r from-red-500 via-orange-400 to-red-500 bg-clip-text text-transparent">
60 Build Personal Software
61 <br />
62 Without Limits
63 </h1>
64 <p className="text-xl sm:text-2xl text-gray-400 max-w-3xl mx-auto mb-8">
65 RedwoodSDK empowers you to create full-stack applications with
66 React Server Components, deployed globally on Cloudflare's edge
67 network.
68 </p>
69 <div className="flex flex-col sm:flex-row gap-4 justify-center items-center">
70 <a
71 href="https://docs.rwsdk.com/getting-started/quick-start/"
72 target="_blank"
73 rel="noreferrer"
74 className="px-8 py-4 bg-gradient-to-r from-red-600 to-orange-600 hover:from-red-700 hover:to-orange-700 text-white font-semibold rounded-lg transition-all transform hover:scale-105 shadow-lg shadow-red-900/50"
75 >
76 Get Started →
77 </a>
78 <a
79 href="https://docs.rwsdk.com/"
80 target="_blank"
81 rel="noreferrer"
82 className="px-8 py-4 bg-gray-800 hover:bg-gray-700 text-white font-semibold rounded-lg border border-gray-700 transition-all"
83 >
84 Read the Docs
85 </a>
86 </div>
87 </div>
88​
89 {/* Stats */}
90 <div className="grid grid-cols-1 sm:grid-cols-3 gap-8 mb-16 max-w-3xl mx-auto">
91 <div className="text-center">
92 <div className="text-4xl font-bold text-red-500 mb-2">
93 &lt;50ms
94 </div>
95 <div className="text-gray-400">Response Times</div>
96 </div>
97 <div className="text-center">
98 <div className="text-4xl font-bold text-orange-500 mb-2">
99 300+
100 </div>
101 <div className="text-gray-400">Edge Locations</div>
102 </div>
103 <div className="text-center">
104 <div className="text-4xl font-bold text-red-500 mb-2">Zero</div>
105 <div className="text-gray-400">Configuration</div>
106 </div>
107 </div>
108 </div>
109 </div>
110​
111 {/* Features Grid */}
112 <div className="max-w-7xl mx-auto px-6 py-16">
113 <h2 className="text-3xl sm:text-4xl font-bold text-center mb-12">
114 Everything You Need to Build Modern Apps
115 </h2>
116 <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
117 {features.map((feature, index) => (
118 <div
119 key={index}
120 className="p-6 bg-gray-800/50 rounded-xl border border-gray-700 hover:border-red-500/50 transition-all hover:shadow-lg hover:shadow-red-900/20 group"
121 >
122 <div className="text-4xl mb-4 group-hover:scale-110 transition-transform">
123 {feature.icon}
124 </div>
125 <h3 className="text-xl font-semibold mb-3 text-white">
126 {feature.title}
127 </h3>
128 <p className="text-gray-400 leading-relaxed">
129 {feature.description}
130 </p>
131 </div>
132 ))}
133 </div>
134 </div>
135​
136 {/* Cloudflare Bindings Section */}
137 <div className="bg-gradient-to-r from-gray-900 via-gray-800 to-gray-900 py-16">
138 <div className="max-w-7xl mx-auto px-6">
139 <h2 className="text-3xl sm:text-4xl font-bold text-center mb-12">
140 Full Cloudflare Platform Access
141 </h2>
142 <div className="grid grid-cols-2 md:grid-cols-4 gap-6">
143 {[
144 { name: "D1", desc: "SQL Database" },
145 { name: "R2", desc: "Object Storage" },
146 { name: "KV", desc: "Key-Value Store" },
147 { name: "Queues", desc: "Message Queues" },
148 { name: "Durable Objects", desc: "Stateful Instances" },
149 { name: "Workers AI", desc: "AI Inference" },
150 { name: "Vectorize", desc: "Vector Database" },
151 { name: "Hyperdrive", desc: "Database Pooling" },
152 ].map((binding, index) => (
153 <div
154 key={index}
155 className="p-4 bg-gray-800 rounded-lg border border-gray-700 text-center hover:border-orange-500/50 transition-all"
156 >
157 <div className="font-mono font-bold text-orange-400 mb-1">
158 {binding.name}
159 </div>
160 <div className="text-sm text-gray-400">{binding.desc}</div>
161 </div>
162 ))}
163 </div>
164 </div>
165 </div>
166​
167 {/* CTA Section */}
168 <div className="max-w-4xl mx-auto px-6 py-16 text-center">
169 <h2 className="text-3xl sm:text-4xl font-bold mb-6">
170 Ready to Build Something Amazing?
171 </h2>
172 <p className="text-xl text-gray-400 mb-8">
173 Join developers building the next generation of personal software with
174 RedwoodSDK.
175 </p>
176 <div className="bg-gray-900 rounded-lg p-6 border border-gray-800">
177 <div className="font-mono text-left">
178 <span className="text-green-400">$</span>
179 <span className="text-gray-100 ml-2">
180 npx create-rwsdk-app my-app
181 </span>
182 </div>
183 </div>
184 </div>
185 </div>
186 );
187};