The Next.js site imported from eigen-homepages/apps/darkbloom. It owns its
dependencies, TypeScript and ESLint configuration, API routes, fonts, and media.
Use the Node.js version pinned in the repository's mise.toml.
cd landing
npm ci
cp .env.example .env.local
npm run devOpen http://localhost:3008. Run npm run lint and npm run build before
committing, then npm test for HTTP route checks; npm start serves the
production build on the same port. make landing runs all checks from the
repository root.
The environment variables are listed in .env.example. The
server-only DARKBLOOM_API_KEY enables the homepage chat demo. Without it,
/api/chat returns an unavailable response. Network and model data use the
coordinator and console URLs; /api/network retains the imported site's
fixed fallback snapshot when live stats are unavailable. Provider-story
delivery requires DARKBLOOM_STORY_WEBHOOK_URL and, if applicable,
DARKBLOOM_STORY_WEBHOOK_TOKEN.
Use landing as the Vercel project root, with the Next.js framework
preset, npm ci for installation, and npm run build for the build. The
local vercel.json records those commands and the .next output directory.
This is a server-rendered app with API routes and streaming chat, so it
requires a Next.js server runtime.
For the existing marketing deployment, reconnect its Git repository to
Layr-Labs/d-inference, select landing as the root, and retain its domains
and environment variables. The existing landing project also uses this root;
its build must now use the Next.js settings above instead of serving static
HTML. Verify a preview before switching production. This PR does not change
project settings or DNS.
The old /index.html, /terms.html and /privacy.html URLs permanently
redirect to /, /terms and /privacy. The published terms and privacy
text is preserved. The old homepage earnings calculator is replaced by the
new site's About page; the console is owned by the sibling
platform repository.
assets/cube-hero.png remains available to public native inference fixtures.
Hosting operations require specific human approval. Landing keeps its own server-side API routes; it does not build or deploy the centralized coordinator. Existing upstream endpoints and environment variables are unchanged.
The chat route keys its per-visitor rate limit on a forwarding header only
when a proxy is known to set it. On Vercel (VERCEL=1) that is
X-Forwarded-For, which the platform replaces with the connecting address.
Behind another proxy, set DARKBLOOM_TRUSTED_CLIENT_IP_HEADER to the header
that proxy overwrites or appends to; its last entry must be a bare IP address
(no port), and IPv6 visitors are grouped by /64. Without either, client-supplied
headers are ignored and all visitors share one bucket, as do requests whose
entry is not an address. The chat route reads at most 16 KiB of request body
and the provider-story route 50,000 bytes. Each counts the bytes it receives,
not the declared Content-Length, so a chunked or HTTP/2 body cannot exceed
it. Past the limit nothing is kept, and up to 1 MiB more is read and discarded
so a client that is still sending receives the 413; a longer body has its
connection dropped. API routes are outside the proxy.ts matcher, which would
otherwise buffer the whole body before the route ran.
Use a budget-capped coordinator key for the public demo. The chat route's in-memory rate limiter is per instance; distributed enforcement belongs in the deployment's shared limiter or edge controls.
The public entry points are /llms.txt, /auth.md, /openapi.json,
/sitemap.xml, /developers.md, /pricing and /contact.md. The homepage
and pricing page support explicit Markdown twins (/index.md, /pricing.md)
and Accept: text/markdown; normal browser requests retain HTML.
Developer and contact guidance remain Markdown documents, discoverable through
/llms.txt. /developers and /contact return Markdown when requested with
Accept: text/markdown, and HTTP 404 for ordinary browser requests. Their HTML
pages, site navigation links and XML sitemap entries are removed. Human-facing
API links lead to the official documentation. Direct .md URLs remain public
and readable by any client; format selection is not access control.
Read API-CONTRACT.md
for the exact reviewed operation subset and its platform source revision.
Pricing reads the public coordinator source server-side, labels USD per million tokens and retrieval time, and reports unavailable data without inventing rates. Product facts and official links are shared across representations. See the architecture and the audit disposition.
npm run build explicitly runs scripts/preserve-next-vary.mjs before Next.js
to preserve proxy Vary values in the pinned Next.js 16.2.6 page templates. This is a dependency-free, exact
replacement for upstream issue 85999,
following proposed fix 91039.
The script verifies the version and expected source, is idempotent, and fails
the build on unexpected code. Both CommonJS/ESM and Node/edge templates
receive the same merge behavior. Installation with npm ci --ignore-scripts
is supported because the patch is part of the explicit build command.
On a Next upgrade, remove it only after the production HTTP tests pass without
it, including HTML Vary: Accept plus framework tokens and alternating
HTML/Markdown requests.