/** * Layer & Mesh — Product Page Seed Script (FIXED) * * FIX: All 'navy' select values replaced with 'dark'. * The LM block configs don't include 'navy' as a valid option. * If 'dark' doesn't work either, run discover-valid-values.mjs * to find the correct values for your block select fields. * * Seeds 2 pages: * 1. Virtual Fiber (slug: virtual-fiber) * 2. Virtual Datacenter (slug: virtual-datacenter) * * Usage: * PAYLOAD_API_URL=http://localhost:3000 PAYLOAD_API_KEY=your_key node seed-lm-products.mjs * * Pages are created as DRAFTS. Publish manually in /admin after reviewing. * Images: attach manually post-seed — slots are noted inline as comments. */ const BASE_URL = process.env.PAYLOAD_API_URL || 'http://localhost:3000' const API_KEY = process.env.PAYLOAD_API_KEY if (!API_KEY) { console.error('❌ Set PAYLOAD_API_KEY environment variable first.') process.exit(1) } const headers = { 'Content-Type': 'application/json', Authorization: `users API-Key ${API_KEY}`, } function richText(text) { return { root: { type: 'root', format: '', indent: 0, version: 1, direction: 'ltr', children: [{ type: 'paragraph', format: '', indent: 0, version: 1, textFormat: 0, textStyle: '', children: [{ type: 'text', text, format: 0, style: '', mode: 'normal', version: 1, detail: 0 }], }], }, } } async function createPage(data) { const res = await fetch(`${BASE_URL}/api/pages?locale=sv`, { method: 'POST', headers, body: JSON.stringify({ ...data, _status: 'draft' }), }) const json = await res.json() if (!res.ok) { console.error(`❌ Failed to create "${data.title}":`, JSON.stringify(json?.errors ?? json, null, 2)) return null } console.log(`✅ Created: "${data.title}" — id: ${json.doc?.id} slug: /${json.doc?.slug}`) return json.doc } // ───────────────────────────────────────────────────────────────────────────── // PAGE 1: VIRTUAL FIBER // ───────────────────────────────────────────────────────────────────────────── // Positioning: High-performance private WAN connectivity — dedicated bandwidth // over the Layer & Mesh mesh network. No public internet. Runs between offices, // datacenters, and cloud endpoints. Key angle: Swedish companies with US // operations who need a private, GDPR-safe path between continents. const virtualFiberPage = { title: 'Virtual Fiber', slug: 'virtual-fiber', layout: [ // ── Hero ── // IMAGE SLOT: Abstract fiber/light-paths visual, dark background { blockType: 'lmAlternateHero', heading: 'Private Connectivity at Fiber Speed', description: 'Virtual Fiber gives your business a dedicated, private bandwidth path — no shared internet, no traffic contention, no surprises. Whether you\'re connecting offices across the US, linking a Stockholm HQ to a New York branch, or building a direct cloud on-ramp, Virtual Fiber delivers predictable, low-latency performance at scale.', primaryCtaText: 'Request a Quote', primaryCtaLink: '/contact', secondaryCtaText: 'See Technical Specs', secondaryCtaLink: '#specs', sectionBackground: 'dark', }, // ── What is Virtual Fiber ── // IMAGE SLOT: Clean network diagram — two office nodes connected by a glowing path { blockType: 'lmCtaSideImage', heading: 'Dedicated bandwidth. Not shared. Not "up to."', body: 'Traditional internet connections share capacity with thousands of other businesses. Virtual Fiber is different — it provisions a dedicated logical circuit across the Layer & Mesh mesh network, delivering your committed bandwidth 100% of the time. Think of it as a private lane on the network highway: your traffic never competes, never slows, and never takes a detour through the public internet.', ctaText: 'Talk to an Engineer', ctaLink: '/contact', imagePosition: 'right', theme: 'dark', }, // ── Tech specs callout ── { blockType: 'lmTechProperties', anchorId: 'specs', properties: [ { category: 'Bandwidth Options', value: '100M – 100G' }, { category: 'Latency', value: '<1ms metro' }, { category: 'Availability SLA', value: '99.99%' }, { category: 'Encryption', value: 'MACsec / AES-256' }, ], sectionBackground: 'dark', categoryColor: 'white', valueColor: 'yellow', }, // ── Use cases — 6 tile grid ── { blockType: 'lmCardGrid', layout: '1-1-1', cardStyle: 'gray', sectionBackground: 'dark', cards: [ { displayMode: 'content', heading: 'Multi-Site Office Connectivity', contentLines: [ { text: 'Connect branch offices, HQ, and remote sites over a private backbone — no VPN patchwork, no latency variance.', style: 'normal' }, ], }, { displayMode: 'content', heading: 'Datacenter Interconnect', contentLines: [ { text: 'High-throughput, sub-millisecond links between colocation facilities, private DCs, and cloud edge nodes.', style: 'normal' }, ], }, { displayMode: 'content', heading: 'Cloud Direct Connect', contentLines: [ { text: 'Skip the public internet entirely for AWS, Azure, and GCP — dedicated on-ramp with guaranteed bandwidth.', style: 'normal' }, ], }, { displayMode: 'content', heading: 'Backup & Replication Links', contentLines: [ { text: 'Predictable throughput for continuous data replication between primary and DR sites — no surprise throttling.', style: 'normal' }, ], }, { displayMode: 'content', heading: 'SD-WAN Underlay', contentLines: [ { text: 'Use Virtual Fiber as a premium transport path in your SD-WAN policy — route latency-sensitive apps over dedicated circuits automatically.', style: 'normal' }, ], }, { displayMode: 'content', heading: 'Transatlantic Private WAN', contentLines: [ { text: 'Connect your US operations directly to your Swedish or European infrastructure — private, encrypted, and compliant by design.', style: 'normal' }, ], }, ], }, // ── Swedish companies in the US — the differentiator angle ── { blockType: 'lmWideCard', heading: 'Swedish operations in the US? This was built for you.', body: 'Hundreds of Swedish companies have a footprint in the United States — from single-employee outposts to full subsidiary operations. They share a common problem: how do you maintain a fast, secure, and GDPR-compliant connection between your US team and your Swedish infrastructure?\n\nVirtual Fiber provides a private transatlantic path that keeps your data off the public internet, your compliance team satisfied, and your Stockholm engineers actually reachable from New York. No more slow VPNs. No more wondering which jurisdiction your data crossed.', ctaText: 'Talk to Our Team', ctaLink: '/contact', cardBackground: 'dark', buttonColor: 'yellow', sectionBackground: 'dark', }, // ── USP checklist ── { blockType: 'lmUspChecklist', heading: 'Why Virtual Fiber Over Standard Internet', items: [ { text: 'Committed bandwidth — your full allocation, 24/7, not a "best effort" estimate' }, { text: 'No public internet exposure — traffic never leaves the Layer & Mesh network fabric' }, { text: 'MACsec / AES-256 encryption in transit — required for GDPR, HIPAA, and SOC 2 workloads' }, { text: 'Sub-1ms metro latency — critical for real-time applications, VoIP, and database replication' }, { text: '99.99% SLA backed by diverse physical paths — not a marketing claim' }, { text: 'Symmetric upload and download — no asymmetric throttling on backup or replication jobs' }, { text: 'Scales from 100 Mbps to 100 Gbps — no hardware swaps, provisioned in software' }, ], checkColor: 'yellow', sectionBackground: 'dark', textColor: 'white', }, // ── FAQ ── { blockType: 'lmFaq', heading: 'Virtual Fiber — Common Questions', items: [ { question: 'How is Virtual Fiber different from a regular internet connection?', answer: richText('A standard internet connection is shared — you\'re competing for bandwidth with every other customer on that circuit. Virtual Fiber provisions a dedicated logical path across the Layer & Mesh mesh network. Your committed bandwidth is always available, latency is consistent, and your traffic doesn\'t touch the public internet.'), }, { question: 'Can Virtual Fiber connect to locations outside the Layer & Mesh network?', answer: richText('Yes. We extend Virtual Fiber circuits to customer premises via our physical PoP infrastructure and carrier peering agreements. For transatlantic connections, we partner with tier-1 submarine cable operators to extend the private path between the US and Europe.'), }, { question: 'What bandwidth tiers are available?', answer: richText('Virtual Fiber is available from 100 Mbps through 100 Gbps. Bandwidth is provisioned in software, so upgrades take hours not weeks. We offer burstable options if you need guaranteed baseline with occasional headroom.'), }, { question: 'Is Virtual Fiber GDPR compliant?', answer: richText('Yes. Because traffic never traverses the public internet and the Layer & Mesh network operates under documented data handling policies, Virtual Fiber is a suitable transport layer for GDPR-regulated data flows — including personal data transferred between the EU and the US under the EU-US Data Privacy Framework.'), }, { question: 'How long does provisioning take?', answer: richText('Metro connections within our existing PoP footprint typically provision in 2–5 business days. Long-haul and transatlantic circuits depend on last-mile access and typically take 10–20 business days. We provide a firm delivery date at time of order.'), }, { question: 'What happens if the circuit goes down?', answer: richText('Virtual Fiber runs over physically diverse paths in the Layer & Mesh mesh. In the event of a path failure, traffic reroutes automatically — most customers see sub-second failover. Our 24/7 NOC monitors every circuit and proactively alerts you before most issues affect service.'), }, ], theme: 'gray', }, // ── CTA ── { blockType: 'lmCtaBanner', heading: 'Build your private network backbone.', subheading: 'Tell us your locations and bandwidth needs — we\'ll design a circuit and quote within 24 hours.', ctaText: 'Request a Quote', ctaLink: '/contact', sectionBackground: 'dark', alignment: 'center', size: 'large', }, ], } // ───────────────────────────────────────────────────────────────────────────── // PAGE 2: VIRTUAL DATACENTER // ───────────────────────────────────────────────────────────────────────────── // Based on the LM "Delad vDC" Swedish reference, rewritten for the US market. // Key angles: // — Shared cloud compute without hyperscaler lock-in // — Swedish sovereignty: GDPR-compliant by architecture, not just policy // — Sustainability: shared resources = real carbon reduction // — Swedish companies in the US: keep data in Sweden, access it from anywhere // — No big upfront hardware spend; pay for what you use const virtualDatacenterPage = { title: 'Virtual Datacenter', slug: 'virtual-datacenter', layout: [ // ── Hero ── // IMAGE SLOT: Abstract datacenter / cluster visual — cool dark tones { blockType: 'lmHero', heading: 'Your Infrastructure. Without the Infrastructure.', subheading: 'Cloud compute that\'s actually yours — sovereign, scalable, and carbon-efficient.', body: 'The Layer & Mesh Virtual Datacenter gives your business dedicated access to enterprise-grade compute, storage, and networking — without buying, racking, or managing a single server. Built on our mesh network across geographically separated facilities, and designed from day one for businesses that care where their data lives.', ctaText: 'Start a Conversation', ctaLink: '/contact', secondaryCtaText: 'See Technical Specs', secondaryCtaLink: '#vdc-specs', theme: 'dark', textColor: 'auto', }, // ── Stats ── { blockType: 'lmStatistics', stats: [ { number: '3', label: 'Geographically Separated Facilities' }, { number: '99.99%', label: 'Availability SLA' }, { number: '0', label: 'Hardware Purchases Required' }, { number: '<30min', label: 'New VM Provisioning Time' }, ], sectionBackground: 'dark', numberColor: 'gradient', }, // ── What is it ── // IMAGE SLOT: Clean diagram showing shared resource pools → isolated VMs { blockType: 'lmCtaSideImage', heading: 'Shared resources. Completely isolated data.', body: 'A Virtual Datacenter gives your business direct access to large pools of CPU, RAM, SSD, and disk capacity — managed through a clean web dashboard. The resources are shared across the cluster for efficiency, but your data and workloads are fully isolated from every other tenant. Think of it as having your own datacenter floor, without owning the building.', ctaText: 'See How It Works', ctaLink: '/contact', imagePosition: 'right', theme: 'dark', }, // ── Three pillars: Climate / Scalable / Simple ── { blockType: 'lmCardGrid', layout: '1-1-1', cardStyle: 'dark', sectionBackground: 'dark', cards: [ { displayMode: 'content', heading: 'Climate-Smart by Design', contentLines: [ { text: 'Physical servers sit idle 60–80% of the time. Shared virtualization eliminates that waste — the same compute serves many workloads, dramatically reducing the hardware footprint and energy consumption per unit of work.', style: 'normal' }, { text: 'Layer & Mesh facilities run on renewable energy and recover waste heat. You use only what you need, when you need it.', style: 'normal' }, ], }, { displayMode: 'content', heading: 'Scales in Minutes, Not Months', contentLines: [ { text: 'Ordering, shipping, racking, and configuring physical hardware takes weeks or months. In the Virtual Datacenter, scaling CPU, RAM, or storage is a dashboard operation — done in minutes.', style: 'normal' }, { text: 'Whether you\'re launching a new project, handling a seasonal spike, or downsizing after a migration — you match resources to actual demand, not anticipated demand.', style: 'normal' }, ], }, { displayMode: 'content', heading: 'Managed by Us. Run by You.', contentLines: [ { text: 'The cluster is maintained and monitored by Layer & Mesh engineers around the clock. Firmware updates, hardware failures, capacity management — handled. You log into the dashboard and focus on running your applications.', style: 'normal' }, { text: 'A file server or development environment can be provisioned and online within 30 minutes — accessible from your office LAN or any secure connection.', style: 'normal' }, ], }, ], }, // ── Tech specs ── { blockType: 'lmTechProperties', anchorId: 'vdc-specs', properties: [ { category: 'vCPU', value: 'Up to 64 cores' }, { category: 'RAM', value: 'Up to 512 GB' }, { category: 'SSD Storage', value: 'Up to 20 TB' }, { category: 'Network', value: '1–25 Gbps internal' }, ], sectionBackground: 'dark', categoryColor: 'white', valueColor: 'yellow', }, // ── Swedish sovereignty angle — key differentiator for US market ── { blockType: 'lmWideCard', heading: 'Swedish company. US operations. Where does your data live?', body: 'If your business is Swedish-owned, Swedish-operated, or subject to GDPR — this question matters enormously. Storing customer or employee data in US hyperscaler infrastructure creates real compliance exposure under both GDPR and the EU-US Data Privacy Framework.\n\nThe Layer & Mesh Virtual Datacenter keeps your data in Swedish-jurisdiction facilities, with Swedish ownership and governance, while giving your US-based employees fast, secure access to every resource they need. No compliance grey areas. No data sovereignty tradeoffs. No surprise subpoenas to cloud providers you\'ve never heard of.', ctaText: 'Discuss Your Compliance Needs', ctaLink: '/contact', cardBackground: 'dark', buttonColor: 'yellow', sectionBackground: 'dark', }, // ── Use cases — who is this for ── { blockType: 'lmServicesGrid', heading: 'Common Use Cases', columns: '3', services: [ { title: 'Replace On-Premises Servers', description: 'Stop buying, racking, and maintaining physical servers. Migrate workloads to virtual machines — same performance, a fraction of the overhead.', }, { title: 'Development & Test Environments', description: 'Spin up isolated dev or staging environments in minutes. Tear them down when the sprint ends. Pay only for the hours used.', }, { title: 'Business Applications', description: 'Host ERP systems, file servers, print servers, databases, and internal tools — accessible from any office location over your LAN or VPN.', }, { title: 'Cross-Atlantic Collaboration', description: 'US teams access the same applications and file systems as Stockholm colleagues — fast, secure, and without data leaving Swedish jurisdiction.', }, { title: 'Disaster Recovery', description: 'Replicate on-premises workloads to the Virtual Datacenter for fast failover — activate your DR environment in minutes, not days.', }, { title: 'Regulated Data Processing', description: 'Process GDPR-regulated, HIPAA-adjacent, or sensitive customer data in a facility with documented jurisdiction, ownership, and security certifications.', }, ], }, // ── Add-on services ── { blockType: 'lmUspTable', heading: 'Optional Add-Ons', rows: [ { title: 'Firewall as a Service (FWaaS)', description: richText('Centralized, virtualized firewall managed by Layer & Mesh. Define rules that apply across one or multiple VLANs — protects your Virtual Datacenter environment without requiring you to maintain firewall hardware or configurations yourself.'), }, { title: 'Private VLAN', description: richText('Extend your office LAN directly into the Virtual Datacenter — Virtual Machines appear on the same network as your physical workstations. Ideal for seamless file sharing, printing, and application access without any VPN friction for end users.'), }, { title: 'Colocation', description: richText('When a pure virtualization environment doesn\'t fit your requirements, combine Virtual Datacenter with physical colocation. Run specialized hardware alongside virtual workloads, connected at wire speed within the same facility.'), }, { title: 'Managed Backup', description: richText('Automated daily backups of Virtual Machine snapshots, stored in a geographically separate facility within the Layer & Mesh mesh. Configurable retention periods and one-click restore via the management portal.'), }, { title: 'Virtual Fiber Integration', description: richText('Connect your US office directly to the Virtual Datacenter via a Layer & Mesh Virtual Fiber circuit — private, encrypted, and off the public internet. Eliminates VPN complexity and delivers datacenter-class connectivity to any office.'), }, ], checkColor: 'yellow', sectionBackground: 'dark', textColor: 'white', }, // ── FAQ ── { blockType: 'lmFaq', heading: 'Virtual Datacenter — Common Questions', items: [ { question: 'How is this different from AWS, Azure, or Google Cloud?', answer: richText('The major hyperscalers are headquartered in the United States and operate under US jurisdiction — including the CLOUD Act, which allows US authorities to compel data access regardless of where servers are physically located. Layer & Mesh is a Swedish company, operating Swedish-jurisdiction facilities, with no US parent entity. For businesses subject to GDPR or with data sovereignty requirements, this distinction is significant. We\'re also considerably simpler — no 200-item service catalog, no unexpected egress fees, no certification maze.'), }, { question: 'Is my data isolated from other customers?', answer: richText('Yes. Resources are shared at the hardware level for efficiency, but every tenant\'s data, network traffic, and Virtual Machines are completely isolated. Your VMs cannot communicate with or access other customers\' environments. This is standard hypervisor-level isolation, audited and certified.'), }, { question: 'What operating systems can I run?', answer: richText('Any x86-64 operating system: Linux (all major distributions), Windows Server, FreeBSD, and others. We provide standard OS templates for fast provisioning, or you can upload your own ISO. Windows Server licensing can be included in your subscription or brought under your own agreement.'), }, { question: 'Can my US-based employees access systems in the Virtual Datacenter?', answer: richText('Yes — through several methods. You can connect via standard VPN, through a VLAN extension that makes VMs appear on your local network, or (for the best performance) over a dedicated Virtual Fiber private circuit between your US office and the Layer & Mesh facility. Access is fast, secure, and fully auditable.'), }, { question: 'What happens if a physical host fails?', answer: richText('The Layer & Mesh Virtual Datacenter uses clustered infrastructure across geographically separate facilities. If a physical host fails, affected VMs restart automatically on another host in the cluster — typically within 60–90 seconds. Storage is replicated across the mesh, so no data is lost in a hardware failure.'), }, { question: 'How is pricing structured?', answer: richText('Virtual Datacenter is priced on the resources you allocate — vCPU, RAM, SSD, and HDD — on a monthly subscription. There are no per-request charges, no egress fees, and no surprise costs. You can adjust your resource allocation up or down each billing cycle.'), }, { question: 'What certifications does the facility hold?', answer: richText('Layer & Mesh facilities are ISO 27001 certified (information security), ISO 14001 certified (environmental management), and comply with SSF physical security standards. All facilities and services are operated in compliance with GDPR and NIS2.'), }, ], theme: 'dark', }, // ── CTA ── { blockType: 'lmCtaBanner', heading: 'Move your infrastructure. Keep your data where you trust it.', subheading: 'Talk to a Layer & Mesh architect about migrating your on-premises workloads — or just getting started with a single VM.', ctaText: 'Schedule a Call', ctaLink: '/contact', secondaryCtaText: 'Compare Add-Ons', secondaryCtaLink: '#vdc-specs', sectionBackground: 'dark', alignment: 'center', size: 'large', }, ], } // ─── Run ────────────────────────────────────────────────────────────────────── async function run() { console.log(`\n🚀 Seeding Layer & Mesh product pages → ${BASE_URL}\n`) await createPage(virtualFiberPage) await createPage(virtualDatacenterPage) console.log('\n✨ Done. Pages created as drafts.') console.log('\n Image slots to fill manually:') console.log(' › Virtual Fiber hero — abstract fiber/light-paths visual, dark bg') console.log(' › Virtual Fiber CTA — network diagram: two nodes connected by glowing path') console.log(' › vDC hero — datacenter/cluster visual, cool dark tones') console.log(' › vDC explainer — diagram: shared resource pools → isolated VMs') } run().catch(console.error)