How rohithkumar6/morphing-ui-magic works
MorphUI is a browser-based demonstration of an evolving, self-optimizing landing page. Visitors interact with the page; the evolution hook tracks engagement, scores the current genome, and can mutate, reset, or reload it, while the page renders the genome and its fitness/history. The graph captures the sampled calls and imports; several visual components are indexed but not fully shown, so links involving them are limited to relationships visible in the page excerpt or source index. No external persistence or analytics service is evidenced.
Main entry points: Index.tsx Evolution page · genome.ts Genome genetics · useEvolution.ts Evolution state · EvolvedHero.tsx Evolved hero
Components 15
Page experience
- App routing
src/App.tsx - Evolution page
src/pages/Index.tsx
Evolution runtime
- Evolution state
src/hooks/useEvolution.ts - Genome genetics
src/lib/genome.ts - Fitness scoring
src/lib/fitness.ts
Evolution displays
- Evolved hero
src/components/EvolvedHero.tsx - DNA helix
src/components/DNAHelix.tsx - Fitness display
src/components/FitnessDisplay.tsx - Genome visualizer
src/components/GenomeVisualizer.tsx - Evolution controls
src/components/EvolutionControls.tsx - Evolution history
src/components/EvolutionHistory.tsx - Organic background
src/components/OrganicBackground.tsx
Shared UI
- Button primitive
src/components/ui/button.tsx - Class utilities
src/lib/utils.ts
Other components
- Visitor
Connections 19
- Visitor → App routing: opens app
- App routing → Evolution page: routes to
src/App.tsx - Evolution page → Evolution state: uses state
src/pages/Index.tsx - Evolution page → Evolved hero: renders
src/pages/Index.tsx - Evolution page → DNA helix: renders
src/pages/Index.tsx - Evolution page → Fitness display: renders
src/pages/Index.tsx - Evolution page → Genome visualizer: renders
src/pages/Index.tsx - Evolution page → Evolution controls: renders
src/pages/Index.tsx - Evolution page → Evolution history: renders
src/pages/Index.tsx - Evolution page → Organic background: renders
src/pages/Index.tsx - Evolution state → Genome genetics: generates and mutates
src/hooks/useEvolution.ts - Evolution state → Fitness scoring: scores engagement
src/hooks/useEvolution.ts - Evolved hero → Genome genetics: reads traits
src/components/EvolvedHero.tsx - DNA helix → Genome genetics: reads genome
src/components/DNAHelix.tsx - Fitness display → Fitness scoring: uses scoring
src/components/FitnessDisplay.tsx - Genome visualizer → Genome genetics: reads genome
src/components/GenomeVisualizer.tsx - Evolution history → Genome genetics: reads genomes
src/components/EvolutionHistory.tsx - Evolved hero → Button primitive: uses
src/components/EvolvedHero.tsx - Button primitive → Class utilities: merges classes
src/components/ui/button.tsx