Port an existing repo
import { Aside, Steps } from ‘@astrojs/starlight/components’;
Melbora’s provisioning orchestrator only creates fresh repos from the
website-template — there’s no “import existing repo” command. So
porting an existing project means provisioning a new Melbora website
and migrating your code into it.
What you get from porting
Section titled “What you get from porting”- Vercel project owned by Melbora’s team
- CMS document the client can edit through their portal login
- Blueprint canvas with all services visualized
- SEO scanner + GEO probes against the live site
- Domain management through the CLI
- Optional Shopify / channels / bookings / Resend wiring
- All future Melbora features (changelog notifications, multi-channel publishing, etc.)
Prerequisites
Section titled “Prerequisites”- Melbora CLI installed and logged in (see Quickstart)
- Your existing repo, locally
- The website-template is Next.js App Router — if you’re already on Next.js App Router, this is a copy-paste job; if not, you’re rewriting routes
-
Provision an empty Melbora website.
Terminal window vantage websites create --name "Your Site" --slug your-slugPick a slug that reads well in URLs. The orchestrator creates
github.com/Vantage-Connections-Org/client-your-slugfrom the template, plus a Vercel project, plus a first deploy. -
Wait for
status: "active".Terminal window vantage websites get <websiteId>Poll every 30 seconds until
status: "active". Should take 60-90 seconds. -
Clone the new repo locally.
Terminal window git clone https://github.com/Vantage-Connections-Org/client-your-slugcd client-your-slugpnpm installpnpm devYou should see the default template at
http://localhost:3000. Familiarize yourself with the layout before merging your code in. -
Plan your migration page-by-page.
Identify what each piece of your existing repo maps to:
Your code Where it goes in the template A page / route app/<segment>/page.tsxA reusable component components/<Name>.tsxStatic assets (images, fonts) public/<path>Static content (copy, headings) The CMS document — see step 6 Backend logic Either Melbora API or a Vercel route handler Environment variables Vercel project env, or vantage websites featuresif it’s a built-inStyles (CSS modules / Tailwind) Template uses Tailwind — port classes directly -
Migrate pages.
Server components are the default. Mark
"use client"only where you need client-side interactivity (forms, hooks, browser APIs).app/about/page.tsx export const metadata = { title: "About — Your Site" };export default function AboutPage() {return <main>{/* your content */}</main>;} -
Move static content into the CMS document.
The CMS document is a JSON blob the client can edit through their portal. The template reads it at request time.
// app/page.tsx — reading contentimport { getContent } from "@/lib/content";export default async function HomePage() {const content = await getContent();return (<main><h1>{content.hero.heading}</h1><p>{content.hero.subhead}</p></main>);}Push the initial document via the CLI:
Terminal window vantage content edit <websiteId>This opens
$EDITORwith the current content (empty for a fresh site). Save with the schema your template expects. -
Set environment variables.
For built-in features:
Terminal window vantage websites features <websiteId> --openrouter --resendFor custom env vars (third-party API keys, etc.), use Vercel’s project settings directly.
-
Push your changes.
Terminal window git add -Agit commit -m "Migrate site content from <old-repo>"git pushVercel auto-deploys on push. Watch the deploy in the portal Blueprint (Vercel node).
-
Attach your domain.
Terminal window vantage domains add <websiteId> --domain yourdomain.com --kind siteSet the DNS records Melbora prints at your registrar. Status flips to
activeonce DNS resolves. -
Verify everything in the Blueprint.
Open
https://vantageconnections.dev/admin/websites/<websiteId>. All nodes should be green. If anything’s red or warned, click into the node — the drawer has the failure detail.
Gotchas
Section titled “Gotchas”Things that have bitten porters before — none are blockers, but finding them on launch day is worse than finding them now.
-
The CMS schema is yours to define, not fixed by the platform. The API stores arbitrary JSON at
content/settings/site.json. The template’slib/site-content.tsdefines a TypeScript type for that JSON and exposesgetContent(). You widen the type and the JSON shape together — the platform doesn’t constrain either. -
The template’s
app/page.tsxis starter content meant to be replaced. Nothing in the platform reads it. You canrm -rfeverything outside oflib/site-content.ts,content/settings/site.json, andpublic/uploads/without breaking the Melbora contract. -
Media uploads commit binaries to git.
/uploads/<timestamp>-<name>, 8 MB ceiling per file. Built for “swap the hero image” frequency, not “ten product photos per SKU.” For image-heavy sites, route uploads to Vercel Blob or S3 from your own code instead of the CMS media endpoint. -
Provisioning is async — nothing else works until
status: "active".vantage websites createreturns in ~50ms withstatus: "provisioning". Repo, Vercel project, and first deploy land over the next 60–120s. Callingvantage content editorvantage domains addbefore active errors with “Website has no GitHub repo yet.” -
Two env-var surfaces, no overlap. Platform features (Shopify, Resend, etc.) →
vantage websites features <id> --shopify --resend, which pushes the right*_API_KEYvars to Vercel for you. Arbitrary app vars (your Sentry DSN, Stripe publishable key, your own analytics ID) → set in the Vercel project settings directly. Knowing which surface owns which variable is the operator’s job. -
Optimistic concurrency on CMS writes. Save returns
400 "Someone else saved while you were editing"when the SHA is stale. The portal editor handles this; a migration script that programmatically writes the doc should GET → mutate → PUT-with-sha → refetch and retry on 400. -
The repo lives under
Vantage-Connections-Org, not the client. If a client leaves the platform, exporting their site is a manual GitHub repo transfer plus un-wiring the Vercel project. There’s no one-click export. Set the expectation up front. -
GSAP / ScrollSmoother under App Router.
ScrollSmoothermounts the wrapper once globally — put it inapp/layout.tsxinside a"use client"boundary, not per-page. Dynamic-import the GSAP plugins so they don’t trip SSR. Pages can still be server components; only the animation root is client. -
SEO scans bill against the website’s AI quota. Tier determines the rate limit. Running scans in a tight loop during dev will hit it. Use the lowest tier during migration; bump it after launch.
-
Blueprint node colors lag webhooks by 10–30s. Vercel deploy success and Shopify webhook health flow into the canvas async. After
git push, expect a short delay before the Vercel node turns green. Not a bug, just don’t refresh in a panic.
Alternative: bring-your-own repo (no Melbora management)
Section titled “Alternative: bring-your-own repo (no Melbora management)”If your repo can’t or shouldn’t be reshaped — for example a Vite SPA, a backend-heavy app, or a Vercel-incompatible stack — you can still host under Melbora’s Vercel team but you give up the platform features.
-
Add the Melbora GitHub bot as a collaborator on your repo (or transfer to
Vantage-Connections-Org). -
In Vercel, switch to team
team_EffhFbPYbT1sia4Ns8yrOJxS, click Import Project, select your repo. -
Configure the build settings Vercel needs (framework preset, build command, output dir).
-
Add your domain in Vercel directly.
What you lose with this approach:
- The site will not appear in
vantage websites list - No Blueprint, no CMS, no SEO scanner, no CLI control
- Melbora is essentially a hosting account for this repo
What you keep: just Vercel hosting under Melbora’s billing.
See also
Section titled “See also”- Concepts → Websites — what you’re provisioning
- Concepts → Provisioning — what happens during step 1
- Add custom domains — deeper on step 9