Designing a multi-site structure can easily lead to maintenance chaos if handled poorly. Copy-pasting components, duplicating style configs, and managing distinct deployment pipelines for five different websites is a developer's nightmare. For the Lunaria project, I bypassed this by deploying everything inside a single, unified monorepo. This setup is built around the POSSE principle (Publish on Own Site, Syndicate Elsewhere) to ensure that the primary, authoritative content source always resides within our own owned namespace, preserving E-E-A-T signals.
Monorepo Architecture & POSSE Implementation
The codebase is organized into independent application directories and shared packages. Under the POSSE principle, our satellites act as the absolute canonical source of truth. Any external syndication (to social networks, Telegram channels, or B2B directories) pulls directly from our structured data endpoints. We chose Bun Workspaces and Turborepo to manage package dependencies and optimize execution caching.
- @lunaria/brand: Houses brand colors, typography tokens, vector logos, and global image assets, ensuring absolute visual consistency.
- @lunaria/ui: A library of modular React components (cards, forms, buttons, dialogs) optimized for atomic reuse across all domains.
- @lunaria/content: Manages MDX-based content parsing, automated XML sitemap generation, RSS feeds, and structured Schema.org metadata.
The Rendering Choice: SSG/SSR vs. Client-Side Hydration
One of the biggest technical pitfalls in modern GEO is relying on client-side React rendering (Single Page Apps). AI crawlers like PerplexityBot and Gemini's parser are highly optimized for speed; they fetch the raw static HTML and rarely wait for complex JavaScript hydration cycles. If your page serves an empty container that React hydrates on the client, the AI parser will index a blank screen, dropping you out of the retrieval candidates.
For Lunaria, we implemented strict Static Site Generation (SSG) with incremental hydration. Every page loads as a clean, fully formed static HTML document containing pre-rendered text blocks and inlined JSON-LD metadata. This guarantees that AI engines can extract our semantic data chunks within milliseconds of initiating a crawl, with zero rendering execution costs on their end.
Open Robots Policy & Sitemap Index Optimization
To facilitate deep indexation, we configured our robots.txt to explicitly permit all modern AI agents. Unlike standard setups that block crawlers to save bandwidth, we leverage caching at the edge (via Vercel and Cloudflare) to absorb bot traffic without server load. We also deployed a structured sitemap index that dynamically registers every satellite's static paths, providing a clear map for Perplexity and Gemini to discover new content updates within minutes.
The MDX-based Headless CMS Layer
For content rendering, I built a headless layer that reads static MDX files directly from the filesystem. I chose MDX because it allows editors to insert custom interactive React components—such as dynamic flower cost calculators or interactive map widgets—directly inside standard Markdown text. The content parsing engine uses next-mdx-remote to compile files on the server side, keeping the client bundle lightweight.
Automating Sitemaps and Schema.org Metadata
- Multi-domain Sitemaps: I wrote a custom node script executed after builds that generates individual static XML sitemaps for each satellite domain name.
- Dynamic JSON-LD Injection: The MDX parsing pipeline automatically injects valid Schema.org breadcrumbs, author profiles, and geographic tags.
The Editorial Pipeline Automation (n8n + Gemini)
To feed multiple active blogs without overloading the writing staff, I integrated n8n as the workflow orchestrator. The pipeline functions in four steps: first, n8n monitors Google Trends, competitors' keywords, and Yandex autocomplete suggestions. Second, a query is sent to the Gemini API to compile detailed research outlines and initial article drafts in Russian. Third, a team of editors receives the drafts in a dashboard, refining the tone of voice and injecting local Kazan landmarks. Finally, once approved, the system generates static MDX files that are committed and deployed automatically.
“Automation should not replace the author. It should eliminate routine research, allowing editors to focus entirely on quality and details.”
“The best infrastructure is the one you don't have to duplicate.”
Key Benefits of the Architecture
- Developer Efficiency: Updating a component in @lunaria/ui immediately rolls out the update across all five domain satellites.
- SEO Isolation: If one satellite runs into indexing problems, the other domains remain unaffected, shielding the brand.
- Incremental Builds: Turborepo detects which apps changed and builds/деплоит только измененные сателлиты, сохраняя время сборки в пределах минуты.
Using this unified monorepo structure, launching a new regional satellite now takes me less than 2 hours of configuration and zero new infrastructure costs.
Danya Yudin (Sabraman)
Designer & Frontend Engineer
Design-led frontend and product developer specializing in web applications, interface design, and Telegram systems.