Search

Data-Driven Architecture Migration Summary

What Changed

Your website has been migrated from hardcoded projects to a fully data-driven architecture.

Before & After Comparison

Before: Hardcoded in JavaScript

Adding a Project

  1. Open assets/js/home.js
  2. Find initializeThemes() method
  3. Add ~10 lines of JavaScript:
    scTheme.addProject(new Project(
     'Fluxonium Erasure',
     'Erasure error detection and conversion...',
     '/projects/fluxonium_erasure',
     '/projects/fluxonium_erasure/images/lvl_diagram.png',
     'completed'
    ));
    
  4. Manually update stats in _data/research_themes.yml
  5. Rebuild site

Issues:

After: Data-Driven YAML

Adding a Project

  1. Open _data/projects.yml
  2. Add entry: ```yaml
    • id: fluxonium-erasure title: Fluxonium Erasure description: Erasure error detection and conversion… url: /projects/fluxonium_erasure image: /projects/fluxonium_erasure/images/lvl_diagram.png status: completed themes:
    • superconducting
    • qec ```
  3. Rebuild site

Benefits:

Files Created

Data Layer

_data/
├── projects.yml               ← NEW: All project data
└── research_themes.yml        ← MODIFIED: Removed hardcoded stats

Build Layer

_plugins/
└── theme_stats_generator.rb   ← NEW: Auto-calculates stats

projects-data.json              ← NEW: Auto-generated API

Documentation

DATA_DRIVEN_ARCHITECTURE.md     ← NEW: Complete guide
QUICK_START_DATA_DRIVEN.md      ← NEW: Quick reference
DATA_DRIVEN_MIGRATION_SUMMARY.md ← NEW: This file
_data/README.md                 ← UPDATED: New instructions

Code Updated

assets/js/home.js              ← MODIFIED: Now loads from JSON

What Stayed the Same

New Features

1. Multi-Theme Projects

Projects can now belong to multiple themes:

themes:
  - superconducting
  - qec              # Shows in both themes!

2. Auto-Calculated Stats

Stats are computed automatically:

3. JSON API

/projects-data.json provides:

4. Better Separation

Migration Details

Projects Migrated

All 12 existing projects moved to projects.yml:

Superconducting (4 projects):

QEC (6 projects total, 3 dedicated + 3 shared):

Tensor Networks (2 projects):

Neural Networks (3 projects):

Stats Verification

Auto-calculated stats match the previous manual counts:

How It Works Now

┌─────────────────┐
│  Edit YAML      │  ← You edit _data/projects.yml
│  projects.yml   │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│  Jekyll Build   │  ← Plugin auto-calculates stats
│  + Plugin       │
└────────┬────────┘
         │
         ├──────────────────┐
         ▼                  ▼
┌─────────────────┐  ┌─────────────────┐
│  index.html     │  │  projects-data  │  ← Generated files
│  with stats     │  │  .json          │
└────────┬────────┘  └────────┬────────┘
         │                    │
         │                    ▼
         │           ┌─────────────────┐
         │           │  JavaScript     │  ← Loads JSON
         │           │  home.js        │
         │           └────────┬────────┘
         │                    │
         └────────────┬───────┘
                      ▼
            ┌─────────────────┐
            │  Rendered Page  │  ← Final output
            │  with themes    │
            └─────────────────┘

Testing

Build Test

bundle exec jekyll build

Expected output:

Theme Stats: Auto-calculated project counts for 4 themes
                    done in 0.119 seconds.

JSON Verification

Check /projects-data.json:

Visual Test

  1. Run bundle exec jekyll serve
  2. Visit http://localhost:4000
  3. Verify:
    • All 4 themes appear
    • Stats match expectations
    • Projects show in theme blocks
    • Clicking themes expands properly

Rollback Plan (If Needed)

If issues arise, rollback is simple:

  1. Revert assets/js/home.js to previous version
  2. Delete new files:
    • _data/projects.yml
    • _plugins/theme_stats_generator.rb
    • projects-data.json
  3. Restore stats to _data/research_themes.yml
  4. Rebuild site

Note: The new system has been tested and should work smoothly!

Future Enhancements

Phase 1: Current (Completed)

Phase 2: Auto-Discovery (Future)

Use Jekyll collections to auto-discover projects from markdown files:

# In project markdown frontmatter
---
title: Fluxonium Erasure
project_id: fluxonium-erasure
themes: [superconducting, qec]
status: completed
image: images/lvl_diagram.png
---
Project content here...

Benefit: Add projects by creating one file, no YAML editing needed.

Phase 3: Advanced Features (Ideas)

Performance Impact

Conclusion

The migration is complete and successful:

You can now manage all project content by editing YAML files - no code changes needed!

Quick Reference

Add Project

Edit _data/projects.yml, rebuild

Update Status

Change status field, rebuild

Add Theme

Edit _data/research_themes.yml + create SVG icon, rebuild

Check Stats

Run bundle exec jekyll build, see console output

Support


Migration Date: 2025-10-02
Status: ✅ Complete
Breaking Changes: None (backward compatible)