How miaoyinjun/blog works
01mvp-blog-starter is a Cloudflare-native publishing system with two content surfaces: a database-backed blog and Git-managed Fumadocs documentation. The main author workflow is admin sign-in, post editing, publication, and reader-facing rendering; comments, assets, imports/exports, backups, and OpenAPI automation extend that workflow. D1 stores structured content and account data, R2 stores binary assets and archives, and KV supports cache metadata. The graph reflects README-documented capabilities and sampled auth behavior; several feature-specific route implementations were not sampled, so their internal call links are omitted.
Main entry points: routeTree.gen.ts Route registry · cms.sqlite.ts CMS schema · post-form.tsx Post editor · docs-route.tsx Git-managed docs
Components 27
Web surfaces
- Route registry
apps/web/src/routeTree.gen.ts - Public blog
apps/web/src/routes/index.tsx - Post pages
apps/web/src/routes/blog/$slug.tsx - About page
apps/web/src/routes/about.tsx - Git-managed docs
apps/web/src/components/docs-route.tsx - OpenAPI publishing
apps/web/src/routes/openapi[.]json.ts - Locale messages
apps/web/src/paraglide/messages/_index.js - Chinese messages
apps/web/src/paraglide/messages/zh.js - Locale runtime
apps/web/src/paraglide/runtime.js - Fumadocs source
apps/web/src/lib/source.ts
Publishing operations
- Admin workspace
apps/web/src/routes/_auth/admin/index.tsx - Post editor
apps/web/src/components/admin/post-form.tsx - Comment handling
apps/web/src/routes/api/comments.ts - Content model
packages/core/src/types.ts - Markdown tools
packages/core/src/markdown.ts - Starter content
packages/core/src/demo-data.ts - CMS schema
packages/db/src/schema/cms.sqlite.ts
Identity and access
- Protected routes
apps/web/src/routes/_auth/route.tsx - Guest routes
apps/web/src/routes/_guest/route.tsx - Auth service
packages/auth/src/auth.ts - Account schema
packages/db/src/schema/auth.schema.ts
Cloudflare platform
- Cloudflare D1
- Cloudflare R2
- Cloudflare KV
Other components
- Reader
- Author/admin
- External automation
Connections 27
- Reader → Route registry: opens routes
apps/web/src/routeTree.gen.ts - Author/admin → Route registry: opens routes
apps/web/src/routeTree.gen.ts - External automation → OpenAPI publishing: uses publishing API
README.md - Route registry → Public blog: routes to
apps/web/src/routeTree.gen.ts - Route registry → Post pages: routes to
apps/web/src/routeTree.gen.ts - Route registry → About page: routes to
apps/web/src/routeTree.gen.ts - Route registry → OpenAPI publishing: routes to
apps/web/src/routeTree.gen.ts - Route registry → Git-managed docs: routes to
- Reader → Git-managed docs: reads documentation
README.md - Reader → Post pages: reads published posts
README.md - Author/admin → Guest routes: signs in
apps/web/src/routes/_guest/route.tsx - Guest routes → Protected routes: redirects authenticated users
apps/web/src/routes/_guest/route.tsx - Protected routes → Admin workspace: protects routes
apps/web/src/routes/_auth/route.tsx - Admin workspace → Post editor: opens authoring
README.md - Post editor → Markdown tools: authors Markdown
- Post editor → CMS schema: persists content
README.md - Comment handling → CMS schema: stores comments
README.md - CMS schema → Cloudflare D1: stores structured content
README.md - Auth service → Account schema: uses account schema
packages/auth/src/auth.ts - Account schema → Cloudflare D1: stores accounts and sessions
README.md - Markdown tools → Content model: uses content types
packages/core/src/markdown.ts - Starter content → Content model: defines sample content
packages/core/src/demo-data.ts - Git-managed docs → Fumadocs source: renders documentation
README.md - CMS schema → Cloudflare R2: archives binary files
README.md - CMS schema → Cloudflare KV: uses cache metadata
README.md - Locale messages → Locale runtime: uses runtime
apps/web/src/paraglide/messages/_index.js - Locale messages → Chinese messages: loads Chinese messages
apps/web/src/paraglide/messages/_index.js