A peer-to-peer delivery layer for bytes at scale. Anyone can serve bytes; clients pay per megabyte in USDC.
This is the source for the deCDN marketing site and blog.
Next.js 16 (App Router) · React 19 · Tailwind CSS v4 · TypeScript · pnpm. Static export, deployed to Cloudflare Pages.
pnpm install # required (not npm/yarn) — husky hooks shell out to `pnpm exec`
pnpm dev # dev server on :3000
pnpm build # static export → ./out
pnpm test # vitest run
pnpm lint # eslint (flat config)
pnpm format # prettier --write .app/— App Router entry (layout.tsx,page.tsx,globals.css) plus the blog routes (blog/,blog/[slug]/), sitemap/robots handlers, and file-convention metadata assets.components/site/— page sections composed byapp/page.tsx(Hero, Compare, Method, Faq, Contact).components/ui/— low-level primitives (Frame, SectionHeader, Figure, …).lib/— shared helpers (links.ts,blog.ts,faq.ts,jsonld.tsx).content/blog/— MDX posts loaded bylib/blog.tsand rendered byapp/blog/[slug]/page.tsx.docs/— Mintlify source fordocs.decdn.org. Built and deployed independently ofpnpm build; not part of the static export and not imported from the website code.- Path alias:
@/*maps to the project root (e.g.@/lib/links, not@/src/...).
- Static export only.
next.config.tssetsoutput: "export"; the build emits./out. No SSR, ISR, middleware, or Image Optimization API. Route handlers (app/sitemap.xml/route.ts,app/sitemap-pages.xml/route.ts) must bedynamic = "force-static"and GET-only; theapp/robots.tsmetadata file emitsrobots.txtand also requiresdynamic = "force-static". trailingSlash: true. Every route emits<path>/index.html. Internal links and hand-built URLs (sitemap entries, JSON-LD@ids) should expect a trailing slash — seeSITE_URLandBLOG_URLinlib/links.ts.- Tailwind v4. Theme tokens live in
app/globals.cssunder@theme inline { … }— there is notailwind.config.*. - Conventional commits enforced.
commitlintruns in thecommit-msghusky hook; non-conforming messages are rejected. metadataBaseis live.lib/links.tssiteis the real origin andINDEXABLEistrue. Anything anchored on this origin — OG and canonical (viametadataBase); JSON-LD and the sitemap/robots emitters (viaSITE_URL) — ships to production. FlippingINDEXABLEflips<meta name="robots">only;robots.txtand the sitemap stay unconditional by design (rationale inlib/links.ts).
Cloudflare Pages serves the out/ directory produced by pnpm build.
See AGENTS.md for the full ruleset (CLAUDE.md is a one-line include of it).