This is the canonical workflow when your site wasn’t designed with the Hiveku CMS in mind. The AI does the heavy lifting; your job is to describe the source and verify the result.
The Idea
Most React sites grow by accretion. Someone adds atestimonials.tsx with six hardcoded testimonials. A blog ships with posts in posts.json. Products live in lib/products.ts as a TypeScript array.
The migration replaces those embedded sources with CMS-managed entries:
- The data moves from JSX/TS arrays to one file per item under
content/ - The manifest (
hiveku.cms.json) gains a collection per content type - The React components stop hardcoding data and start reading the CMS
- Non-developers gain a Webflow-style editor for that content
The Flow
Open the AI chat
Click the AI tab in
/v3. You’ll be doing the migration through plain-English prompts.Let the AI propose a schema
The AI reads the source file, infers the shape (title, date, body, etc.), and proposes a manifest entry for the new collection. It also surfaces ambiguity:“I see most posts have a
date field but two have publishedDate instead — should I normalize to publishedAt?”Confirm or adjust before it writes anything.AI scaffolds the manifest
If the project has no
hiveku.cms.json yet, the AI creates it. Otherwise it adds the new collection to the existing manifest. Either way, you’ll see a diff before it saves.AI writes the entries
One file per item — MDX for blog-like content, JSON for structured data. The AI uses the content’s existing slug if there is one, or generates a sensible slug from the title.For 12 blog posts you’ll see 12 new files under
content/blog/.AI refactors the React component
The component that used to hardcode the data now reads from the CMS. For Next.js App Router, that usually means importing a CMS helper, fetching entries at build/request time, and rendering them.The AI shows a diff: array literal removed, CMS read added, types updated. Approve and save.
Verify in /v3
Open the CMS panel, switch to the new collection. You should see all 12 entries. Open one, edit a field, save — the live preview updates.
Repeat for other content types
Do one collection at a time. After blog, do testimonials. Then products. Then FAQs. Each one is a separate prompt-confirm-verify cycle.
Examples by Content Type
Blog → MDX collection
Source:app/blog/page.tsx with an array of posts.
Prompt:
- A
blogcollection inhiveku.cms.jsonwithtitle,publishedAt,tags,body - 12 MDX files in
content/blog/— one per post, with frontmatter for metadata and Markdown body - A rewritten
app/blog/page.tsxthat lists posts from the CMS - (Usually) a new
app/blog/[slug]/page.tsxif individual post routes weren’t already wired up
Testimonials → JSON collection
Source:components/Testimonials.tsx with hardcoded objects.
Prompt:
- A
testimonialscollection withname,company,quote,avatar, plus a usefulfeaturedboolean - 6 JSON files in
content/testimonials/ - A rewritten
<Testimonials />component that reads the collection
Product catalog → JSON collection with references
Source:lib/products.ts with a TypeScript array, including category strings on each product.
Prompt:
- A
categoriescollection withname,slug,description - A
productscollection withname,sku,price,currency,images,description, andcategory(reference) - 40 product files + N category files
- Rewritten product list and detail pages
- The category filter UI rebuilt to read categories from the CMS too
FAQs → JSON collection
Source:app/help/page.tsx with question/answer pairs grouped by category.
Prompt:
- An
faqscollection withquestion,answer,category(select), andorder - One JSON file per question
- A rewritten help page that reads, sorts, and groups from the CMS
Tips for a Smooth Migration
What “Read From the CMS” Means
After migration, your component fetches entries from the CMS at build or request time. The exact code depends on your framework, but the shape is usually:@/lib/cms) the first time it’s needed and reuse it for subsequent migrations.
After the Migration
A few things to set up once content is in the CMS:- Invite the content team. Add editors to the project from the dashboard. They get access to the CMS panel without code editor access.
- Set up status filters. If you added a
statusfield, content goes through a draft → published flow. Make sure the React component filters out drafts in production. - Tell the team about the CMS panel. A 5-minute walkthrough of
/v3→ CMS mode → form editor goes a long way.
Troubleshooting
The AI's proposed schema is missing a field
The AI's proposed schema is missing a field
Tell it: “You missed the
excerpt field that’s on every post — add it to the schema.” The AI will revise the manifest and re-process the entries.Some entries lost formatting
Some entries lost formatting
If body content was HTML and got copied as-is into a Markdown field, the formatting won’t render. Ask the AI: “Convert all blog post bodies from HTML to Markdown.”
The list page is empty after refactor
The list page is empty after refactor
Most often the component is filtering for
status: published but no entries have that status set. Check one entry in the CMS panel — if status is unset, set the default in the manifest and ask the AI to backfill: “Set status to ‘published’ for all blog entries that don’t have it.”Slugs collided during migration
Slugs collided during migration
If two source posts had the same title or slug, the AI auto-disambiguates with
-2, -3 suffixes. To clean up, rename the entries one at a time in the CMS panel — Hiveku updates internal links automatically.The detail page (slug route) returns 404
The detail page (slug route) returns 404
The migration adds entries but doesn’t always wire up the dynamic route. Ask: “My /blog/ pages are 404 — make sure the dynamic route reads the CMS by slug.”
The content team can't edit something
The content team can't edit something
They might be in code editor mode, not CMS mode. Walk them through opening
/v3 → right pane → CMS tab. If a field doesn’t appear in the form, it’s missing from the manifest — add it via Collection Manager.What’s Next?
Add a Collection
Add more content types after the initial migration
References
Link collections together, like blog posts to authors
Bulk Import
Bring in a large CSV/JSON dump in one shot
AI Integration
Prompt patterns for content tasks