Digital Evolution
A chronicle of the architectural and technical refinements that define the Zutra experience.
PropertyCard Carousel & Content Migration
Fixed a visual bug where a blank space appeared below property card images due to Swiper's fade effect stacking slides as absolute elements without explicit height. Also resolved Swiper double-initialization on View Transitions and completed the migration of all properties to a folder-based content structure.
- Swiper fade height fix: With effect: 'fade', Swiper stacks slides as position absolute, causing the wrapper to collapse and show a blank area below images. Added explicit height: 100% to .swiper-wrapper and .swiper-slide via global CSS.
- Swiper double-init guard: astro:page-load re-ran initPropertySwipers on every View Transition, creating duplicate Swiper instances on already-initialized cards. Added a guard (if el.swiper continue) to skip already-initialized carousels.
- Property content migration: All properties migrated from flat .md files to folder structure ([slug]/index.md) with an images/ subdirectory, enabling automatic image resolution via getAllPropertyImages.
- Content schema updated: New src/content/config.ts aligned with the folder-based structure, using area instead of sqft and images as an optional string array.
- PhotoGallery refactored: Component now accepts propertySlug + manualImages and resolves images internally, instead of receiving a pre-processed array.
- Migration scripts added: migrate-properties, copy-images, clean-frontmatter, fix-missing-fields available as npm scripts.
Leaflet Map View Transitions Fix
Resolved a critical initialization bug where Leaflet maps on property detail pages failed to render on the first View Transitions navigation, requiring a hard refresh. Root cause was listener accumulation across navigations.
- Singleton listener pattern: Implemented window._zutraLoadLeaflet to track and replace the astro:page-load listener on each navigation, preventing multiple simultaneous initMap() calls caused by define:vars script re-execution.
- astro:before-swap cleanup: Added a one-time handler that calls map.remove() before each View Transitions DOM swap, destroying Leaflet instances cleanly and preventing zombie event listeners.
- map.remove() on reinit: The initMap() cleanup block now explicitly destroys the existing Leaflet instance before reinitializing, covering reload cases outside of View Transitions.
- Deferred invalidateSize(): A requestAnimationFrame + setTimeout(100ms) call after map creation re-renders tiles once the View Transitions animation has settled and the container has its final dimensions.
- Singleton zutra:map-refresh: Applied the same replace-before-register pattern to the map refresh listener via window._zutraMapRefresh.
Astro 6 Content Layer & SEO Fixes
Resolved critical image serialization and schema issues connected to the Astro 6 content layer, ensuring search modals, dynamic maps, and SEO JSON-LD graphs correctly interpret image urls across the site.
- Image Metadata Integrity: Fixed a breaking issue where Astro 6 Image objects were not properly handled when passing serialized UI data into the Search Modal, Interactive Map, and the PhotoGallery components.
- JSON-LD Schema Optimization: Corrected the nested SEO graph mapping so that search engine crawlers (Google, Bing) correctly interpret absolute URL strings for properties and agents, rather than unrecognized raw object data.
- Favorites Synchronisation: Ensured that properties saved to local storage for the Favorites Drawer use explicit image strings to prevent broken thumbnails on return visits.
Lighthouse 100/100 & Asset Localization
Achieved perfect Lighthouse scores by transitioning to a local optimized asset pipeline and resolving critical accessibility and performance bottlenecks.
- Image Localization: Migrated 60+ remote Unsplash assets to src/assets/img/unsplash/ for zero-dependency reliability.
- Content Schema Optimization: Updated agents and properties collections to use the Astro image() helper for build-time WebP/AVIF generation.
- Performance Audit: Resolved LCP bottlenecks by adding fetchpriority='high' and loading='eager' to all hero elements.
- Astro Assets Integration: Refactored PropertyCard, AgentPreviewCard, and LeadForm to use the optimized <Image /> component.
- Accessibility Remediation: Inverted primary button text colors and adjusted footer contrast to exceed WCAG 2.1 AA parameters.
- Heading Cascade: Realigned heading sequence in Agent Cards and Cookie Banner to eliminate hierarchy skips.
- Contact Route Completion: Resolved 404 error by implementing the /contact page with LeadForm integration.
SEO/GEO Infrastructure & Accessibility Audit
Comprehensive technical audit resolved 15 critical items: auto sitemap, AI discovery manifest, JSON-LD structured data expansion, accessibility fixes, dead code removal, and CSS resilience hardening.
- Auto Sitemap: Integrated @astrojs/sitemap for automatic sitemap-index.xml + sitemap-0.xml generation on every build.
- AI Discovery Manifest: Added public/llms.txt with structured project manifest, routes, schemas, and tech stack for LLM crawlers (ChatGPT, Claude, Perplexity).
- Robots.txt: Created with explicit allow directives for AI bots (GPTBot, CCBot, Google-Extended, anthropic-ai).
- Home Page JSON-LD: Added Organization + WebSite schema with SearchAction potential action for Google sitelinks search.
- Collection Page JSON-LD: Added CollectionPage + ItemList schema to /properties listing with top 12 property entries.
- Dynamic og:type: Property detail pages now use og:type='product' for Open Graph protocol compliance; all other pages remain 'website'.
- Canonical URLs: og:url and twitter:url now use Astro.url.canonical for clean, query-param-free URLs.
- @id Canonical URIs: All JSON-LD schemas now include @id references for cross-page entity linking (Organization → WebSite → RealEstateListing → Place → Address → GeoCoordinates → Offer).
- Mobile Menu ARIA: Added dynamic aria-label and aria-expanded state to the mobile hamburger toggle button.
- Fixed Nested <main>: Replaced invalid <main> wrapper on changelog page with <section> to preserve screen reader landmark integrity.
- Heading Hierarchy: Corrected h4 → h3 on the About page values grid to maintain proper heading cascade.
- Dead Code Removal: Removed unused PropertyListingCard.astro and PropertyMetric.astro components.
- Orphaned Config: Removed unused siteConfig.analytics object (components read directly from import.meta.env).
- Nav Consolidation: Merged duplicate Agents + About header nav entries into single About link.
- CSS Variable Defaults: Added :root fallback values for all brand color tokens to prevent broken UI if Theme Studio is disabled.
- ThemePicker Production Gate: Now only renders in DEV mode or when showThemeStudio is explicitly enabled.
Theme Studio PRO & Multi-Harmony
Redesigned visual identity studio with mathematical color harmony rules, real-time accessibility auditing, and a native mobile bottom-sheet experience.
- Zutra Picker PRO: Redesigned the Theme Studio with an ultra-compact, boutique interface (380px footprint) and zero-flicker CSS variable injection.
- Multi-Harmony Engine: Integrated 5 mathematical color harmony rules (Split-Complementary, Analogous, Triadic, Complementary, Monochromatic) for professional palette generation.
- Live Accessibility Audit: Real-time WCAG 2.1 AA contrast calculation between primary brand colors and canvas surface directly in the picker.
- Mobile Bottom Sheet: Adopted a native mobile sheet architecture (max-h-85vh) with iOS Safe Area support for a premium touch experience.
- Persistence v2: Enhanced localStorage synchronization to handle both preset IDs and complex custom JSON color objects across page transitions.
Marketing Tech Stack
Implementation of an enterprise-grade analytics tracking infrastructure offloaded to Web Workers using Partytown, complete with GDPR consent and semantic data events.
- Partytown Offloading: Integrated @astrojs/partytown to funnel dataLayer.push and gtag variables strictly to Web Workers, securing 100/100 Lighthouse performance.
- GDPR Default Denied: Initialized Google Tag Manager with an inline synchronous script strictly configured to 'denied' analytic states to comply with European privacy laws instantly.
- Boutique Cookie UI: Developed an Alpine.js powered Cookie Banner operating on localStorage states, explicitly pushing positive consent updates through GTM's consent logic upon approval.
- Trafficker Attributes: Injected semantic `data-event-category` and `data-event-action` labels onto high-conversion elements like LeadForm submits and PropertyCard view triggers for seamless Google Ads mapping.
Enterprise Engine
Transformation from a modern template into an enterprise-grade platform with Generative Engine Optimization (GEO), advanced SEO, and WCAG accessibility standards.
- SEO & GEO (RAG): Injected Semantic JSON-LD structures (RealEstateListing > Agent > Organization) into meta heads dynamically.
- BLUF Data Markup: Converted property stat grids to <dl> Description Lists with pure mathematical <data> outputs for AI Reranking pipelines.
- Accessibility (A11y): Fully enforced WCAG Keyboard-Nav standards via focus-visible loops on all interactive arrays.
- Semantic Citations: Wrapped agent biographies in native <blockquote/> and <cite/> elements for direct LLM quote extraction.
- Contrast Upgrades: Refined core 'text-stone' styling across light mode matrices to ensure uncompromising text legibility parameters.
Theme Studio & Architecture v2
Major leap in dynamic customization and codebase scalability for boutique real estate.
- Introduced Theme Studio v2: Floating dynamic theme engine with RGB injection.
- Three Premium Themes: Midnight Velvet (Dark), Golden Hour, and Emerald Estate.
- New 6-Category Architecture: Categorized components into layout, property, map, sections, ui, and dev.
- Dynamic History Engine: Migrated the manual changelog page to an Astro Content Collection system.
- Persistence Engine: Seamless View Transitions for Map and LeadForm components.
- Production Toggles: Added site-config control for the Theme Studio visibility.
Modernization & UI Library
Extracted core visual elements into a modular library and implemented global image robustness.
- Centralized UI library in src/components/ui/ (Button, Badge, Stats).
- Refactored FeaturedProperties, Hero, and Philosophy sections.
- Added intelligent image fallbacks for all property and agent cards.
- Optimized LCP with eager loading and fetchpriority high.
- Standardized class prop usage across the entire platform.
Boutique Foundations
Initial deployment with Astro 6, Tailwind v4, and cinematic View Transitions.
- Dynamic property and agent collections using content layers.
- Native Astro View Transitions for high-end morphing.
- Immersive Hero Section with slow-zoom background parallax.
- Responsive PropertyGrid and TeamGrid layouts.
Curated with precision — Version 1.1.0 Ready