How bluesky-social/atproto-website works
Project Type and Purpose
• Type: Static documentation website (Next.js + MDX)
• Purpose: Serve multilingual AT Protocol docs, specs, and guides at atproto.com
File Structure
• src/app/[locale] – App-Router pages and MDX content (file-based routing + i18n)
• src/components – Shared React components used in MDX layouts
• src/mdx – Custom MDX plugins (recma, rehype, remark, search indexing)
• src/styles, tailwind.config.ts, postcss.config.js – Styling pipeline (Tailwind CSS)
• public – Static assets (images, fonts)
• next.config.mjs, middleware.js – Next.js configuration & locale middleware
README for Insights
• Next dev/build commands, routing starts at src/app/[locale]/en.mdx
• MDX-driven content generation and automatic live reload
Main Components
a. Content Repository (GitHub)
– MDX files under src/app (articles, guides, specs)
– React components under src/components
– Styles + assets under src/styles & public
b. Build Pipeline
– npm install → Next.js build
– MDX loader + custom recma/rehype/remark plugins
– Tailwind CSS + PostCSS → CSS bundle
c. Next.js Runtime (App Router)
– File-based routing with dynamic [locale] segments
– getStaticProps-like SSG for MDX pages, fallback SSR if needed
– Middleware for locale redirects
d. Deployment & Hosting
– Output: static HTML, JSON, JS bundles in .next/
– Deployed to Vercel or similar CDN for global edge delivery
e. Client (Browser)
– Requests localized URL (e.g., /en/articles/why-atproto)
– Receives pre-rendered HTML + JS for hydration
Relationships & Interactions
• Developer → GitHub → CI/CD
↳ triggers Build Pipeline
• Build Pipeline
– Reads MDX + components + styles → Next.js build
– Produces static assets & serverless functions
• CDN / Edge Network
– Serves pre-rendered HTML, JSON routes, static assets
• Browser
– Fetches HTML → hydrates React components → interactive site
Architectural Patterns & Principles
• File-based routing (Next.js App Router)
• Static Site Generation (SSG) with optional SSR for dynamic content
• i18n using dynamic route segments + middleware redirect
• MDX as CMS: content-as-code pattern
• Component-driven design (design tokens in Tailwind + shared React UI)