An overview of the directory layout, routing conventions, and i18n mechanism.
Project Structure
Top-Level Directories
docsblog-app/
├── content/ # All content data (blog, docs, social, navigation)
├── src/ # Application source code
├── scripts/ # Build and data-processing scripts
├── public/ # Static assets (images, favicons)
├── .github/ # GitHub Actions workflows
├── wrangler.jsonc # Cloudflare Workers configuration
└── open-next.config.ts # OpenNext + Cloudflare adapter settingssrc/ Internals
src/
├── app/
│ └── [locale]/ # All pages are locale-scoped
│ ├── blog/ # Blog list and article pages
│ ├── docs/ # Documentation pages (fumadocs)
│ ├── twitter/ # Twitter/X accounts listing
│ ├── youtube/ # YouTube channels listing
│ ├── nav-group/ # Navigation group pages
│ ├── item/ # Individual tool/item detail
│ ├── author/ # Author listing
│ ├── categories/ # Category listing
│ ├── search/ # Full-text search
│ ├── admin/ # Admin panel (all management pages)
│ └── layout.tsx # Root layout with providers
├── config/ # Modular configuration
│ ├── authors.ts # Author registry
│ ├── branding.ts # Logo, site name, social links
│ ├── navigation.ts # Top navigation links
│ ├── categories/ # Category definitions (blog, twitter, youtube)
│ ├── nav/ # Navigation menu registry
│ ├── twitter/ # Twitter category config
│ └── youtube/ # YouTube category config
├── lib/ # Shared utilities
│ ├── dev-cache.ts # devSafeCache (dev: no cache, prod: unstable_cache)
│ ├── metadata.ts # SEO metadata helpers
│ └── sitemap-utils.ts # Sitemap generation
├── components/ # Reusable UI components (shadcn/ui style)
└── libs/
└── source.ts # fumadocs blog/docs data sourcecontent/ Directories
| Directory | Description |
|---|---|
content/blog/en/ | English blog posts (MDX files) |
content/blog/zh-hans/ | Chinese blog posts (MDX files) |
content/docs/en/ | English documentation (MDX files) |
content/docs/zh-hans/ | Chinese documentation (MDX files) |
content/items/ | Navigation tool/item cards (JSON) |
content/twitters/ | Twitter/X account data (JSON) |
content/youtubes/ | YouTube channel data (JSON) |
Route Structure
| Path | Description |
|---|---|
/blog | Blog post listing |
/blog/[slug] | Individual blog post |
/docs | Documentation home |
/docs/[...slug] | Documentation page |
/twitter | Twitter accounts listing |
/youtube | YouTube channels listing |
/nav-group/[slug] | Navigation group page |
/item/[slug] | Tool/item detail page |
/author | Author listing |
/categories | Category listing |
/search | Search page |
/admin | Admin panel (dev/enabled only) |
i18n Mechanism
The app supports two locales: English (en) and Chinese Simplified (zh-hans).
- English is the default locale. English pages are served without a prefix:
/blog,/docs/getting-started, etc. - Chinese uses the
/zh-hans/prefix:/zh-hans/blog,/zh-hans/docs/getting-started, etc. - Content files are organized by locale under
content/blog/en/,content/blog/zh-hans/,content/docs/en/, andcontent/docs/zh-hans/. - The locale is resolved from the URL path via the
[locale]dynamic segment insrc/app/[locale]/.