Files
better-auth/docs
BekacruandClaude Opus 5.5 f396ec6c39 docs: cut homepage weight on slow connections
Under Fast 3G the homepage still took ~19s to LCP. The main costs:

- The hero 3D logos were SVGs wrapping large embedded PNGs (256-590KB
  each), and all four (both themes) were `priority`, so every visit
  preloaded 1.69MB, including on mobile where they're hidden. They're now
  WebP (21-59KB) served through next/image with `sizes`, lazy-loaded so
  only the visible theme's pair is fetched (~37KB).
- The contributor wall rendered 473 GitHub avatars (~1.6MB) that the
  browser's lazy-loading threshold pulled in right after first paint. The
  wall now mounts its avatars only when it nears the viewport.
- `geist/font/pixel` declared and preloaded all five Geist Pixel fonts;
  only Square is used, so load just that one.
- Both demo video posters were fetched even though one is hidden; only
  the active theme's poster is set now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 22:43:32 -07:00
..
…

Better Auth

Website & Docs

The main website and documentation for better-auth.com

Website GitHub Stars License


Quick Start

# install
pnpm install

# develop
pnpm dev

Open localhost:3000 to preview.

Stack

  • Framework: Next.js 16 (App Router, Turbopack)
  • Styling: Tailwind CSS 4
  • Animation: Framer Motion
  • Docs: Fumadocs
  • Icons: Lucide React
  • Fonts: Geist Sans & Geist Mono

Structure

├─ app/
│  ├─ page.tsx              # Home — hero + sign-in demo
│  ├─ products/             # Products page
│  ├─ blog/                 # Blog posts
│  └─ docs/[[...slug]]/     # Documentation (MDX)
│
├─ components/
│  ├─ landing/              # Marketing components
│  ├─ docs/                 # Documentation components
│  ├─ ui/                   # Shared primitives
│  └─ icons/                # Brand icons & logo
│
├─ content/                 # MDX documentation files
│
├─ lib/
│  ├─ source.ts             # Fumadocs content source
│  └─ utils.ts              # Utilities
│
└─ public/
   └─ branding/             # Logo assets (SVG + PNG)

Scripts

pnpm dev          # Start dev server (Turbopack)
pnpm build        # Production build
pnpm start        # Serve production build
pnpm lint:fix     # Lint & auto-fix with Biome