# mikemurphyco/mikemurphy-ai architecture

> Architecture diagram of the GitHub repository mikemurphyco/mikemurphy-ai, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mikemurphyco/mikemurphy-ai
- Repository: https://github.com/mikemurphyco/mikemurphy-ai

## Overview

#### Purpose and Runtime
`mikemurphy.ai` is a content-driven personal publishing site replacing selected WordPress functionality while the legacy `mikemurphy.co` remains live for URL transition. Astro v6 statically builds the site; Cloudflare Pages/Workers hosts the generated output. Primary runtime configuration is in `astro.config.mjs` and `wrangler.toml`.

#### Entry Points and Route Surface
Astro file routes define the public site: homepage, informational pages, and content indexes at `src/pages/index.astro`, `src/pages/articles/index.astro`, and `src/pages/ai-unplugged/index.astro`. Dynamic routes render individual article/podcast/tutorial/topic/issue pages, notably `src/pages/articles/[slug].astro`, `src/pages/ai-unplugged/issues/[slug].astro`, and `src/pages/tutorials/[slug].astro`.

#### Content Collections
The repository’s core data is versioned Markdown/MDX content. The main archive is organized by publication year in `src/content/articles/`; the AI Unplugged newsletter is a separate collection in `src/content/ai-unplugged/`. `src/content.config.ts` is the schema/collection boundary that routes and libraries consume, separating authored content from rendering logic.

#### Content Rendering Pipeline
At build time, routes query and transform collection entries through shared domain logic in `src/lib/articles.ts` and `src/lib/site.ts`, then render them with Astro pages and reusable cards. Shared page shell and navigation flow through `src/layouts/Layout.astro` and `src/components/SiteHeader.astro`; collection-specific listing presentation is encapsulated by `src/components/ArticleCard.astro` and `src/components/ai-unplugged/IssueCard.astro`.

#### Discovery and Machine-Readable Outputs
The site exposes indexable and AI-consumable endpoints alongside HTML: sitemap, robots, LLM metadata, and newsletter feeds are implemented in `src/pages/sitemap.xml.ts`, `src/pages/robots.txt.ts`, `src/pages/llms.txt.ts`, `src/pages/ai-unplugged/rss.xml.ts`, and `src/pages/ai-unplugged/agent.json.ts`. Shared RSS/agent generation belongs in `src/lib/rss.ts` and `src/lib/agent.ts`.

#### Static Assets and Client Behavior
Media is served directly from `public/assets/media/`, preserving date-based asset paths used by Markdown. Brand assets live under `public/assets/brand/`. Styling is centralized in `src/styles/global.css`; interactive search is isolated to `src/components/InlineSearch.astro`, rather than requiring an application backend.

#### Migration, Redirects, and Delivery
Redirect compatibility is a first-class deployment boundary: static redirects are in `public/_redirects`; generated redirect artifacts are produced by `scripts/generate-redirects.mjs`, `scripts/generate-main-site-redirects.mjs`, and `scripts/generate-pretty-link-redirects.mjs`, with Cloudflare bulk mappings in `cloudflare/pretty-links-bulk-redirects.csv`. Pushes to `main` trigger Cloudflare builds/deployment; `scripts/qa-launch.mjs` validates launch, content, and redirect integrity before changes ship.

