| 1 | /* Hallmark · genre: modern-minimal · macrostructure: Split Studio · theme: app tokens (globals.css, theme-picker aware) |
| 2 | * enrichment: none (proof panels drawn from the app's own UI) · nav: N5 floating pill · footer: Ft5 statement |
| 3 | * pre-emit critique: P5 H4 E4 S5 R5 V4 |
| 4 | */ |
| 5 | import Link from "next/link |
| 6 | import { redirect } |
| 7 | import type { ReactNode |
| 8 | import { BadgeCheck, Ghost |
| 9 | |
| 10 | import { ThemePicker } |
| 11 | import { Button } |
| 12 | |
| 13 | import { getServerSession } |
| 14 | import { API_URL, DOCS_URL |
| 15 | |
| 16 | const REMOTE = ` |
| 17 | |
| 18 | /** Every section sits on this grid, so each right-hand column starts on the same line. */ |
| 19 | const COLUMNS = |
| 20 | "grid items-start gap-8 lg:grid-cols-[minmax(0,5fr)_minmax(0,7fr)] lg:gap-16"; |
| 21 | |
| 22 | const ALSO = [ |
| 23 | "Issues with labels and assignees", |
| 24 | "Link issues and PRs with #123", |
| 25 | "Tags and releases", |
| 26 | "Forks and stars", |
| 27 | "READMEs in every folder", |
| 28 | "Highlighting for 300+ languages", |
| 29 | "Language breakdown per repository", |
| 30 | "Contribution graph on profiles", |
| 31 | "Notifications for your threads", |
| 32 | "Access tokens for scripts and CI", |
| 33 | "SSH and GPG keys per account", |
| 34 | "Light, dark and custom themes", |
| 35 | ]; |
| 36 | |
| 37 | const FAQ = [ |
| 38 | { |
| 39 | question: "Will my team need to learn anything?", |
| 40 | answer: |
| 41 | "No. It is plain git over HTTP or SSH, and pull requests, reviews and issues work the way they do everywhere else. Change the remote and keep working.", |
| 42 | }, |
| 43 | { |
| 44 | question: "What if the server dies?", |
| 45 | answer: |
| 46 | "Start another one. Every push is saved to your storage bucket first, so nothing lives only on the disk you lost.", |
| 47 | }, |
| 48 | { |
| 49 | question: "Who can see our code?", |
| 50 | answer: |
| 51 | "Only the people you let in. Private repositories are invisible to everyone else, in the browser and over git alike.", |
| 52 | }, |
| 53 | { |
| 54 | question: "What does it take to run?", |
| 55 | answer: |
| 56 | "The Ghost API and web app, a PostgreSQL database and any S3-compatible bucket. The docs walk through the setup.", |
| 57 | }, |
| 58 | { |
| 59 | question: "Anything missing?", |
| 60 | answer: |
| 61 | "Git LFS is not supported yet, and webhooks are being built now. Files over a megabyte still download in full; they just skip the browser preview.", |
| 62 | }, |
| 63 | ]; |
| 64 | |
| 65 | export default async function |
| 66 | const session = |
| 67 | if (session) redirect |
| 68 | |
| 69 | return ( |
| 70 | <div className="flex min-h-full flex-col overflow-x-clip |
| 71 | <nav |
| 72 | aria-label="Primary" |
| 73 | className="fixed top-3 left-1/2 z-40 flex -translate-x-1/2 items-center gap-1 rounded-full border bg-background/80 py-1 pr-1 pl-4 shadow-[0_8px_24px_-12px_oklch(0_0_0/0.25)] backdrop-blur" |
| 74 | > |
| 75 | <span className="mr-2 flex items-center gap-2 font-semibold tracking-tight |
| 76 | <Ghost className=" |
| 77 | Ghost |
| 78 | </span> |
| 79 | <Button |
| 80 | asChild |
| 81 | variant="ghost" |
| 82 | size="sm" |
| 83 | className="hidden rounded-full sm:inline-flex" |
| 84 | > |
| 85 | <a href={DOCS_URL |
| 86 | </Button> |
| 87 | <ThemePicker /> |
| 88 | <Button |
| 89 | asChild |
| 90 | variant="ghost" |
| 91 | size="sm" |
| 92 | className="hidden rounded-full sm:inline-flex" |
| 93 | > |
| 94 | <Link href=" |
| 95 | </Button> |
| 96 | <Button asChild size |
| 97 | <Link href=" |
| 98 | </Button> |
| 99 | </nav> |
| 100 | |
| 101 | <main className="mx-auto flex w-full max-w-6xl flex-1 flex-col gap-24 px-4 pt-32 pb-24 md:px-8 md:pt-44 |
| 102 | <section className="flex flex-col gap-12 |
| 103 | <h1 className="max-w-4xl text-5xl font-semibold tracking-[-0.04em] text-balance [overflow-wrap:anywhere] sm:text-6xl lg:text-7xl |
| 104 | Stop renting a home for your code. |
| 105 | </h1> |
| 106 | <div className={COLUMNS |
| 107 | <div className="flex min-w-0 flex-col gap-8 |
| 108 | <p className="max-w-md text-lg text-pretty text-muted-foreground |
| 109 | Ghost does what your team uses GitHub for every day: pull |
| 110 | requests, reviews, issues and code search, on a server you run. |
| 111 | The price, the rules and who reads your code stay your call. |
| 112 | </p> |
| 113 | <div className="flex flex-wrap gap-3 |
| 114 | <Button asChild size |
| 115 | <Link href=" |
| 116 | </Button> |
| 117 | <Button |
| 118 | asChild |
| 119 | size="lg" |
| 120 | variant="outline" |
| 121 | className="h-11 rounded-full px-5" |
| 122 | > |
| 123 | <Link href=" |
| 124 | </Button> |
| 125 | </div> |
| 126 | </div> |
| 127 | |
| 128 | <Panel> |
| 129 | <PanelHead>Moving a repository over</PanelHead |
| 130 | {/* wraps instead of scrolling: the remote URL is as long as the instance's hostname */ |
| 131 | <pre className="p-4 font-mono text-[13px] leading-relaxed whitespace-pre-wrap [overflow-wrap:anywhere] |
| 132 | <code> |
| 133 | <Prompt /> |
| 134 | git remote add ghost {REMOTE} |
| 135 | {"\n"} |
| 136 | <Prompt /> |
| 137 | git push ghost --all |
| 138 | {"\n"} |
| 139 | <span className="text-muted-foreground |
| 140 | {" * [new branch] main -> main\n"} |
| 141 | {" * [new branch] release -> release"} |
| 142 | </span> |
| 143 | </code> |
| 144 | </pre> |
| 145 | </Panel> |
| 146 | </div> |
| 147 | </section> |
| 148 | |
| 149 | <Split |
| 150 | title="Your team won’ |
| 151 | body="Open a pull request, review the diff line by line, squash and merge. It is the workflow everyone already knows, so switching takes an afternoon, not a quarter." |
| 152 | facts={[ |
| 153 | "Stock git over HTTP or SSH", |
| 154 | "Merge, squash or rebase", |
| 155 | "Issues, labels, releases and forks", |
| 156 | ]} |
| 157 | > |
| 158 | <ReviewProof /> |
| 159 | </Split> |
| 160 | |
| 161 | <Split |
| 162 | title="A dead server costs you an hour, not your history." |
| 163 | body="Every push is saved to your own storage bucket before Ghost says it is done. If the machine dies, start a new one and every commit and branch comes back with it." |
| 164 | facts={[ |
| 165 | "Any S3-compatible storage", |
| 166 | "Nothing lives only on the disk", |
| 167 | "Switch machines with a restart", |
| 168 | ]} |
| 169 | > |
| 170 | <DurabilityProof /> |
| 171 | </Split> |
| 172 | |
| 173 | <Split |
| 174 | title="Stop asking where that code lives." |
| 175 | body="Search every repository you can read at once. New code is searchable the moment it is pushed, so the answer is never buried in a chat thread." |
| 176 | facts={[ |
| 177 | "Across every repository, or just one", |
| 178 | "Updated on every push", |
| 179 | "Private code stays out of other people’s results", |
| 180 | ]} |
| 181 | > |
| 182 | <SearchProof /> |
| 183 | </Split> |
| 184 | |
| 185 | <Split |
| 186 | title="Give access without giving away the keys." |
| 187 | body="Group people into organizations and teams, then give each exactly the access they need. A contractor sees one repository. Everyone outside sees nothing." |
| 188 | facts={[ |
| 189 | "Read, triage, write, maintain or admin", |
| 190 | "Outside collaborators, per repository", |
| 191 | "Invitations expire after 7 days", |
| 192 | ]} |
| 193 | > |
| 194 | <RolesProof /> |
| 195 | </Split> |
| 196 | |
| 197 | <Split |
| 198 | title="Know which commits are really yours." |
| 199 | body="Sign commits with your GPG key and Ghost marks them Verified. A signature from a key that isn’t on your account shows as Unverified, where everyone can see it." |
| 200 | facts={[ |
| 201 | "Checked against keys you uploaded", |
| 202 | "Remove a key and its commits stop verifying", |
| 203 | "Push with SSH keys, no passwords", |
| 204 | ]} |
| 205 | > |
| 206 | <SignatureProof /> |
| 207 | </Split> |
| 208 | |
| 209 | <section className={` |
| 210 | <SectionTitle>Plus the things you reach for daily.</SectionTitle |
| 211 | {/* -mt-3 cancels the first row's padding so its text lines up with the heading */ |
| 212 | <ul className="-mt-3 grid gap-x-8 sm:grid-cols-2 |
| 213 | {ALSO.map(( |
| 214 | <li |
| 215 | key={item} |
| 216 | className="border-b py-3 text-sm text-pretty text-muted-foreground" |
| 217 | > |
| 218 | {item} |
| 219 | </li> |
| 220 | ))} |
| 221 | </ul> |
| 222 | </section> |
| 223 | |
| 224 | <section className={` |
| 225 | <SectionTitle>Before you switch.</SectionTitle |
| 226 | <dl className="flex flex-col |
| 227 | {FAQ.map(( |
| 228 | <div |
| 229 | key={question} |
| 230 | className="flex flex-col gap-2 border-b py-5 first:pt-0 last:border-0 last:pb-0" |
| 231 | > |
| 232 | <dt className="font-medium |
| 233 | <dd className="max-w-xl text-sm text-pretty text-muted-foreground |
| 234 | {answer} |
| 235 | </dd> |
| 236 | </div> |
| 237 | ))} |
| 238 | </dl> |
| 239 | </section> |
| 240 | </main> |
| 241 | |
| 242 | <footer className="mx-auto flex w-full max-w-6xl flex-col px-4 md:px-8 |
| 243 | <section className="flex flex-col items-start gap-8 border-t pt-16 pb-24 md:pt-24 md:pb-32 |
| 244 | <p className="max-w-[16ch] text-5xl font-semibold tracking-[-0.04em] text-balance [overflow-wrap:anywhere] md:text-7xl |
| 245 | Move one repository this afternoon. |
| 246 | </p> |
| 247 | <div className="flex flex-wrap gap-3 |
| 248 | <Button asChild size |
| 249 | <Link href=" |
| 250 | </Button> |
| 251 | <Button |
| 252 | asChild |
| 253 | size="lg" |
| 254 | variant="outline" |
| 255 | className="h-11 rounded-full px-5" |
| 256 | > |
| 257 | <a href={DOCS_URL |
| 258 | </Button> |
| 259 | </div> |
| 260 | </section> |
| 261 | <div className="flex items-center gap-2 border-t py-6 text-sm text-muted-foreground |
| 262 | <Ghost className=" |
| 263 | Ghost |
| 264 | <span className="ml-auto |
| 265 | </div> |
| 266 | </footer> |
| 267 | </div> |
| 268 | ); |
| 269 | } |
| 270 | |
| 271 | function Prompt() { |
| 272 | return <span className |
| 273 | } |
| 274 | |
| 275 | function SectionTitle({ children |
| 276 | return ( |
| 277 | <h2 className="text-3xl font-semibold tracking-[-0.03em] text-balance [overflow-wrap:anywhere] md:text-4xl |
| 278 | {children} |
| 279 | </h2> |
| 280 | ); |
| 281 | } |
| 282 | |
| 283 | function Split({ |
| 284 | title, |
| 285 | body, |
| 286 | facts, |
| 287 | children, |
| 288 | }: { |
| 289 | title: string |
| 290 | body: string |
| 291 | facts: string |
| 292 | children: ReactNode |
| 293 | }) { |
| 294 | return ( |
| 295 | <section className={` |
| 296 | <div className="flex min-w-0 flex-col gap-5 |
| 297 | <SectionTitle>{title} |
| 298 | <p className="max-w-md text-pretty text-muted-foreground |
| 299 | <ul className="flex flex-col gap-1.5 text-sm text-muted-foreground |
| 300 | {facts.map(( |
| 301 | <li key={fact |
| 302 | <span |
| 303 | aria-hidden |
| 304 | className="size-1 shrink-0 translate-y-[-0.2em] rounded-full bg-primary" |
| 305 | /> |
| 306 | {fact} |
| 307 | </li> |
| 308 | ))} |
| 309 | </ul> |
| 310 | </div> |
| 311 | <div className="min-w-0 |
| 312 | </section> |
| 313 | ); |
| 314 | } |
| 315 | |
| 316 | function Panel({ |
| 317 | children, |
| 318 | className = "", |
| 319 | }: { |
| 320 | children: ReactNode |
| 321 | className?: string |
| 322 | }) { |
| 323 | return ( |
| 324 | <div |
| 325 | className={`min-w-0 overflow-hidden rounded-xl border bg-card text-sm ${className |
| 326 | > |
| 327 | {children} |
| 328 | </div> |
| 329 | ); |
| 330 | } |
| 331 | |
| 332 | function PanelHead({ children |
| 333 | return ( |
| 334 | <div className="flex h-11 items-center gap-2 border-b px-4 text-xs text-muted-foreground |
| 335 | {children} |
| 336 | </div> |
| 337 | ); |
| 338 | } |
| 339 | |
| 340 | function DurabilityProof() { |
| 341 | const layers = |
| 342 | { label: "git push", |
| 343 | { label: "your bucket", |
| 344 | { label: "server disk", |
| 345 | ]; |
| 346 | return ( |
| 347 | <Panel> |
| 348 | <PanelHead>Where every push goes</PanelHead |
| 349 | <ol className="divide-y |
| 350 | {layers.map(( |
| 351 | <li |
| 352 | key={label} |
| 353 | className={`flex flex-wrap items-baseline gap-x-4 gap-y-1 px-4 py-3.5 ${ |
| 354 | index === 1 ? |
| 355 | }`} |
| 356 | > |
| 357 | <span className="w-5 font-mono text-xs text-muted-foreground |
| 358 | {index + 1} |
| 359 | </span> |
| 360 | <span className="font-mono font-medium |
| 361 | <span className="basis-full pl-9 text-xs text-muted-foreground sm:ml-auto sm:basis-auto sm:pl-0 |
| 362 | {note} |
| 363 | </span> |
| 364 | </li> |
| 365 | ))} |
| 366 | </ol> |
| 367 | </Panel> |
| 368 | ); |
| 369 | } |
| 370 | |
| 371 | function ReviewProof() { |
| 372 | const lines = |
| 373 | { kind: " ", |
| 374 | { kind: "-", |
| 375 | { kind: "+", |
| 376 | { kind: " ", |
| 377 | ]; |
| 378 | return ( |
| 379 | <Panel> |
| 380 | <PanelHead> |
| 381 | <span className="truncate font-medium text-foreground |
| 382 | Round invoice totals once |
| 383 | </span> |
| 384 | #14 |
| 385 | </PanelHead> |
| 386 | <pre className="py-2 font-mono text-xs leading-6 |
| 387 | {lines.map(( |
| 388 | <div |
| 389 | key={index} |
| 390 | className={`truncate px-4 ${ |
| 391 | kind === "+" |
| 392 | ? "bg-primary/10" |
| 393 | : kind === " |
| 394 | ? "bg-destructive/10 text-destructive" |
| 395 | : "" |
| 396 | }`} |
| 397 | > |
| 398 | <span |
| 399 | aria-hidden |
| 400 | className="mr-3 text-muted-foreground select-none" |
| 401 | > |
| 402 | {kind} |
| 403 | </span> |
| 404 | {text} |
| 405 | </div> |
| 406 | ))} |
| 407 | </pre> |
| 408 | <div className="flex h-12 items-center gap-3 border-t px-4 |
| 409 | <span className="flex min-w-0 items-center gap-1.5 truncate text-xs text-muted-foreground |
| 410 | <BadgeCheck className=" |
| 411 | Approved |
| 412 | <span className="hidden sm:inline |
| 413 | at <code className="font-mono |
| 414 | </span> |
| 415 | </span> |
| 416 | <span className="ml-auto flex shrink-0 items-center gap-1.5 rounded-full bg-primary px-3 py-1 text-xs font-medium text-primary-foreground |
| 417 | <GitMerge className=" |
| 418 | Squash and merge |
| 419 | </span> |
| 420 | </div> |
| 421 | </Panel> |
| 422 | ); |
| 423 | } |
| 424 | |
| 425 | function SearchProof() { |
| 426 | const hits = |
| 427 | { |
| 428 | path: "billing/src/cart.ts", |
| 429 | line: 42, |
| 430 | before: "return cart.", |
| 431 | after: "(code);", |
| 432 | }, |
| 433 | { |
| 434 | path: "checkout/src/pay.ts", |
| 435 | line: 18, |
| 436 | before: "await ", |
| 437 | after: "(order);", |
| 438 | }, |
| 439 | ]; |
| 440 | return ( |
| 441 | <Panel> |
| 442 | <PanelHead> |
| 443 | <Search className=" |
| 444 | <span className="font-mono |
| 445 | org:you <span className="text-foreground |
| 446 | </span> |
| 447 | </PanelHead> |
| 448 | <ul className="divide-y |
| 449 | {hits.map(( |
| 450 | <li key={path |
| 451 | <span className="truncate text-xs font-medium |
| 452 | <code className="truncate font-mono text-xs text-muted-foreground |
| 453 | <span className="mr-3 select-none |
| 454 | {before} |
| 455 | <mark className="rounded-sm bg-primary/20 px-0.5 text-foreground |
| 456 | discount |
| 457 | </mark> |
| 458 | {after} |
| 459 | </code> |
| 460 | </li> |
| 461 | ))} |
| 462 | </ul> |
| 463 | </Panel> |
| 464 | ); |
| 465 | } |
| 466 | |
| 467 | function RolesProof() { |
| 468 | const roles = |
| 469 | return ( |
| 470 | <Panel> |
| 471 | <PanelHead> |
| 472 | <Lock className=" |
| 473 | you/billing is private |
| 474 | </PanelHead> |
| 475 | <ol className="flex items-end gap-1 px-3 pt-5 sm:gap-1.5 sm:px-4 pb-4 |
| 476 | {roles.map(( |
| 477 | <li |
| 478 | key={role} |
| 479 | className="flex min-w-0 flex-1 flex-col items-center gap-2" |
| 480 | > |
| 481 | <span |
| 482 | aria-hidden |
| 483 | className={`w-full rounded-md ${index |
| 484 | style={{ height: |
| 485 | /> |
| 486 | <span |
| 487 | className={`max-w-full truncate font-mono text-[10px] sm:text-[11px] ${index |
| 488 | > |
| 489 | {role} |
| 490 | </span> |
| 491 | </li> |
| 492 | ))} |
| 493 | </ol> |
| 494 | <p className="border-t px-4 py-3 text-xs text-pretty text-muted-foreground |
| 495 | <span className="font-medium text-foreground |
| 496 | push and merge. Everyone outside the team gets a 404. |
| 497 | </p> |
| 498 | </Panel> |
| 499 | ); |
| 500 | } |
| 501 | |
| 502 | function SignatureProof() { |
| 503 | const commits = |
| 504 | { message: "Fix the invoice rounding", |
| 505 | { message: "Add the export button", |
| 506 | { message: "Update deploy credentials", |
| 507 | ]; |
| 508 | return ( |
| 509 | <Panel> |
| 510 | <PanelHead>Commits on main</PanelHead |
| 511 | <ul className="divide-y |
| 512 | {commits.map(( |
| 513 | <li key={sha |
| 514 | <span className="min-w-0 flex-1 truncate |
| 515 | <span |
| 516 | className={`w-18 shrink-0 rounded-full border py-0.5 text-center text-[11px] ${ |
| 517 | verified |
| 518 | ? "border-primary/40 font-medium text-primary" |
| 519 | : "text-muted-foreground" |
| 520 | }`} |
| 521 | > |
| 522 | {verified ? "Verified |
| 523 | </span> |
| 524 | <code className="hidden font-mono text-xs text-muted-foreground sm:block |
| 525 | {sha} |
| 526 | </code> |
| 527 | </li> |
| 528 | ))} |
| 529 | </ul> |
| 530 | </Panel> |
| 531 | ); |
| 532 | } |