Skip to content

Phase 1 - Content & Data Architecture

Done

  • Track: Both (MVP & Showcase)
  • Duration: 1-2 days
  • Dependencies: Phase 0 (Foundation) completed
  • Deliverables: Content schema, TypeScript types, URL strategy, content fixtures
  • [x] Astro project initialized
  • [x] TypeScript configured in strict mode
  • [x] Development environment functional
  • [x] Content requirements gathered
StepTaskMVPShowcaseNotes
1.01Inventory content typesList all content needs
1.02Design URL structureSEO-friendly paths
1.03Create content collectionsDefine in config.ts
1.04Define collection schemasZod schemas
1.05Add draft mechanismBoolean field
1.06Generate TypeScript typesAuto from schemas
1.07Create slug utilitiesConsistent URL generation
1.08Set up MDX componentsCustom elements
1.09Create content fixturesOne per type
1.10Add frontmatter validationastro check
1.11Document content modelCHANGELOG.md
1.12Create content guidelinesFor authors
  1. Overly Complex Schemas: Starting with too many fields

    • Solution: Add fields as needed, start minimal
  2. Missing Draft Field: Accidentally publishing unfinished content

    • Solution: Make draft:true the default, explicitly set to false
  3. Inconsistent Slugs: URLs that change breaking links

    • Solution: Generate slugs once, store in frontmatter
  4. Type Mismatches: Schema doesn’t match actual content

    • Solution: Use fixtures to test schemas early
  • [x] All content types identified and documented
  • [x] URL structure defined and consistent
  • [x] Content collections configured with schemas
  • [x] TypeScript types generating correctly
  • [x] Draft mechanism implemented and tested
  • [x] Slug generation utilities working
  • [x] MDX components configured
  • [x] At least one fixture per content type
  • [x] Validation passing with astro check
  • [x] Content model changelog created
  • [x] Author guidelines documented

If content architecture needs changes:

  1. Schema Changes:

    Terminal window
    # Create migration script
    node scripts/migrate-content.js --from v1 --to v2
  2. URL Structure Changes:

    • Set up redirects in astro.config.mjs
    • Update all internal links
    • Submit new sitemap
  3. Collection Rename:

    • Move files to new location
    • Update imports
    • Clear .astro cache
  • src/content/config.ts - Collection schemas
  • src/utils/url-utils.ts - URL patterns
  • src/content/*/ - Content examples
  • Content model changelog
  • “Create Astro content collection schema for [type]”
  • “Generate TypeScript types from content schema”
  • “Set up MDX components for rich content”
  • “Create URL structure for SEO”
  • Types of content (blog, portfolio, etc.)
  • URL preferences (with/without dates)
  • Required metadata fields
  • Future content plans

Return to Phase 0: Foundation Decisions | Proceed to Phase 2: Design System Tokens