|
| 1 | +import Link from 'next/link' |
| 2 | + |
| 3 | +export default function Home() { |
| 4 | + return ( |
| 5 | + <main className="min-h-screen"> |
| 6 | + <section className="py-24 px-4 border-b border-gray-200 dark:border-gray-800"> |
| 7 | + <div className="max-w-4xl mx-auto text-center"> |
| 8 | + <h1 className="text-5xl md:text-6xl font-bold tracking-tight text-black dark:text-white mb-6"> |
| 9 | + Flux |
| 10 | + </h1> |
| 11 | + <p className="text-xl text-gray-600 dark:text-gray-400 mb-10 max-w-2xl mx-auto"> |
| 12 | + Real-time event infrastructure for modern applications. Send, receive, and react to events across your entire stack with a simple API. |
| 13 | + </p> |
| 14 | + <div className="flex flex-col sm:flex-row gap-4 justify-center"> |
| 15 | + <Link |
| 16 | + href="/docs" |
| 17 | + className="inline-flex items-center justify-center bg-black dark:bg-white text-white dark:text-black px-8 py-3 rounded-lg font-medium hover:bg-gray-800 dark:hover:bg-gray-200 transition-colors" |
| 18 | + > |
| 19 | + Read Documentation → |
| 20 | + </Link> |
| 21 | + <a |
| 22 | + href="https://github.com" |
| 23 | + className="inline-flex items-center justify-center border border-gray-300 dark:border-gray-700 text-gray-900 dark:text-gray-100 px-8 py-3 rounded-lg font-medium hover:bg-gray-50 dark:hover:bg-gray-900 transition-colors" |
| 24 | + > |
| 25 | + View on GitHub |
| 26 | + </a> |
| 27 | + </div> |
| 28 | + </div> |
| 29 | + </section> |
| 30 | + |
| 31 | + <section className="py-20 px-4"> |
| 32 | + <div className="max-w-6xl mx-auto"> |
| 33 | + <div className="text-center mb-16"> |
| 34 | + <h2 className="text-3xl font-bold text-black dark:text-white mb-4"> |
| 35 | + Why Flux |
| 36 | + </h2> |
| 37 | + <p className="text-gray-600 dark:text-gray-400 max-w-xl mx-auto"> |
| 38 | + Purpose-built for event-driven applications at any scale. |
| 39 | + </p> |
| 40 | + </div> |
| 41 | + |
| 42 | + <div className="grid md:grid-cols-2 lg:grid-cols-4 gap-6"> |
| 43 | + <div className="border border-gray-200 dark:border-gray-800 rounded-xl p-6"> |
| 44 | + <h3 className="text-lg font-semibold text-black dark:text-white mb-2">Simple Integration</h3> |
| 45 | + <p className="text-gray-600 dark:text-gray-400 text-sm"> |
| 46 | + Drop-in SDKs for Node.js, Python, Go, and more. Start sending events in minutes. |
| 47 | + </p> |
| 48 | + </div> |
| 49 | + |
| 50 | + <div className="border border-gray-200 dark:border-gray-800 rounded-xl p-6"> |
| 51 | + <h3 className="text-lg font-semibold text-black dark:text-white mb-2">Guaranteed Delivery</h3> |
| 52 | + <p className="text-gray-600 dark:text-gray-400 text-sm"> |
| 53 | + Events are persisted and retried automatically. Never lose critical data. |
| 54 | + </p> |
| 55 | + </div> |
| 56 | + |
| 57 | + <div className="border border-gray-200 dark:border-gray-800 rounded-xl p-6"> |
| 58 | + <h3 className="text-lg font-semibold text-black dark:text-white mb-2">Real-time Webhooks</h3> |
| 59 | + <p className="text-gray-600 dark:text-gray-400 text-sm"> |
| 60 | + Receive events instantly via webhooks with automatic signature verification. |
| 61 | + </p> |
| 62 | + </div> |
| 63 | + |
| 64 | + <div className="border border-gray-200 dark:border-gray-800 rounded-xl p-6"> |
| 65 | + <h3 className="text-lg font-semibold text-black dark:text-white mb-2">Full Observability</h3> |
| 66 | + <p className="text-gray-600 dark:text-gray-400 text-sm"> |
| 67 | + Debug issues fast with event logs, traces, and delivery analytics. |
| 68 | + </p> |
| 69 | + </div> |
| 70 | + </div> |
| 71 | + </div> |
| 72 | + </section> |
| 73 | + |
| 74 | + <section className="py-16 px-4 border-t border-gray-200 dark:border-gray-800"> |
| 75 | + <div className="max-w-4xl mx-auto"> |
| 76 | + <h3 className="text-2xl font-bold text-black dark:text-white mb-6 text-center"> |
| 77 | + Quick example |
| 78 | + </h3> |
| 79 | + <p className="text-gray-600 dark:text-gray-400 mb-4 text-center"> |
| 80 | + Send your first event in minutes |
| 81 | + </p> |
| 82 | + <div className="bg-gray-950 rounded-xl p-6 overflow-x-auto"> |
| 83 | + <pre className="text-sm text-gray-300 font-mono"> |
| 84 | +{`import Flux from '@flux/node'; |
| 85 | +
|
| 86 | +const flux = new Flux('sk_live_...'); |
| 87 | +
|
| 88 | +await flux.events.send({ |
| 89 | + type: 'user.signup', |
| 90 | + data: { |
| 91 | + userId: 'usr_123', |
| 92 | + email: 'jane@example.com', |
| 93 | + plan: 'pro' |
| 94 | + } |
| 95 | +});`} |
| 96 | + </pre> |
| 97 | + </div> |
| 98 | + </div> |
| 99 | + </section> |
| 100 | + </main> |
| 101 | + ) |
| 102 | +} |
| 103 | + |
0 commit comments