eComX Build Log — Phase 4: Content as Infrastructure
The content layer was the hardest phase — not because of complexity, but because content systems require different thinking. MDX pipelines, SEO infrastructure, case studies, and this journal. 45 commits to make content a first-class citizen.
The Content Challenge
Phases 1-3 were infrastructure: design systems, page layouts, payment flows. Technical problems with technical solutions.
Phase 4 was different. Content isn't a technical problem — it's an architectural problem. How do you build a system that makes content easy to write, easy to organize, easy to discover, and easy to maintain over time?
The answer: treat content as infrastructure, not as an afterthought.
MDX: Markdown With Superpowers
MDX Content Pipeline
Markdown meets React. 30 journal articles + 7 case studies powered by one content system.
The content system uses MDX — Markdown with embedded React components. This means journal entries and case studies are written in Markdown for readability:
## The Problem With Prompts
Every AI tutorial starts the same way: "Write a better prompt."
But when you need interactivity — a pricing comparison table, an animated diagram, a live code example — you drop in a React component:
<PlanningTree project="ecomx" phase={3} depth={2} />
The MDX pipeline:
- Content lives in
src/content/— organized by type (journal, case studies) - Gray-matter parses frontmatter — title, date, excerpt, pillar, readTime
- Next.js generates static pages — every entry becomes a pre-rendered route
- Components render within content — interactive elements embedded in narrative
The Content Type System
Each content type has a defined schema:
Journal Entries:
title: string # Display title
date: date # Publication date
pillar: enum # the-system | the-story | the-proof | the-workshop
excerpt: string # Card/list description
readTime: string # Estimated read time
featured: boolean # Highlighted on the journal index
Case Studies:
title: string
client: string
industry: string
outcomes: string[] # Measurable results
technologies: string[]
featured: boolean
The schema ensures consistency. Every journal entry has a pillar. Every case study has measurable outcomes. No content ships without metadata.
SEO Infrastructure
SEO isn't a marketing task — it's an engineering task. Phase 4 built it as infrastructure:
Dynamic Sitemap: sitemap.xml auto-generates from the content registry. New journal entries are discoverable by search engines without manual sitemap updates.
Robots.txt: Configurable crawl directives. The debug dashboard, API routes, and admin pages are explicitly excluded.
Structured Data: JSON-LD schema markup for articles (journal entries) and case studies. Search engines understand the content type, author, publication date, and organization.
Open Graph: Dynamic OG images generated via the /api/og route. Each journal entry and case study gets a branded social share image with the title, pillar, and eComX branding.
Meta Tags: Title, description, and canonical URL generated from frontmatter. No manual meta tag management — the content system handles it.
The Case Study System
Seven case studies, each telling a different story:
| Project | Domain | Key Result |
|---|---|---|
| Celtic Knot | eCommerce | 620% ROI improvement |
| Infinite Awakening | Spiritual Wellness | 133-card deck + 30K-word fable |
| Genesis-Witness | Scientific Research | Published Zenodo hypothesis |
| AriaOS | Multi-Agent Platform | Orchestration kernel |
| Emmalish | Gamified SaaS | Reciprocity-first marketplace |
| KohWork | Thai Marketplace | Hyperlocal service platform |
Each case study follows the same structure: challenge, approach (mapped to methodology steps), implementation highlights, and measurable results. Consistency of structure makes comparison easy and credibility clear.
The Journal System
This journal — the content you're reading now — was built as part of Phase 4. The architecture:
- Pillar-based organization: System, Story, Proof, Workshop
- Chronological ordering: Entries sorted by date, newest first
- Featured filtering: Highlight entries surface on the index page
- Read time estimation: Calculated from word count during build
The journal isn't a blog. It's a build log. Every entry maps to a methodology step, a project milestone, or a proof point. The pillar system ensures balanced coverage across theory (System), narrative (Story), evidence (Proof), and practice (Workshop).
The Gap That Almost Wasn't Caught
Phase 4's gap analysis (/analyze-gaps) caught a critical oversight: the content system had no canonical URL strategy.
Without canonical URLs, if the same content is accessible at /journal/2026-03-05-the-constraint-architecture and /en/journal/2026-03-05-the-constraint-architecture, search engines would treat these as duplicate pages and penalize both.
The fix: explicit canonical URL generation in the content layout, using the primary locale as the canonical reference. A 10-minute fix in gap analysis that would have been a weeks-long SEO debugging nightmare if discovered after indexing.
This is why /analyze-gaps exists. The gap was in the plan, not the code. Catching it before execution prevented it from becoming a production SEO issue.
The 45-Commit Delivery
Phase 4 was the largest in commit count (45) despite being architecturally simpler than Phase 3. Why? Content has more surface area:
- Plan 01: MDX infrastructure (pipeline, renderers, content types)
- Plan 02: Journal index and entry pages
- Plan 03: Case study system
- Plan 04: SEO infrastructure (sitemap, robots, structured data, OG images)
- Plan 05: Content creation (initial journal entries)
- Plan 06: i18n content (English + Thai)
- Plan 07: Social sharing and metadata
- Plan 08: Content verification and gap closure
Each plan had its own commits, its own summary, its own deviation log. The 45 commits tell the complete story of how content went from "empty /content/ directory" to "SEO-optimized, internationally-aware build log with 7 case studies and 25 journal entries."
Content as a Competitive Advantage
The eComX content system isn't just a blog attached to a marketing site. It's the primary proof mechanism for the entire methodology.
When someone asks "does Context-First work?" — the answer isn't a testimonial or a case study PDF. It's this journal. 25 entries documenting every step, every decision, every result. Searchable, shareable, SEO-indexed.
The content system makes the methodology auditable. Every claim has a corresponding entry. Every result has a corresponding case study. Every step has a corresponding build log.
That's content as infrastructure. And it took 45 commits to build properly.
Want to apply this to your brand?