Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 134 additions & 0 deletions app/(marketing)/exchange/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
import Link from "next/link";
import { EXCHANGE, loadExchangeLive, type ExchangeItem } from "@/lib/exchange/catalog";

export const revalidate = 300;

export const metadata = {
title: "Exchange — rent hardware, software, AI and traffic",
description:
"Rent a desktop, a Linux shell, GPU time, hosting or an AI marketer by the day, buy or sell real ad traffic, or rent out your own spare computer. One place, plain English, paid in crypto.",
alternates: { canonical: "/exchange" },
openGraph: {
title: "The CrawlProof Exchange",
description:
"Rent hardware, software, AI help and traffic, or sell your own spare compute. Powered by the c0mpute network and CrawlProof Ads.",
url: "/exchange",
},
};

/**
* The normie front door to the c0mpute marketplace. c0mpute.com sells to
* people who already speak nodes and sealed bids; this page says the same
* catalog in plain English and links each line to the page that actually
* bills for it. The catalog lives in lib/exchange/catalog.ts, shared with
* /api/exchange.
*/
export default async function ExchangePage() {
const live = await loadExchangeLive(revalidate);

const stats: { label: string; value: string }[] = [];
if (live.nodesOnline !== null) stats.push({ label: "machines online now", value: String(live.nodesOnline) });
if (live.gpuNodes !== null && live.gpuNodes > 0) stats.push({ label: "with a GPU", value: String(live.gpuNodes) });
if (live.expertsCount !== null) stats.push({ label: "AI experts for hire", value: String(live.expertsCount) });
if (live.expertsTrialDays !== null) stats.push({ label: "days free on experts", value: String(live.expertsTrialDays) });

return (
<main className="mx-auto max-w-5xl px-4 py-16 sm:px-6">
<section className="text-center">
<p className="mb-3 text-sm font-medium uppercase tracking-wider text-[var(--color-accent)]">
The Exchange
</p>
<h1 className="text-4xl font-extrabold sm:text-5xl">Rent it, run it, or rent yours out.</h1>
<p className="mx-auto mt-4 max-w-2xl text-lg text-[var(--color-muted)]">
Desktops, servers, GPU time, hosting, AI help and real ad traffic, by the day or by the job.
Or put your own idle computer to work and get paid for it. No contracts, no sales calls,
paid in crypto.
</p>
<nav className="mt-8 flex flex-wrap justify-center gap-2 text-sm" aria-label="Exchange sections">
{EXCHANGE.map((s) => (
<a key={s.id} href={`#${s.id}`} className="btn px-3 py-1.5 text-sm">
{s.title}
</a>
))}
</nav>
{stats.length > 0 && (
<dl className="mx-auto mt-10 grid max-w-3xl grid-cols-2 gap-4 sm:grid-cols-4">
{stats.map((s) => (
<div key={s.label} className="card p-4">
<dt className="text-xs text-[var(--color-muted)]">{s.label}</dt>
<dd className="mt-1 text-2xl font-extrabold">{s.value}</dd>
</div>
))}
</dl>
)}
</section>

{EXCHANGE.map((section) => (
<section key={section.id} id={section.id} className="mt-16 scroll-mt-24">
<h2 className="text-2xl font-bold">{section.title}</h2>
<p className="mt-2 max-w-3xl text-[var(--color-muted)]">{section.intro}</p>
<ul className="mt-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-4">
{section.items.map((item) => (
<li key={item.id} id={item.id}>
<Offer item={item} />
</li>
))}
</ul>
</section>
))}

<section className="mt-20 rounded-xl border border-[var(--color-border)] bg-[var(--color-card)] p-8">
<h2 className="text-2xl font-bold">How paying works</h2>
<p className="mt-2 max-w-3xl text-[var(--color-muted)]">
Everything on the c0mpute side is bought with one CoinPay sign-in and paid from your c0mpute
balance. Traffic is bought and sold with CrawlProof credits. Each card links to the page that
sells it, which has the current price and availability.
{live.expertsBundleUsd !== null &&
` AI experts are $${live.expertsBundleUsd} for all of them per month after the free trial.`}
</p>
<p className="mt-4 text-sm text-[var(--color-muted)]">
Prefer a terminal? Install the CLI with{" "}
<code>curl -fsSL https://c0mpute.com/install.sh | sh</code>, then use the command on each card.
</p>
<div className="mt-6 flex flex-wrap gap-3">
<a href="https://c0mpute.com/getting-started" className="btn btn-primary">
Get started on c0mpute
</a>
<Link href="/ads" className="btn">
Buy or sell traffic
</Link>
</div>
</section>
</main>
);
}

function Offer({ item }: { item: ExchangeItem }) {
const external = item.href.startsWith("http");
const cta = external ? "Open on c0mpute" : "Open";
return (
<div className="card flex h-full flex-col p-5">
<div className="flex items-baseline justify-between gap-3">
<h3 className="font-semibold">{item.name}</h3>
{item.price && <span className="shrink-0 text-sm font-semibold text-[var(--color-accent)]">{item.price}</span>}
</div>
<p className="mt-2 text-sm text-[var(--color-muted)]">{item.blurb}</p>
{item.cli && (
<p className="mt-3 text-xs">
<code>{item.cli}</code>
</p>
)}
<div className="mt-auto pt-4">
{external ? (
<a href={item.href} className="text-sm font-medium text-[var(--color-accent)]" rel="noopener">
{cta} →
</a>
) : (
<Link href={item.href} className="text-sm font-medium text-[var(--color-accent)]">
{cta} →
</Link>
)}
</div>
</div>
);
}
18 changes: 18 additions & 0 deletions app/api/exchange/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// GET /api/exchange — the Exchange catalog as JSON, the same data /exchange
// renders, with live c0mpute counts. Public, cacheable, no key.
import { EXCHANGE, loadExchangeLive } from "@/lib/exchange/catalog";

export const revalidate = 300;

export async function GET() {
const live = await loadExchangeLive(revalidate);
return Response.json(
{ object: "exchange", page: "https://crawlproof.com/exchange", live, sections: EXCHANGE },
{
headers: {
"cache-control": "public, max-age=300, s-maxage=300",
"access-control-allow-origin": "*",
},
},
);
}
1 change: 1 addition & 0 deletions app/sitemap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
{ url: `${base}/slop`, changeFrequency: "monthly", priority: 0.9 },
// Hub for the five free scanners — the three that need an account had no
// inbound link anywhere before this page existed.
{ url: `${base}/exchange`, changeFrequency: "weekly", priority: 0.9 },
{ url: `${base}/tools`, changeFrequency: "monthly", priority: 0.9 },
{ url: `${base}/get-guide`, changeFrequency: "monthly", priority: 0.9 },
{ url: `${base}/about`, changeFrequency: "monthly", priority: 0.7 },
Expand Down
1 change: 1 addition & 0 deletions components/site-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export async function SiteHeader() {
<a href="/studio">Social</a>
<Link href="/pricing">Pricing</Link>
<Link href="/ads">Ads</Link>
<Link href="/exchange">Exchange</Link>
<Link href="/get-guide">Guide</Link>
<Link href="/recent">Recent</Link>
<Link href="/about" className="hidden sm:inline">
Expand Down
Loading
Loading