|
| 1 | +export default function Home() { |
| 2 | + return ( |
| 3 | + <div |
| 4 | + style={{ |
| 5 | + minHeight: "100vh", |
| 6 | + display: "flex", |
| 7 | + flexDirection: "column", |
| 8 | + alignItems: "center", |
| 9 | + justifyContent: "center", |
| 10 | + fontFamily: "system-ui, -apple-system, sans-serif", |
| 11 | + background: "linear-gradient(135deg, #0f172a 0%, #1e293b 100%)", |
| 12 | + color: "#f8fafc", |
| 13 | + padding: "2rem", |
| 14 | + }} |
| 15 | + > |
| 16 | + <div style={{ maxWidth: "720px", textAlign: "center" }}> |
| 17 | + <h1 |
| 18 | + style={{ |
| 19 | + fontSize: "3rem", |
| 20 | + fontWeight: 800, |
| 21 | + marginBottom: "1rem", |
| 22 | + background: "linear-gradient(to right, #60a5fa, #a78bfa)", |
| 23 | + WebkitBackgroundClip: "text", |
| 24 | + WebkitTextFillColor: "transparent", |
| 25 | + }} |
| 26 | + > |
| 27 | + trpc-studio |
| 28 | + </h1> |
| 29 | + |
| 30 | + <p style={{ fontSize: "1.25rem", color: "#94a3b8", marginBottom: "2rem", lineHeight: 1.6 }}> |
| 31 | + A Swagger-like developer UI for tRPC APIs with auto-generated input forms, real-time |
| 32 | + execution, and output type visualization via the TypeScript Compiler API. |
| 33 | + </p> |
| 34 | + |
| 35 | + <div style={{ display: "flex", gap: "1rem", justifyContent: "center", flexWrap: "wrap" }}> |
| 36 | + <a |
| 37 | + href="/demo" |
| 38 | + style={{ |
| 39 | + padding: "0.75rem 2rem", |
| 40 | + background: "#3b82f6", |
| 41 | + color: "#fff", |
| 42 | + borderRadius: "0.5rem", |
| 43 | + textDecoration: "none", |
| 44 | + fontWeight: 600, |
| 45 | + fontSize: "1rem", |
| 46 | + }} |
| 47 | + > |
| 48 | + Live Demo |
| 49 | + </a> |
| 50 | + <a |
| 51 | + href="https://github.com/sayefdeen/trpc-studio" |
| 52 | + style={{ |
| 53 | + padding: "0.75rem 2rem", |
| 54 | + background: "transparent", |
| 55 | + color: "#e2e8f0", |
| 56 | + borderRadius: "0.5rem", |
| 57 | + textDecoration: "none", |
| 58 | + fontWeight: 600, |
| 59 | + fontSize: "1rem", |
| 60 | + border: "1px solid #475569", |
| 61 | + }} |
| 62 | + > |
| 63 | + GitHub |
| 64 | + </a> |
| 65 | + <a |
| 66 | + href="https://www.npmjs.com/package/@srawad/trpc-studio" |
| 67 | + style={{ |
| 68 | + padding: "0.75rem 2rem", |
| 69 | + background: "transparent", |
| 70 | + color: "#e2e8f0", |
| 71 | + borderRadius: "0.5rem", |
| 72 | + textDecoration: "none", |
| 73 | + fontWeight: 600, |
| 74 | + fontSize: "1rem", |
| 75 | + border: "1px solid #475569", |
| 76 | + }} |
| 77 | + > |
| 78 | + npm |
| 79 | + </a> |
| 80 | + </div> |
| 81 | + |
| 82 | + <div |
| 83 | + style={{ |
| 84 | + marginTop: "3rem", |
| 85 | + background: "#1e293b", |
| 86 | + border: "1px solid #334155", |
| 87 | + borderRadius: "0.5rem", |
| 88 | + padding: "1rem 1.5rem", |
| 89 | + textAlign: "left", |
| 90 | + }} |
| 91 | + > |
| 92 | + <code style={{ color: "#94a3b8", fontSize: "0.875rem" }}> |
| 93 | + <span style={{ color: "#64748b" }}>$</span>{" "} |
| 94 | + <span style={{ color: "#f8fafc" }}>npm install -D @srawad/trpc-studio</span> |
| 95 | + </code> |
| 96 | + </div> |
| 97 | + |
| 98 | + <div |
| 99 | + style={{ |
| 100 | + marginTop: "3rem", |
| 101 | + display: "grid", |
| 102 | + gridTemplateColumns: "repeat(auto-fit, minmax(200px, 1fr))", |
| 103 | + gap: "1.5rem", |
| 104 | + textAlign: "left", |
| 105 | + }} |
| 106 | + > |
| 107 | + {[ |
| 108 | + { |
| 109 | + title: "Auto Input Forms", |
| 110 | + desc: "Generated from Zod schemas — string, number, boolean, enum, object, array", |
| 111 | + }, |
| 112 | + { |
| 113 | + title: "Try It Out", |
| 114 | + desc: "Execute real tRPC calls from the browser with response display and timing", |
| 115 | + }, |
| 116 | + { |
| 117 | + title: "Output Types", |
| 118 | + desc: "Extract response types at build time using the TypeScript Compiler API", |
| 119 | + }, |
| 120 | + { |
| 121 | + title: "Self-Contained", |
| 122 | + desc: "Served as a single HTML response — no static file hosting needed", |
| 123 | + }, |
| 124 | + ].map((feature) => ( |
| 125 | + <div |
| 126 | + key={feature.title} |
| 127 | + style={{ |
| 128 | + background: "#1e293b", |
| 129 | + border: "1px solid #334155", |
| 130 | + borderRadius: "0.5rem", |
| 131 | + padding: "1.25rem", |
| 132 | + }} |
| 133 | + > |
| 134 | + <h3 style={{ fontSize: "1rem", fontWeight: 600, marginBottom: "0.5rem" }}> |
| 135 | + {feature.title} |
| 136 | + </h3> |
| 137 | + <p style={{ fontSize: "0.875rem", color: "#94a3b8", lineHeight: 1.5, margin: 0 }}> |
| 138 | + {feature.desc} |
| 139 | + </p> |
| 140 | + </div> |
| 141 | + ))} |
| 142 | + </div> |
| 143 | + </div> |
| 144 | + </div> |
| 145 | + ); |
| 146 | +} |
0 commit comments