Main entry points: [`src/pages/index.astro`](https://github.com/mikemurphyco/mikemurphy-ai/blob/main/src/pages/index.astro) (Public pages), [`wrangler.toml`](https://github.com/mikemurphyco/mikemurphy-ai/blob/main/wrangler.toml) (Cloudflare Pages/Workers), [`src/lib/articles.ts`](https://github.com/mikemurphyco/mikemurphy-ai/blob/main/src/lib/articles.ts) (Content domain logic), [`src/pages/articles/[slug].astro`](https://github.com/mikemurphyco/mikemurphy-ai/blob/main/src/pages/articles/[slug].astro) (Content detail pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_content["Authored content"]
  node_article_content["Article archive<br/>Markdown/MDX collection"]
  node_newsletter_content["AI Unplugged<br/>Markdown/MDX collection"]
  node_content_schema["Collection schemas<br/>Astro content config<br/>[content.config.ts]"]
end

subgraph group_site["Site rendering"]
  node_domain_logic["Content domain logic<br/>shared libraries<br/>[articles.ts]"]
  node_site_logic["Site utilities<br/>shared library<br/>[site.ts]"]
  node_astro_routes["Public pages<br/>Astro file routes<br/>[index.astro]"]
  node_dynamic_routes["Content detail pages<br/>dynamic Astro routes<br/>[[slug].astro]"]
  node_layout["Page shell<br/>Astro layout<br/>[Layout.astro]"]
  node_header["Site header<br/>Astro component<br/>[SiteHeader.astro]"]
  node_listing_cards["Collection cards<br/>Astro components<br/>[ArticleCard.astro]"]
  node_search["Inline search<br/>interactive component<br/>[InlineSearch.astro]"]
  node_assets_styles["Assets and global styles<br/>static assets / CSS"]
end

subgraph group_outputs["Discovery outputs"]
  node_discovery_routes["Discovery endpoints<br/>Astro endpoints<br/>[sitemap.xml.ts]"]
  node_feed_logic["Feed and agent generation<br/>shared libraries<br/>[rss.ts]"]
end

subgraph group_migration["Migration and delivery"]
  node_redirect_sources["Redirect sources<br/>static and generated rules"]
  node_bulk_redirects["Pretty-link mappings<br/>Cloudflare bulk redirects"]
  node_launch_qa["Launch QA<br/>validation script<br/>[qa-launch.mjs]"]
  node_cloudflare{{"Cloudflare Pages/Workers<br/>hosting platform<br/>[wrangler.toml]"}}
end

node_article_content -->|"validated by"| node_content_schema
node_newsletter_content -->|"validated by"| node_content_schema
node_content_schema -->|"defines collections for"| node_domain_logic
node_article_content -->|"queried by"| node_domain_logic
node_newsletter_content -->|"queried by"| node_domain_logic
node_domain_logic -->|"supplies indexes"| node_astro_routes
node_domain_logic -->|"supplies entries"| node_dynamic_routes
node_site_logic -->|"supports"| node_astro_routes
node_site_logic -->|"supports"| node_dynamic_routes
node_astro_routes -->|"uses"| node_layout
node_dynamic_routes -->|"uses"| node_layout
node_layout -->|"includes"| node_header
node_astro_routes -->|"renders listings with"| node_listing_cards
node_astro_routes -->|"embeds"| node_search
node_layout -->|"loads"| node_assets_styles
node_article_content -->|"provides feed content"| node_feed_logic
node_newsletter_content -->|"provides feed content"| node_feed_logic
node_feed_logic -->|"generates"| node_discovery_routes
node_astro_routes -->|"static build deployed to"| node_cloudflare
node_dynamic_routes -->|"static build deployed to"| node_cloudflare
node_discovery_routes -->|"published by"| node_cloudflare
node_redirect_sources -->|"applied at deployment"| node_cloudflare
node_bulk_redirects -->|"configures bulk redirects"| node_cloudflare
node_launch_qa -.->|"validates"| node_redirect_sources
node_launch_qa -.->|"gates release"| node_cloudflare

click node_article_content "https://github.com/mikemurphyco/mikemurphy-ai/tree/main/src/content/articles"
click node_newsletter_content "https://github.com/mikemurphyco/mikemurphy-ai/tree/main/src/content/ai-unplugged"
click node_content_schema "https://github.com/mikemurphyco/mikemurphy-ai/blob/main/src/content.config.ts"
click node_domain_logic "https://github.com/mikemurphyco/mikemurphy-ai/blob/main/src/lib/articles.ts"
click node_site_logic "https://github.com/mikemurphyco/mikemurphy-ai/blob/main/src/lib/site.ts"
click node_astro_routes "https://github.com/mikemurphyco/mikemurphy-ai/blob/main/src/pages/index.astro"
click node_dynamic_routes "https://github.com/mikemurphyco/mikemurphy-ai/blob/main/src/pages/articles/[slug].astro"
click node_layout "https://github.com/mikemurphyco/mikemurphy-ai/blob/main/src/layouts/Layout.astro"
click node_header "https://github.com/mikemurphyco/mikemurphy-ai/blob/main/src/components/SiteHeader.astro"
click node_listing_cards "https://github.com/mikemurphyco/mikemurphy-ai/blob/main/src/components/ArticleCard.astro"
click node_search "https://github.com/mikemurphyco/mikemurphy-ai/blob/main/src/components/InlineSearch.astro"
click node_assets_styles "https://github.com/mikemurphyco/mikemurphy-ai/tree/main/public/assets/media"
click node_discovery_routes "https://github.com/mikemurphyco/mikemurphy-ai/blob/main/src/pages/sitemap.xml.ts"
click node_feed_logic "https://github.com/mikemurphyco/mikemurphy-ai/blob/main/src/lib/rss.ts"
click node_redirect_sources "https://github.com/mikemurphyco/mikemurphy-ai/tree/main/public/_redirects"
click node_bulk_redirects "https://github.com/mikemurphyco/mikemurphy-ai/blob/main/cloudflare/pretty-links-bulk-redirects.csv"
click node_launch_qa "https://github.com/mikemurphyco/mikemurphy-ai/blob/main/scripts/qa-launch.mjs"
click node_cloudflare "https://github.com/mikemurphyco/mikemurphy-ai/blob/main/wrangler.toml"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_article_content,node_newsletter_content,node_content_schema toneBlue
class node_domain_logic,node_site_logic,node_astro_routes,node_dynamic_routes,node_layout,node_header,node_listing_cards,node_search,node_assets_styles toneAmber
class node_discovery_routes,node_feed_logic toneMint
class node_redirect_sources,node_bulk_redirects,node_launch_qa,node_cloudflare toneRose
```

## Components

### Authored content

Versioned publication collections and schemas.

- [Article archive](https://github.com/mikemurphyco/mikemurphy-ai/tree/main/src/content/articles): Markdown/MDX collection · Year-organized main publication archive. · `src/content/articles`
- [AI Unplugged](https://github.com/mikemurphyco/mikemurphy-ai/tree/main/src/content/ai-unplugged): Markdown/MDX collection · Newsletter content collection. · `src/content/ai-unplugged`
- [Collection schemas](https://github.com/mikemurphyco/mikemurphy-ai/blob/main/src/content.config.ts): Astro content config · Schema boundary consumed by routes and libraries. · `src/content.config.ts`

### Site rendering

Astro routes, shared domain logic, and UI.

- [Content domain logic](https://github.com/mikemurphyco/mikemurphy-ai/blob/main/src/lib/articles.ts): shared libraries · Queries and transforms collection entries at build time. · `src/lib/articles.ts`
- [Site utilities](https://github.com/mikemurphyco/mikemurphy-ai/blob/main/src/lib/site.ts): shared library · `src/lib/site.ts`
- [Public pages](https://github.com/mikemurphyco/mikemurphy-ai/blob/main/src/pages/index.astro): Astro file routes · Home, indexes, and informational page surface. · `src/pages/index.astro`
- [Content detail pages](https://github.com/mikemurphyco/mikemurphy-ai/blob/main/src/pages/articles/[slug].astro): dynamic Astro routes · Renders article, issue, tutorial, and topic detail pages. · `src/pages/articles/[slug].astro`
- [Page shell](https://github.com/mikemurphyco/mikemurphy-ai/blob/main/src/layouts/Layout.astro): Astro layout · Shared layout and navigation frame. · `src/layouts/Layout.astro`
- [Site header](https://github.com/mikemurphyco/mikemurphy-ai/blob/main/src/components/SiteHeader.astro): Astro component · `src/components/SiteHeader.astro`
- [Collection cards](https://github.com/mikemurphyco/mikemurphy-ai/blob/main/src/components/ArticleCard.astro): Astro components · Article and issue listing presentation. · `src/components/ArticleCard.astro`
- [Inline search](https://github.com/mikemurphyco/mikemurphy-ai/blob/main/src/components/InlineSearch.astro): interactive component · Isolated client-side search behavior. · `src/components/InlineSearch.astro`
- [Assets and global styles](https://github.com/mikemurphyco/mikemurphy-ai/tree/main/public/assets/media): static assets / CSS · Preserved Markdown media paths, brand assets, and shared styling. · `public/assets/media`

### Discovery outputs

Machine-readable static endpoints.

- [Discovery endpoints](https://github.com/mikemurphyco/mikemurphy-ai/blob/main/src/pages/sitemap.xml.ts): Astro endpoints · Sitemap, robots, LLM metadata, RSS, and agent outputs. · `src/pages/sitemap.xml.ts`
- [Feed and agent generation](https://github.com/mikemurphyco/mikemurphy-ai/blob/main/src/lib/rss.ts): shared libraries · Builds newsletter RSS and agent metadata. · `src/lib/rss.ts`

### Migration and delivery

Redirect compatibility, validation, and Cloudflare deployment.

- [Redirect sources](https://github.com/mikemurphyco/mikemurphy-ai/tree/main/public/_redirects): static and generated rules · Legacy URL compatibility rules and generators. · `public/_redirects`
- [Pretty-link mappings](https://github.com/mikemurphyco/mikemurphy-ai/blob/main/cloudflare/pretty-links-bulk-redirects.csv): Cloudflare bulk redirects · `cloudflare/pretty-links-bulk-redirects.csv`
- [Launch QA](https://github.com/mikemurphyco/mikemurphy-ai/blob/main/scripts/qa-launch.mjs): validation script · Validates launch, content, and redirect integrity. · `scripts/qa-launch.mjs`
- [Cloudflare Pages/Workers](https://github.com/mikemurphyco/mikemurphy-ai/blob/main/wrangler.toml): hosting platform · Builds and serves static Astro output on pushes to main. · `wrangler.toml`

## Connections

- Article archive → Collection schemas: validated by
- AI Unplugged → Collection schemas: validated by
- Collection schemas → Content domain logic: defines collections for
- Article archive → Content domain logic: queried by
- AI Unplugged → Content domain logic: queried by
- Content domain logic → Public pages: supplies indexes
- Content domain logic → Content detail pages: supplies entries
- Site utilities → Public pages: supports
- Site utilities → Content detail pages: supports
- Public pages → Page shell: uses
- Content detail pages → Page shell: uses
- Page shell → Site header: includes
- Public pages → Collection cards: renders listings with
- Public pages → Inline search: embeds
- Page shell → Assets and global styles: loads
- Article archive → Feed and agent generation: provides feed content
- AI Unplugged → Feed and agent generation: provides feed content
- Feed and agent generation → Discovery endpoints: generates
- Public pages → Cloudflare Pages/Workers: static build deployed to
- Content detail pages → Cloudflare Pages/Workers: static build deployed to
- Discovery endpoints → Cloudflare Pages/Workers: published by
- Redirect sources → Cloudflare Pages/Workers: applied at deployment
- Pretty-link mappings → Cloudflare Pages/Workers: configures bulk redirects
- Launch QA → Redirect sources: validates
- Launch QA → Cloudflare Pages/Workers: gates release
