@nextblock-cms/db 0.17.0 → 0.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/supabase/migrations/02000_catchup_gen1.sql +5880 -0
- package/supabase/migrations/{00000000000000_baseline_schema.sql → 02001_baseline_schema.sql} +305 -25
- package/supabase/migrations/{00000000000001_baseline_constraints_and_indexes.sql → 02002_baseline_constraints_and_indexes.sql} +194 -3
- package/supabase/migrations/{00000000000002_baseline_security_and_grants.sql → 02003_baseline_security_and_grants.sql} +403 -161
- package/supabase/migrations/02004_baseline_seed.sql +565 -0
- package/supabase/migrations/00000000000003_baseline_seed.sql +0 -468
- package/supabase/migrations/00000000000004_default_logo_email_safe.sql +0 -24
- package/supabase/migrations/00000000000005_add_custom_canonical.sql +0 -13
- package/supabase/migrations/00000000000006_home_live_demo_promo.sql +0 -67
- package/supabase/migrations/00000000000007_home_live_demo_promo_copy_fix.sql +0 -49
- package/supabase/migrations/00000000000008_setup_article_reorder.sql +0 -30
- package/supabase/migrations/00000000000009_home_live_demo_promo_contrast.sql +0 -52
- package/supabase/migrations/00000000000010_drop_github_username.sql +0 -79
- package/supabase/migrations/00000000000011_language_detection_admin_only.sql +0 -21
- package/supabase/migrations/00000000000012_cortex_ai_stock_photo_settings.sql +0 -25
- package/supabase/migrations/00000000000013_youtube_nocookie_embeds.sql +0 -136
- package/supabase/migrations/00000000000014_site_themes.sql +0 -254
- package/supabase/migrations/00000000000015_scheduled_publishing.sql +0 -43
- package/supabase/migrations/00000000000016_product_revisions_and_revision_baseline.sql +0 -310
- package/supabase/migrations/00000000000017_cortex_ai_mcp_server.sql +0 -91
- package/supabase/migrations/00000000000018_site_scripts.sql +0 -96
- package/supabase/migrations/00000000000019_site_script_revisions.sql +0 -85
- package/supabase/migrations/00000000000020_updating_article.sql +0 -162
- package/supabase/migrations/00000000000021_updating_article_git_merge.sql +0 -91
- package/supabase/migrations/00000000000022_updating_article_accuracy.sql +0 -94
- package/supabase/migrations/00000000000023_updating_article_layout_not_host.sql +0 -87
- package/supabase/migrations/00000000000024_updating_article_newline_fix.sql +0 -70
- package/supabase/migrations/00000000000025_rebrand_nextblock_dev.sql +0 -53
- package/supabase/migrations/00000000000026_product_inquiries.sql +0 -118
- package/supabase/migrations/00000000000027_message_threads.sql +0 -391
- package/supabase/migrations/00000000000028_interaction_replies.sql +0 -86
- package/supabase/migrations/00000000000029_form_endpoints_default_empty.sql +0 -52
- package/supabase/migrations/00000000000030_seo_redirects_and_robots.sql +0 -149
- package/supabase/migrations/00000000000031_seo_robots_settings_admin_only.sql +0 -35
- package/supabase/migrations/00000000000032_seed_seo_score_optimizations.sql +0 -1172
- package/supabase/migrations/00000000000033_seed_seo_score_optimizations_p2.sql +0 -353
- package/supabase/migrations/00000000000034_seed_seo_french_legal_readability.sql +0 -101
- package/supabase/migrations/00000000000035_digital_products_seo_optimizations.sql +0 -134
- package/supabase/migrations/00000000000036_seed_posts_missing_seo_metadata.sql +0 -37
- package/supabase/migrations/00000000000037_reposition_marketing_and_cortex_mcp.sql +0 -501
- package/supabase/migrations/00000000000038_mcp_guide_visual_refresh.sql +0 -64
- package/supabase/migrations/00000000000039_mcp_guide_diagram_dimensions.sql +0 -21
- package/supabase/migrations/00000000000040_home_comparison_chart_free_cms.sql +0 -81
- package/supabase/migrations/00000000000041_marketing_review_free_cms_trial.sql +0 -141
- package/supabase/migrations/00000000000042_how_nextblock_works_css_diagram.sql +0 -66
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
-- 00000000000041_marketing_review_free_cms_trial.sql
|
|
2
|
-
--
|
|
3
|
-
-- Marketing review of every seeded surface that sells Cortex AI, after
|
|
4
|
-
-- 037/038/040 were applied. Four changes, all copy:
|
|
5
|
-
--
|
|
6
|
-
-- 1. Pricing is stated wherever the AI is mentioned, not only at the bottom of
|
|
7
|
-
-- the home page: the CMS is 100% free and open source, forever; Cortex AI
|
|
8
|
-
-- (the in-editor AI plus the MCP server) is the one paid license, and it
|
|
9
|
-
-- starts with a 30-day free trial with no credit card (matching
|
|
10
|
-
-- products.trial_period_days / trial_requires_payment_method on the Cortex
|
|
11
|
-
-- product). The hero now leads with "deploy to Vercel in one click, up in
|
|
12
|
-
-- ten minutes, try it yourself"; the "why" tiles, the MCP walkthrough, the
|
|
13
|
-
-- Cortex promo, the product page, the MCP guide and the articles page all
|
|
14
|
-
-- carry the same message.
|
|
15
|
-
-- 2. The word "copilot" is gone. The product has no copilot; it has Cortex AI,
|
|
16
|
-
-- which runs inside the editor and as an MCP server. The product title
|
|
17
|
-
-- becomes "NextBlock™ Cortex AI MCP Server & AI Editor License".
|
|
18
|
-
-- 3. The MCP guide's prototype-vs-NextBlock prose cards become a comparison
|
|
19
|
-
-- chart, and the rasterised diagram becomes a CSS/HTML flow built from
|
|
20
|
-
-- cards inside the rich-text block (crisp at every size, theme-aware, no
|
|
21
|
-
-- overflowing titles). Its media row is removed once nothing references it.
|
|
22
|
-
-- 4. The articles page ('articles' / FR 'articles') gets a short hero: the
|
|
23
|
-
-- ~300-word essay 032 put in the hero moves below the posts grid as a
|
|
24
|
-
-- "What the journal covers" section with four topic cards, so the page
|
|
25
|
-
-- keeps its word count and 100/100 grade without a wall of text up top.
|
|
26
|
-
--
|
|
27
|
-
-- Every UPDATE is guarded on a phrase unique to the currently applied copy that
|
|
28
|
-
-- the replacement does not contain, so re-runs are no-ops and customised pages
|
|
29
|
-
-- are left alone. Verified at 100/100 with libs/utils/src/lib/seo for the home
|
|
30
|
-
-- page ("AI website builder CMS"), the product ("Cortex AI MCP server"), the
|
|
31
|
-
-- guide ("connect Claude to NextBlock CMS") and both articles pages.
|
|
32
|
-
--
|
|
33
|
-
-- After adding this file: npm run generate:migrations-bundle && npm run
|
|
34
|
-
-- generate:sandbox && npm run sync:create-nextblock. The sandbox reset route
|
|
35
|
-
-- (enrichCortexAiProducts) mirrors the product sections and title.
|
|
36
|
-
|
|
37
|
-
DO $body$
|
|
38
|
-
DECLARE
|
|
39
|
-
v_en integer;
|
|
40
|
-
v_fr integer;
|
|
41
|
-
v_home integer;
|
|
42
|
-
v_cortex uuid;
|
|
43
|
-
v_post integer;
|
|
44
|
-
v_articles_en integer;
|
|
45
|
-
v_articles_fr integer;
|
|
46
|
-
BEGIN
|
|
47
|
-
SELECT id INTO v_en FROM public.languages WHERE code = 'en' LIMIT 1;
|
|
48
|
-
SELECT id INTO v_fr FROM public.languages WHERE code = 'fr' LIMIT 1;
|
|
49
|
-
|
|
50
|
-
---------------------------------------------------------------------------
|
|
51
|
-
-- 1. Home page (EN)
|
|
52
|
-
---------------------------------------------------------------------------
|
|
53
|
-
SELECT id INTO v_home FROM public.pages WHERE slug = 'home' AND language_id = v_en ORDER BY id LIMIT 1;
|
|
54
|
-
|
|
55
|
-
IF v_home IS NOT NULL THEN
|
|
56
|
-
UPDATE public.blocks SET content = $nbhero3${"is_hero":true,"padding":{"top":"xl","bottom":"xl"},"background":{"type":"gradient","gradient":{"type":"linear","stops":[{"color":"#020817","position":0},{"color":"#0f172a","position":50},{"color":"#1e293b","position":100}],"direction":"135deg"}},"column_gap":"xl","column_blocks":[[{"block_type":"text","content":{"html_content":"<h1 class='text-5xl md:text-6xl font-extrabold tracking-tight text-white text-center leading-tight'>Prompt to <span class='relative inline-block mx-1 group'><span class='absolute inset-0 bg-gradient-to-r from-blue-600 to-cyan-400 translate-y-1 md:translate-y-2 transform -skew-x-12 rounded-sm shadow-lg group-hover:skew-x-0 transition-transform duration-300 ease-out'></span><span class='relative text-white italic px-1'>Production</span></span>.<br class='md:hidden' /> The AI Website Builder CMS.</h1>"}},{"block_type":"text","content":{"html_content":"<p class='text-xl text-slate-300 text-center max-w-3xl mx-auto mt-4 leading-relaxed'>NextBlock is the free, open-source AI website builder CMS for teams that want more than a prototype. Add Cortex AI to point Claude Code, Cursor, or ChatGPT at your site over MCP, free for 30 days. You keep a live Next.js 16 and Supabase website with a visual editor your team owns on day two.</p>"}},{"block_type":"button","content":{"url":"https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fnextblock-cms%2Fnextblock&project-name=nextblock&repository-name=nextblock&stores=%5B%7B%22type%22%3A%22integration%22%2C%22integrationSlug%22%3A%22supabase%22%2C%22productSlug%22%3A%22supabase%22%7D%5D","size":"lg","text":"Deploy to Vercel in One Click","variant":"default","position":"center"}},{"block_type":"button","content":{"url":"https://nextblock.dev/product/nextblock-cortex-ai-cortex-ai-license","size":"lg","text":"Start the Free Cortex AI Trial","variant":"outline","position":"center"}},{"block_type":"text","content":{"html_content":"<div class='flex flex-wrap justify-center gap-6 text-sm uppercase tracking-wide text-slate-400 mt-8'><a href='https://github.com/nextblock-cms' target='_blank' rel='noopener noreferrer' class='hover:text-white transition-colors'>GitHub</a><a href='https://x.com/NextBlockCMS' target='_blank' rel='noopener noreferrer' class='hover:text-white transition-colors'>X</a><a href='https://www.linkedin.com/in/nextblock/' target='_blank' rel='noopener noreferrer' class='hover:text-white transition-colors'>LinkedIn</a><a href='https://dev.to/nextblockcms' target='_blank' rel='noopener noreferrer' class='hover:text-white transition-colors'>Dev.to</a><a href='https://www.npmjs.com/~nextblockcms' target='_blank' rel='noopener noreferrer' class='hover:text-white transition-colors'>npm</a></div>"}}],[{"block_type":"text","content":{"html_content":"<div class='p-10 border border-white/10 rounded-3xl bg-white/5 backdrop-blur-xl shadow-2xl relative overflow-hidden group'><div class='absolute inset-0 bg-gradient-to-br from-blue-500/10 to-purple-500/10 opacity-0 group-hover:opacity-100 transition-opacity duration-500'></div><div class='relative z-10'><p class='text-xs text-white uppercase tracking-widest font-semibold mb-2'>Up in 10 minutes. Free to start.</p><p class='text-3xl font-bold text-white mb-2'>Try the whole stack for free.</p><p class='text-base text-slate-300 mb-6'>The CMS is free forever. Cortex AI, the paid AI layer that includes the MCP server, starts with a 30-day trial and no credit card. One click deploys to Vercel, and you are prompting your own site in ten minutes.</p><ul class='space-y-3 text-sm text-slate-200'><li><span class='text-blue-400 mr-2'>✓</span> CMS: free and open source, with unlimited pages, editors, and sites.</li><li><span class='text-blue-400 mr-2'>✓</span> Cortex AI: 30 days free, no credit card, then one license.</li><li><span class='text-blue-400 mr-2'>✓</span> Bring your own AI subscription. No token markup, ever.</li></ul><div class='mt-6 rounded-2xl overflow-hidden border border-white/10 shadow-lg'><div class='relative w-full aspect-video'><iframe class='absolute inset-0 h-full w-full border-0' src='https://www.youtube-nocookie.com/embed/71MyfoL4YVM?si=jtlDXV6cSC8rDgz0' title='NextBlock demo video' allow='accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share' referrerpolicy='strict-origin-when-cross-origin' loading='lazy' allowfullscreen></iframe></div></div></div></div>"}}]],"container_type":"container","responsive_columns":{"mobile":1,"tablet":1,"desktop":2},"vertical_alignment":"center"}$nbhero3$::jsonb, updated_at = now()
|
|
57
|
-
WHERE page_id = v_home AND block_type = 'section' AND content::text LIKE '%Free CMS. Paid AI. Your call.%';
|
|
58
|
-
|
|
59
|
-
UPDATE public.blocks SET content = $nbwhy3${"padding":{"top":"xl","bottom":"xl"},"background":{"type":"none"},"column_gap":"lg","column_blocks":[[{"block_type":"heading","content":{"level":2,"textAlign":"center","text_content":"Why an AI Website Builder CMS Beats Prototype Code."}},{"block_type":"text","content":{"html_content":"<p class='text-lg text-muted-foreground text-center max-w-3xl mx-auto mb-10'>Prompt builders like Lovable, Bolt, and v0 are great at a first draft. Then they hand you code you must host, patch, and rebuild for every copy change. NextBlock takes the same prompts and turns them into a website your whole team can run.</p>"}},{"block_type":"text","content":{"html_content":"<div class='grid gap-6 md:grid-cols-3'><div class='h-full rounded-2xl border border-slate-200 bg-white p-6 shadow-sm transition-colors hover:border-blue-300 dark:border-slate-800 dark:bg-slate-900'><div class='mb-4 flex h-10 w-10 items-center justify-center rounded-xl bg-blue-50 text-xl dark:bg-blue-950'>🧩</div><h3 class='text-lg font-bold text-foreground mb-2'>Prompt to CMS, Not Just Code.</h3><p class='text-sm text-muted-foreground leading-relaxed'>External AI agents scaffold real layouts as typed blocks. Editors then tweak copy, images, and sections in a Notion-style editor. Nobody writes a prompt or touches code to change a headline.</p></div><div class='h-full rounded-2xl border border-slate-200 bg-white p-6 shadow-sm transition-colors hover:border-blue-300 dark:border-slate-800 dark:bg-slate-900'><div class='mb-4 flex h-10 w-10 items-center justify-center rounded-xl bg-blue-50 text-xl dark:bg-blue-950'>🔌</div><h3 class='text-lg font-bold text-foreground mb-2'>Bring Your Own AI Subscription via MCP.</h3><p class='text-sm text-muted-foreground leading-relaxed'>Connect Claude Code, Cursor, ChatGPT, or Gemini straight to /api/mcp. You pay for the AI plan you already have, not a SaaS token markup. This is the Cortex AI layer: free for 30 days, no credit card.</p></div><div class='h-full rounded-2xl border border-slate-200 bg-white p-6 shadow-sm transition-colors hover:border-blue-300 dark:border-slate-800 dark:bg-slate-900'><div class='mb-4 flex h-10 w-10 items-center justify-center rounded-xl bg-blue-50 text-xl dark:bg-blue-950'>⚡</div><h3 class='text-lg font-bold text-foreground mb-2'>Zero-Redeploy JSONB Architecture.</h3><p class='text-sm text-muted-foreground leading-relaxed'>Generated blocks land in PostgreSQL as validated JSONB. Pages publish in seconds with 100/100 Lighthouse defaults and no rebuild.</p></div></div>"}},{"block_type":"text","content":{"html_content":"<div class='mt-12 overflow-hidden rounded-3xl border border-slate-200 bg-white shadow-sm dark:border-slate-800 dark:bg-slate-900'><div class='flex flex-wrap items-end justify-between gap-3 px-5 pt-6 pb-4'><div><p class='text-xs font-semibold uppercase tracking-[0.22em] text-slate-500 dark:text-slate-400'>Side by side</p><p class='mt-1 text-xl font-semibold text-foreground'>Prototype tools versus NextBlock.</p></div><p class='text-xs text-slate-500 dark:text-slate-400'>Lovable, Bolt, and v0 compared on what happens after the first prompt.</p></div><div class='overflow-x-auto'><table class='w-full min-w-[640px] border-collapse'><thead><tr class='bg-slate-50 dark:bg-slate-950/60'><th scope='col' class='px-5 py-3 text-left text-xs font-semibold uppercase tracking-[0.2em] text-slate-500 dark:text-slate-400'>What you get</th><th scope='col' class='px-5 py-3 text-left text-xs font-semibold uppercase tracking-[0.2em] text-rose-600 dark:text-rose-300'>Lovable, Bolt, v0</th><th scope='col' class='bg-emerald-50/60 px-5 py-3 text-left text-xs font-semibold uppercase tracking-[0.2em] text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-200'>NextBlock</th></tr></thead><tbody><tr class='border-t border-slate-200 dark:border-slate-800'><th scope='row' class='px-5 py-4 text-left align-top text-sm font-semibold text-foreground'>Day one</th><td class='px-5 py-4 align-top text-sm text-muted-foreground'><span class='mr-2 inline-flex h-5 w-5 items-center justify-center rounded-full bg-rose-100 text-xs font-bold text-rose-600 dark:bg-rose-500/20 dark:text-rose-300'>✗</span>Prototype code you host and patch yourself.</td><td class='bg-emerald-50/60 px-5 py-4 align-top text-sm text-foreground dark:bg-emerald-500/10'><span class='mr-2 inline-flex h-5 w-5 items-center justify-center rounded-full bg-emerald-100 text-xs font-bold text-emerald-700 dark:bg-emerald-500/20 dark:text-emerald-200'>✓</span>A live Next.js 16 and Supabase website.</td></tr><tr class='border-t border-slate-200 dark:border-slate-800'><th scope='row' class='px-5 py-4 text-left align-top text-sm font-semibold text-foreground'>Editing after launch</th><td class='px-5 py-4 align-top text-sm text-muted-foreground'><span class='mr-2 inline-flex h-5 w-5 items-center justify-center rounded-full bg-rose-100 text-xs font-bold text-rose-600 dark:bg-rose-500/20 dark:text-rose-300'>✗</span>A new prompt or a pull request for every change.</td><td class='bg-emerald-50/60 px-5 py-4 align-top text-sm text-foreground dark:bg-emerald-500/10'><span class='mr-2 inline-flex h-5 w-5 items-center justify-center rounded-full bg-emerald-100 text-xs font-bold text-emerald-700 dark:bg-emerald-500/20 dark:text-emerald-200'>✓</span>A Notion-style visual editor, no code needed.</td></tr><tr class='border-t border-slate-200 dark:border-slate-800'><th scope='row' class='px-5 py-4 text-left align-top text-sm font-semibold text-foreground'>Drafts and revisions</th><td class='px-5 py-4 align-top text-sm text-muted-foreground'><span class='mr-2 inline-flex h-5 w-5 items-center justify-center rounded-full bg-rose-100 text-xs font-bold text-rose-600 dark:bg-rose-500/20 dark:text-rose-300'>✗</span>Code history only, nothing for content.</td><td class='bg-emerald-50/60 px-5 py-4 align-top text-sm text-foreground dark:bg-emerald-500/10'><span class='mr-2 inline-flex h-5 w-5 items-center justify-center rounded-full bg-emerald-100 text-xs font-bold text-emerald-700 dark:bg-emerald-500/20 dark:text-emerald-200'>✓</span>Live Drafts and one-click restore of any page.</td></tr><tr class='border-t border-slate-200 dark:border-slate-800'><th scope='row' class='px-5 py-4 text-left align-top text-sm font-semibold text-foreground'>Publishing</th><td class='px-5 py-4 align-top text-sm text-muted-foreground'><span class='mr-2 inline-flex h-5 w-5 items-center justify-center rounded-full bg-rose-100 text-xs font-bold text-rose-600 dark:bg-rose-500/20 dark:text-rose-300'>✗</span>Rebuild and redeploy.</td><td class='bg-emerald-50/60 px-5 py-4 align-top text-sm text-foreground dark:bg-emerald-500/10'><span class='mr-2 inline-flex h-5 w-5 items-center justify-center rounded-full bg-emerald-100 text-xs font-bold text-emerald-700 dark:bg-emerald-500/20 dark:text-emerald-200'>✓</span>Instant, straight from PostgreSQL.</td></tr><tr class='border-t border-slate-200 dark:border-slate-800'><th scope='row' class='px-5 py-4 text-left align-top text-sm font-semibold text-foreground'>Translations and SEO</th><td class='px-5 py-4 align-top text-sm text-muted-foreground'><span class='mr-2 inline-flex h-5 w-5 items-center justify-center rounded-full bg-rose-100 text-xs font-bold text-rose-600 dark:bg-rose-500/20 dark:text-rose-300'>✗</span>Not built in.</td><td class='bg-emerald-50/60 px-5 py-4 align-top text-sm text-foreground dark:bg-emerald-500/10'><span class='mr-2 inline-flex h-5 w-5 items-center justify-center rounded-full bg-emerald-100 text-xs font-bold text-emerald-700 dark:bg-emerald-500/20 dark:text-emerald-200'>✓</span>Per-block translation and SEO graded as you type.</td></tr><tr class='border-t border-slate-200 dark:border-slate-800'><th scope='row' class='px-5 py-4 text-left align-top text-sm font-semibold text-foreground'>AI costs</th><td class='px-5 py-4 align-top text-sm text-muted-foreground'><span class='mr-2 inline-flex h-5 w-5 items-center justify-center rounded-full bg-rose-100 text-xs font-bold text-rose-600 dark:bg-rose-500/20 dark:text-rose-300'>✗</span>Platform credits, bought from the tool.</td><td class='bg-emerald-50/60 px-5 py-4 align-top text-sm text-foreground dark:bg-emerald-500/10'><span class='mr-2 inline-flex h-5 w-5 items-center justify-center rounded-full bg-emerald-100 text-xs font-bold text-emerald-700 dark:bg-emerald-500/20 dark:text-emerald-200'>✓</span>Your own subscription over MCP, no markup.</td></tr><tr class='border-t border-slate-200 dark:border-slate-800'><th scope='row' class='px-5 py-4 text-left align-top text-sm font-semibold text-foreground'>Price of the platform</th><td class='px-5 py-4 align-top text-sm text-muted-foreground'><span class='mr-2 inline-flex h-5 w-5 items-center justify-center rounded-full bg-rose-100 text-xs font-bold text-rose-600 dark:bg-rose-500/20 dark:text-rose-300'>✗</span>A monthly plan.</td><td class='bg-emerald-50/60 px-5 py-4 align-top text-sm text-foreground dark:bg-emerald-500/10'><span class='mr-2 inline-flex h-5 w-5 items-center justify-center rounded-full bg-emerald-100 text-xs font-bold text-emerald-700 dark:bg-emerald-500/20 dark:text-emerald-200'>✓</span>Free and open source, forever. Cortex AI is the only paid add-on.</td></tr></tbody></table></div></div>"}},{"block_type":"text","content":{"html_content":"<div class='mt-10 grid gap-4 md:grid-cols-3'><div class='rounded-3xl border border-emerald-200/70 bg-emerald-50/70 p-6 dark:border-emerald-500/20 dark:bg-emerald-500/10'><p class='text-xs font-semibold uppercase tracking-[0.22em] text-emerald-700 dark:text-emerald-200'>Free forever</p><p class='mt-3 text-xl font-semibold text-foreground'>The CMS costs nothing.</p><p class='mt-3 text-sm text-muted-foreground'>The AI website builder CMS is free and open source. Unlimited pages, editors, and sites, self-hosted or on Vercel, with no plan to outgrow.</p></div><div class='rounded-3xl border border-violet-200/70 bg-violet-50/70 p-6 dark:border-violet-500/20 dark:bg-violet-500/10'><p class='text-xs font-semibold uppercase tracking-[0.22em] text-violet-700 dark:text-violet-200'>Cortex AI: 30-day free trial</p><p class='mt-3 text-xl font-semibold text-foreground'>Try the AI layer, then decide.</p><p class='mt-3 text-sm text-muted-foreground'>Cortex AI is the one paid license. It starts with a 30-day trial and no credit card, and it unlocks AI inside the editor plus the MCP server. Cancel by doing nothing.</p></div><div class='rounded-3xl border border-sky-200/70 bg-sky-50/70 p-6 dark:border-sky-500/20 dark:bg-sky-500/10'><p class='text-xs font-semibold uppercase tracking-[0.22em] text-sky-700 dark:text-sky-200'>No token markup</p><p class='mt-3 text-xl font-semibold text-foreground'>Your plan does the work.</p><p class='mt-3 text-sm text-muted-foreground'>Cortex AI runs on the Claude, ChatGPT, Cursor, or Gemini subscription you already pay for. The license buys the connection, not the tokens.</p></div></div>"}}]],"container_type":"container","responsive_columns":{"mobile":1,"tablet":1,"desktop":1}}$nbwhy3$::jsonb, updated_at = now()
|
|
60
|
-
WHERE page_id = v_home AND block_type = 'section' AND content::text LIKE '%Cortex AI, when you want it%';
|
|
61
|
-
|
|
62
|
-
UPDATE public.blocks SET content = $nbmcp2${"padding":{"top":"xl","bottom":"xl"},"background":{"type":"gradient","gradient":{"type":"linear","stops":[{"color":"#0f172a","position":0},{"color":"#1e293b","position":100}],"direction":"135deg"}},"column_gap":"lg","column_blocks":[[{"block_type":"text","content":{"html_content":"<p class='text-xs uppercase tracking-[0.3em] text-cyan-300 font-semibold text-center mb-3'>Model Context Protocol</p><h2 class='text-3xl md:text-4xl font-extrabold text-white text-center mb-4'>How the MCP Connection Works.</h2><p class='text-lg text-slate-300 text-center max-w-3xl mx-auto mb-4'>Cortex AI exposes your CMS as an MCP server at /api/mcp. Any agent that speaks the standard can read your schema and write pages. The server is part of the Cortex AI license, and the 30-day trial needs no credit card.</p><p class='text-base text-slate-400 text-center max-w-2xl mx-auto mb-10'>Three steps take you from a fresh deploy to published pages, in about ten minutes.</p><div class='grid gap-6 md:grid-cols-3'><div class='rounded-2xl border border-white/10 bg-white/5 p-6 backdrop-blur'><p class='text-xs uppercase tracking-[0.25em] text-cyan-300 font-semibold mb-3'>Step 1</p><h3 class='text-lg font-bold text-white mb-2'>Deploy and start the trial.</h3><p class='text-sm text-slate-300 leading-relaxed'>One click to Vercel, then start the free Cortex AI trial in CMS Settings. Mint a scoped token and paste one JSON block into Claude Code, Cursor, or VS Code.</p></div><div class='rounded-2xl border border-white/10 bg-white/5 p-6 backdrop-blur'><p class='text-xs uppercase tracking-[0.25em] text-cyan-300 font-semibold mb-3'>Step 2</p><h3 class='text-lg font-bold text-white mb-2'>Prompt the layout.</h3><p class='text-sm text-slate-300 leading-relaxed'>Ask for a landing page. The agent calls generate_jsonb_layout and the result lands as a Live Draft made of validated blocks.</p></div><div class='rounded-2xl border border-white/10 bg-white/5 p-6 backdrop-blur'><p class='text-xs uppercase tracking-[0.25em] text-cyan-300 font-semibold mb-3'>Step 3</p><h3 class='text-lg font-bold text-white mb-2'>Edit and publish.</h3><p class='text-sm text-slate-300 leading-relaxed'>Editors refine the draft in the visual editor and hit publish. The page goes live from PostgreSQL with no redeploy.</p></div></div>"}},{"block_type":"text","content":{"html_content":"<div class='mt-12 grid gap-8 md:grid-cols-2'><div class='rounded-2xl border border-white/10 bg-slate-950/60 p-6'><h3 class='text-base font-bold text-white mb-4'>For Writers and Editors</h3><ul class='space-y-3 text-sm text-slate-300'><li><strong class='text-white'>Notion-style editor.</strong> Slash commands, drag and drop, and inline AI on every block.</li><li><strong class='text-white'>Live Drafts.</strong> Stage AI output safely, then publish when it reads right.</li><li><strong class='text-white'>Revisions.</strong> Restore any version of a page or post with one click.</li><li><strong class='text-white'>Built-in SEO checks.</strong> Headings, keyphrases, readability, and metadata graded as you type.</li></ul></div><div class='rounded-2xl border border-white/10 bg-slate-950/60 p-6'><h3 class='text-base font-bold text-white mb-4'>For Developers</h3><ul class='space-y-3 text-sm text-slate-300'><li><strong class='text-white'>Next.js 16 core.</strong> Server Components, ISR, and edge caching out of the box.</li><li><strong class='text-white'>Supabase backend.</strong> Postgres, auth, storage, and row-level security you can read.</li><li><strong class='text-white'>Typed block registry.</strong> Every block has a Zod schema, so AI output is validated before it renders.</li><li><strong class='text-white'>Open source.</strong> Self-host on Docker or deploy to Vercel in one click.</li></ul></div></div><p class='mt-10 text-center text-xs uppercase tracking-[0.25em] text-slate-400'>Built with Next.js, React, Supabase, Stripe, Tailwind, Tiptap, Vercel, and Nx.</p>"}}]],"container_type":"container","responsive_columns":{"mobile":1,"tablet":1,"desktop":1}}$nbmcp2$::jsonb, updated_at = now()
|
|
63
|
-
WHERE page_id = v_home AND block_type = 'section' AND content::text LIKE '%Three steps take you from a blank site%';
|
|
64
|
-
|
|
65
|
-
UPDATE public.blocks SET content = $nbcortexpromo3${"padding":{"top":"xl","bottom":"xl"},"background":{"type":"gradient","gradient":{"type":"linear","stops":[{"color":"#1e1b4b","position":0},{"color":"#0f172a","position":100}],"direction":"135deg"}},"column_gap":"xl","column_blocks":[[{"block_type":"text","content":{"html_content":"<p class='text-xs uppercase tracking-[0.3em] text-violet-400 font-semibold mb-4'>Now Available — Cortex AI</p><h2 class='text-4xl md:text-5xl font-bold text-white mb-6 leading-tight'>The CMS Is Free.<br/>Cortex AI Is the Upgrade.</h2><p class='text-lg text-slate-300 max-w-2xl leading-relaxed mb-4'>NextBlock costs nothing and never will. Cortex AI is the one license we sell. It adds AI inside the editor and an MCP server outside it, so Claude Code, Cursor, ChatGPT, and Gemini can build your site.</p><p class='text-base text-slate-400 max-w-2xl leading-relaxed'>Try it free for 30 days with no credit card. You bring the AI subscription you already pay for. The license buys the connection, never the tokens, and nothing goes live until an editor publishes it.</p>"}},{"block_type":"button","content":{"url":"https://nextblock.dev/product/nextblock-cortex-ai-cortex-ai-license","size":"lg","text":"Start the 30-Day Free Trial →","variant":"default","position":"left"}},{"block_type":"button","content":{"url":"/article/cortex-ai-mcp-connection-guide","size":"lg","text":"Read the MCP Setup Guide","variant":"outline","position":"left"}}],[{"block_type":"text","content":{"html_content":"<div class='grid grid-cols-1 gap-4 sm:grid-cols-3 lg:grid-cols-1'><div class='rounded-2xl border border-violet-500/30 bg-white/5 p-6 text-center'><p class='text-3xl font-extrabold text-white'>$0</p><p class='text-xs uppercase tracking-wider text-violet-200 mt-1'>The CMS, forever</p></div><div class='rounded-2xl border border-violet-500/30 bg-white/5 p-6 text-center'><p class='text-3xl font-extrabold text-white'>30</p><p class='text-xs uppercase tracking-wider text-violet-200 mt-1'>Days of Cortex AI free, no card</p></div><div class='rounded-2xl border border-violet-500/30 bg-white/5 p-6 text-center'><p class='text-3xl font-extrabold text-white'>0 %</p><p class='text-xs uppercase tracking-wider text-violet-200 mt-1'>Token markup</p></div></div>"}}]],"container_type":"container","responsive_columns":{"mobile":1,"tablet":1,"desktop":2},"vertical_alignment":"center"}$nbcortexpromo3$::jsonb, updated_at = now()
|
|
66
|
-
WHERE page_id = v_home AND block_type = 'section' AND content::text LIKE '%The AI Is the Upgrade%';
|
|
67
|
-
END IF;
|
|
68
|
-
|
|
69
|
-
---------------------------------------------------------------------------
|
|
70
|
-
-- 2. Cortex AI product (EN)
|
|
71
|
-
---------------------------------------------------------------------------
|
|
72
|
-
SELECT id INTO v_cortex FROM public.products WHERE slug = 'nextblock-cortex-ai-cortex-ai-license' AND language_id = v_en LIMIT 1;
|
|
73
|
-
|
|
74
|
-
IF v_cortex IS NOT NULL THEN
|
|
75
|
-
UPDATE public.products SET title = 'NextBlock™ Cortex AI MCP Server & AI Editor License', updated_at = now()
|
|
76
|
-
WHERE id = v_cortex AND title IN ('NextBlock™ Cortex AI MCP Server & Copilot License', 'NextBlock™ Cortex AI MCP Server & AI Editor License');
|
|
77
|
-
|
|
78
|
-
UPDATE public.products SET short_description = 'NextBlock™ Cortex AI is the AI layer for your free CMS. Route any model through your own OpenRouter key inside the editor, or register /api/mcp and let Claude Code, Cursor, and ChatGPT build layouts, inspect your schema, and manage content on the AI subscription you already pay for. Free for 30 days, no credit card.', updated_at = now()
|
|
79
|
-
WHERE id = v_cortex
|
|
80
|
-
AND (short_description IS NULL OR short_description = ''
|
|
81
|
-
OR short_description = 'NextBlock™ Cortex AI is the AI layer for your CMS. Route any model through your own OpenRouter key in the dashboard, or register /api/mcp and let Claude Code, Cursor, and ChatGPT build layouts, inspect your schema, and manage content on the AI subscription you already pay for.'
|
|
82
|
-
OR short_description = 'NextBlock™ Cortex AI is the AI layer for your free CMS. Route any model through your own OpenRouter key inside the editor, or register /api/mcp and let Claude Code, Cursor, and ChatGPT build layouts, inspect your schema, and manage content on the AI subscription you already pay for. Free for 30 days, no credit card.');
|
|
83
|
-
|
|
84
|
-
IF EXISTS (SELECT 1 FROM public.blocks WHERE product_id = v_cortex AND content::text LIKE '%Editor Copilot%') THEN
|
|
85
|
-
DELETE FROM public.blocks WHERE product_id = v_cortex;
|
|
86
|
-
INSERT INTO public.blocks (product_id, language_id, block_type, content, "order") VALUES
|
|
87
|
-
(v_cortex, v_en, 'section', $nbcx0v2${"container_type":"container","background":{"type":"gradient","gradient":{"type":"linear","direction":"135deg","stops":[{"color":"#1e1b4b","position":0},{"color":"#312e81","position":35},{"color":"#0f172a","position":100}]}},"responsive_columns":{"mobile":1,"tablet":1,"desktop":2},"column_gap":"xl","vertical_alignment":"center","padding":{"top":"xl","bottom":"xl"},"column_blocks":[[{"block_type":"text","content":{"html_content":"<p class='text-xs uppercase tracking-[0.3em] text-violet-400 font-semibold mb-4'>MCP-Native AI Layer · 30-Day Free Trial</p><h2 class='text-3xl md:text-5xl font-extrabold text-white leading-tight mb-5'>Your CMS as a Cortex AI MCP Server.</h2><p class='text-base md:text-lg text-slate-200 leading-relaxed mb-4'>Cortex AI runs two ways. Inside the editor it routes to any model through your own OpenRouter key. Over MCP it turns NextBlock into a server that Claude Code, Cursor, and ChatGPT operate from their own chat window.</p><p class='text-base text-slate-300 leading-relaxed mb-6'>The CMS is free forever. Cortex AI is the one license we sell, and it starts with 30 days free and no credit card.</p>"}},{"block_type":"button","content":{"text":"Read the MCP Setup Guide →","url":"/article/cortex-ai-mcp-connection-guide","variant":"default","size":"lg","position":"left"}}],[{"block_type":"text","content":{"html_content":"<div class='rounded-2xl border border-violet-700 bg-slate-950 p-6 shadow-xl sm:p-8'><h3 class='text-lg font-bold text-white mb-5'>Bring Your Own AI Subscription</h3><ul class='space-y-4 text-sm leading-relaxed text-slate-300'><li class='flex items-start gap-3'><span class='flex-shrink-0 w-6 h-6 rounded-full bg-violet-950 flex items-center justify-center text-violet-300 text-xs font-bold'>✓</span><span><strong class='text-white'>Free for 30 days</strong> — start the trial with no credit card. If you do nothing, it simply ends.</span></li><li class='flex items-start gap-3'><span class='flex-shrink-0 w-6 h-6 rounded-full bg-violet-950 flex items-center justify-center text-violet-300 text-xs font-bold'>✓</span><span><strong class='text-white'>No token markup</strong> — use Claude Pro, ChatGPT Plus, Cursor, or Gemini Advanced by registering /api/mcp. You pay your provider, not us.</span></li><li class='flex items-start gap-3'><span class='flex-shrink-0 w-6 h-6 rounded-full bg-violet-950 flex items-center justify-center text-violet-300 text-xs font-bold'>✓</span><span><strong class='text-white'>Editor BYOK</strong> — OpenRouter routing with your own key, so you pick the model and keep the bill.</span></li><li class='flex items-start gap-3'><span class='flex-shrink-0 w-6 h-6 rounded-full bg-violet-950 flex items-center justify-center text-violet-300 text-xs font-bold'>✓</span><span><strong class='text-white'>Scoped tokens</strong> — mint read-only or write tokens in CMS Settings and revoke them any time.</span></li><li class='flex items-start gap-3'><span class='flex-shrink-0 w-6 h-6 rounded-full bg-violet-950 flex items-center justify-center text-violet-300 text-xs font-bold'>✓</span><span><strong class='text-white'>Live Drafts</strong> — generated layouts stage as drafts. Nothing goes live until an editor publishes it.</span></li></ul></div>"}}]]}$nbcx0v2$::jsonb, 0),
|
|
88
|
-
(v_cortex, v_en, 'section', $nbcx1v2${"container_type":"container","background":{"type":"theme","theme":"muted"},"responsive_columns":{"mobile":1,"tablet":2,"desktop":4},"column_gap":"lg","padding":{"top":"lg","bottom":"lg"},"vertical_alignment":"center","column_blocks":[[{"block_type":"text","content":{"html_content":"<p class='text-center'><span class='block text-2xl font-extrabold text-foreground'>30</span><span class='text-xs text-muted-foreground uppercase tracking-wider'>Days free, no card</span></p>"}}],[{"block_type":"text","content":{"html_content":"<p class='text-center'><span class='block text-2xl font-extrabold text-foreground'>0 %</span><span class='text-xs text-muted-foreground uppercase tracking-wider'>Token markup</span></p>"}}],[{"block_type":"text","content":{"html_content":"<p class='text-center'><span class='block text-2xl font-extrabold text-foreground'>5</span><span class='text-xs text-muted-foreground uppercase tracking-wider'>MCP contract tools</span></p>"}}],[{"block_type":"text","content":{"html_content":"<p class='text-center'><span class='block text-2xl font-extrabold text-foreground'>29</span><span class='text-xs text-muted-foreground uppercase tracking-wider'>Typed agent tools</span></p>"}}]]}$nbcx1v2$::jsonb, 1),
|
|
89
|
-
(v_cortex, v_en, 'section', $nbcx2v2${"container_type":"container","background":{"type":"none"},"responsive_columns":{"mobile":1,"tablet":2,"desktop":3},"column_gap":"lg","padding":{"top":"xl","bottom":"xl"},"vertical_alignment":"stretch","column_blocks":[[{"block_type":"text","content":{"html_content":"<div class='h-full rounded-2xl border border-slate-200 bg-white p-6 shadow-sm transition-colors hover:border-violet-300 hover:bg-slate-50 dark:border-white/10 dark:bg-slate-950 dark:hover:border-violet-500 sm:p-7'><h3 class='text-base font-bold text-slate-900 dark:text-white mb-2'><code class='rounded bg-violet-50 px-2 py-1 text-sm text-violet-700 dark:bg-violet-950 dark:text-violet-200'>get_database_schema</code></h3><p class='text-sm text-slate-600 dark:text-slate-300 leading-relaxed'>Returns every table the agent may read or change, with columns, keys, and read-only flags. The model plans against real structure, not guesses.</p></div>"}},{"block_type":"text","content":{"html_content":"<div class='h-full rounded-2xl border border-slate-200 bg-white p-6 shadow-sm transition-colors hover:border-violet-300 hover:bg-slate-50 dark:border-white/10 dark:bg-slate-950 dark:hover:border-violet-500 sm:p-7'><h3 class='text-base font-bold text-slate-900 dark:text-white mb-2'><code class='rounded bg-violet-50 px-2 py-1 text-sm text-violet-700 dark:bg-violet-950 dark:text-violet-200'>query_site_analytics</code></h3><p class='text-sm text-slate-600 dark:text-slate-300 leading-relaxed'>Reads revenue, order counts, status breakdowns, and top products over a date range. Read-only, so it is safe on any token.</p></div>"}}],[{"block_type":"text","content":{"html_content":"<div class='h-full rounded-2xl border border-slate-200 bg-white p-6 shadow-sm transition-colors hover:border-violet-300 hover:bg-slate-50 dark:border-white/10 dark:bg-slate-950 dark:hover:border-violet-500 sm:p-7'><h3 class='text-base font-bold text-slate-900 dark:text-white mb-2'><code class='rounded bg-violet-50 px-2 py-1 text-sm text-violet-700 dark:bg-violet-950 dark:text-violet-200'>generate_jsonb_layout</code></h3><p class='text-sm text-slate-600 dark:text-slate-300 leading-relaxed'>Turns a prompt into a complete page layout. Blocks are validated against the NextBlock schema and staged as a Live Draft.</p></div>"}},{"block_type":"text","content":{"html_content":"<div class='h-full rounded-2xl border border-slate-200 bg-white p-6 shadow-sm transition-colors hover:border-violet-300 hover:bg-slate-50 dark:border-white/10 dark:bg-slate-950 dark:hover:border-violet-500 sm:p-7'><h3 class='text-base font-bold text-slate-900 dark:text-white mb-2'><code class='rounded bg-violet-50 px-2 py-1 text-sm text-violet-700 dark:bg-violet-950 dark:text-violet-200'>search_stock_media</code></h3><p class='text-sm text-slate-600 dark:text-slate-300 leading-relaxed'>Finds free stock photos on Pexels and Unsplash with alt text and credits. Drop a result straight into an image block.</p></div>"}}],[{"block_type":"text","content":{"html_content":"<div class='h-full rounded-2xl border border-slate-200 bg-white p-6 shadow-sm transition-colors hover:border-violet-300 hover:bg-slate-50 dark:border-white/10 dark:bg-slate-950 dark:hover:border-violet-500 sm:p-7'><h3 class='text-base font-bold text-slate-900 dark:text-white mb-2'><code class='rounded bg-violet-50 px-2 py-1 text-sm text-violet-700 dark:bg-violet-950 dark:text-violet-200'>update_site_navigation</code></h3><p class='text-sm text-slate-600 dark:text-slate-300 leading-relaxed'>Adds, renames, or reorders header menu items per locale. Append to keep the current menu or replace it in one call.</p></div>"}},{"block_type":"text","content":{"html_content":"<div class='h-full rounded-2xl border border-slate-200 bg-white p-6 shadow-sm transition-colors hover:border-violet-300 hover:bg-slate-50 dark:border-white/10 dark:bg-slate-950 dark:hover:border-violet-500 sm:p-7'><h3 class='text-base font-bold text-slate-900 dark:text-white mb-2'><code class='rounded bg-violet-50 px-2 py-1 text-sm text-violet-700 dark:bg-violet-950 dark:text-violet-200'>and 24 more</code></h3><p class='text-sm text-slate-600 dark:text-slate-300 leading-relaxed'>Create posts and products, translate pages, upload media, manage themes and scripts. Every tool is typed and scoped.</p></div>"}}]]}$nbcx2v2$::jsonb, 2),
|
|
90
|
-
(v_cortex, v_en, 'section', $nbcx3v2${"container_type":"container","background":{"type":"gradient","gradient":{"type":"linear","direction":"180deg","stops":[{"color":"#020617","position":0},{"color":"#0f172a","position":100}]}},"responsive_columns":{"mobile":1,"tablet":1,"desktop":2},"column_gap":"xl","vertical_alignment":"center","padding":{"top":"xl","bottom":"xl"},"column_blocks":[[{"block_type":"text","content":{"html_content":"<p class='text-xs uppercase tracking-[0.3em] text-violet-400 font-semibold mb-4'>How It Works</p><h3 class='text-2xl md:text-3xl font-extrabold text-white mb-4'>One Registry, Standard Transport.</h3><p class='text-slate-300 leading-relaxed mb-5'>The MCP server speaks Streamable HTTP at /api/mcp. Your client posts JSON-RPC messages and gets typed results back. There is no SDK to install and no proxy in the middle.</p><ul class='space-y-3 text-sm text-slate-400'><li class='flex items-start gap-2.5'><span class='text-violet-400'>→</span><span>Bearer tokens are stored as SHA-256 hashes and shown once.</span></li><li class='flex items-start gap-2.5'><span class='text-violet-400'>→</span><span>Localhost trust lets a dev server skip the token while you build.</span></li><li class='flex items-start gap-2.5'><span class='text-violet-400'>→</span><span>Read-only tokens never see a mutating tool in the list.</span></li><li class='flex items-start gap-2.5'><span class='text-violet-400'>→</span><span>Copy-paste config for Claude Code, Cursor, VS Code, and Claude Desktop.</span></li></ul>"}}],[{"block_type":"text","content":{"html_content":"<div class='space-y-4'><div class='p-5 rounded-xl border border-slate-700 bg-slate-900'><h4 class='text-sm font-bold text-white mb-1'>Editor BYOK via OpenRouter</h4><p class='text-xs text-slate-400 leading-relaxed'>Pick any model, from Claude to Gemini to open weights, with one key. Costs stay on your OpenRouter bill and switch with a toggle.</p></div><div class='p-5 rounded-xl border border-slate-700 bg-slate-900'><h4 class='text-sm font-bold text-white mb-1'>AI Inside the Editor</h4><p class='text-xs text-slate-400 leading-relaxed'>An inline toolbar rewrites copy, refactors columns, and translates whole pages. Output is valid block data, so layouts never break.</p></div><div class='p-5 rounded-xl border border-slate-700 bg-slate-900'><h4 class='text-sm font-bold text-white mb-1'>Privacy-First Design</h4><p class='text-xs text-slate-400 leading-relaxed'>Requests go straight to your provider with your key. NextBlock never stores, logs, or trains on your content.</p></div></div>"}}]]}$nbcx3v2$::jsonb, 3),
|
|
91
|
-
(v_cortex, v_en, 'section', $nbcx4v2${"container_type":"container","background":{"type":"gradient","gradient":{"type":"linear","direction":"135deg","stops":[{"color":"#312e81","position":0},{"color":"#1e1b4b","position":100}]}},"responsive_columns":{"mobile":1,"tablet":1,"desktop":1},"column_gap":"none","padding":{"top":"xl","bottom":"xl"},"vertical_alignment":"center","column_blocks":[[{"block_type":"heading","content":{"level":2,"text_content":"Ready to connect your AI to your CMS?","textAlign":"center","textColor":"background"}},{"block_type":"text","content":{"html_content":"<p class='text-center text-violet-100 max-w-xl mx-auto mt-2 mb-6'>One license unlocks Cortex AI in the editor and the MCP server. Start with 30 days free and no credit card, bring your own AI subscription, and keep your data yours.</p>"}},{"block_type":"button","content":{"text":"Start the 30-Day Free Trial","url":"https://nextblock.dev/product/nextblock-cortex-ai-cortex-ai-license","variant":"secondary","size":"lg","position":"center"}}]]}$nbcx4v2$::jsonb, 4);
|
|
92
|
-
END IF;
|
|
93
|
-
END IF;
|
|
94
|
-
|
|
95
|
-
---------------------------------------------------------------------------
|
|
96
|
-
-- 3. MCP guide body (EN) + retire the rasterised diagram's media row
|
|
97
|
-
---------------------------------------------------------------------------
|
|
98
|
-
SELECT id INTO v_post FROM public.posts WHERE slug = 'cortex-ai-mcp-connection-guide' AND language_id = v_en ORDER BY id LIMIT 1;
|
|
99
|
-
|
|
100
|
-
IF v_post IS NOT NULL THEN
|
|
101
|
-
UPDATE public.blocks SET content = $nbmcpguide3${"html_content":"<p class='text-lg leading-8 text-slate-700 dark:text-slate-300'>This guide shows you how to connect Claude to NextBlock CMS with an open standard instead of a vendor plugin. Cortex AI turns your site into a Model Context Protocol server. Claude Code, Cursor, ChatGPT, and Gemini can then read your database schema, draft page layouts, and update navigation from their own chat window. You pay for the AI subscription you already have, with no token markup in between.</p><div class='grid gap-4 md:grid-cols-3 my-10'><div class='rounded-3xl border border-sky-200/70 bg-sky-50/70 p-6 dark:border-sky-500/20 dark:bg-sky-500/10'><p class='mt-0 mb-0 text-xs font-semibold uppercase tracking-[0.22em] text-sky-700 dark:text-sky-200'>One config block</p><p class='mt-3 mb-0 text-xl font-semibold text-slate-900 dark:text-white'>Setup in minutes.</p><p class='mt-3 mb-0 text-sm text-slate-600 dark:text-slate-300'>Paste one JSON entry into Claude Code, Cursor, or VS Code. The CMS settings card writes it for you.</p></div><div class='rounded-3xl border border-indigo-200/70 bg-indigo-50/70 p-6 dark:border-indigo-500/20 dark:bg-indigo-500/10'><p class='mt-0 mb-0 text-xs font-semibold uppercase tracking-[0.22em] text-indigo-700 dark:text-indigo-200'>Free to try</p><p class='mt-3 mb-0 text-xl font-semibold text-slate-900 dark:text-white'>30 days, no credit card.</p><p class='mt-3 mb-0 text-sm text-slate-600 dark:text-slate-300'>The CMS is free forever. Cortex AI, which includes the MCP server, starts with a 30-day free trial.</p></div><div class='rounded-3xl border border-emerald-200/70 bg-emerald-50/70 p-6 dark:border-emerald-500/20 dark:bg-emerald-500/10'><p class='mt-0 mb-0 text-xs font-semibold uppercase tracking-[0.22em] text-emerald-700 dark:text-emerald-200'>Live Drafts</p><p class='mt-3 mb-0 text-xl font-semibold text-slate-900 dark:text-white'>Nothing ships by accident.</p><p class='mt-3 mb-0 text-sm text-slate-600 dark:text-slate-300'>Every layout the agent writes lands as a draft. An editor reviews it and hits publish.</p></div></div><p>Every prompt becomes a structured database record rather than a pile of generated code. Your editors keep a visual CMS, your developers keep a clean Next.js 16 app, and nothing goes live until someone hits publish.</p><h2>The Problem with Traditional AI Web Builders</h2><p>Prompt builders such as Lovable, Bolt, and v0 are impressive on day one. You describe a page and get a working React app in minutes. The trouble starts on day two.</p><div class='not-prose my-8 overflow-hidden rounded-3xl border border-slate-200 bg-white shadow-sm dark:border-slate-800 dark:bg-slate-900'><div class='flex flex-wrap items-end justify-between gap-3 px-5 pt-6 pb-4'><div><p class='text-xs font-semibold uppercase tracking-[0.22em] text-slate-500 dark:text-slate-400'>Side by side</p><p class='mt-1 text-xl font-semibold text-slate-900 dark:text-white'>Prototype tools versus NextBlock.</p></div><p class='text-xs text-slate-500 dark:text-slate-400'>What happens after the first prompt.</p></div><div class='overflow-x-auto'><table class='w-full min-w-[640px] border-collapse'><thead><tr class='bg-slate-50 dark:bg-slate-950/60'><th scope='col' class='px-5 py-3 text-left text-xs font-semibold uppercase tracking-[0.2em] text-slate-500 dark:text-slate-400'>What you get</th><th scope='col' class='px-5 py-3 text-left text-xs font-semibold uppercase tracking-[0.2em] text-rose-600 dark:text-rose-300'>Lovable, Bolt, v0</th><th scope='col' class='bg-emerald-50/60 px-5 py-3 text-left text-xs font-semibold uppercase tracking-[0.2em] text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-200'>NextBlock</th></tr></thead><tbody><tr class='border-t border-slate-200 dark:border-slate-800'><th scope='row' class='px-5 py-4 text-left align-top text-sm font-semibold text-foreground'>Day one</th><td class='px-5 py-4 align-top text-sm text-muted-foreground'><span class='mr-2 inline-flex h-5 w-5 items-center justify-center rounded-full bg-rose-100 text-xs font-bold text-rose-600 dark:bg-rose-500/20 dark:text-rose-300'>✗</span>Disposable code with no content layer.</td><td class='bg-emerald-50/60 px-5 py-4 align-top text-sm text-foreground dark:bg-emerald-500/10'><span class='mr-2 inline-flex h-5 w-5 items-center justify-center rounded-full bg-emerald-100 text-xs font-bold text-emerald-700 dark:bg-emerald-500/20 dark:text-emerald-200'>✓</span>A live Next.js 16 and Supabase website with a CMS.</td></tr><tr class='border-t border-slate-200 dark:border-slate-800'><th scope='row' class='px-5 py-4 text-left align-top text-sm font-semibold text-foreground'>Changing a headline</th><td class='px-5 py-4 align-top text-sm text-muted-foreground'><span class='mr-2 inline-flex h-5 w-5 items-center justify-center rounded-full bg-rose-100 text-xs font-bold text-rose-600 dark:bg-rose-500/20 dark:text-rose-300'>✗</span>Another prompt or another pull request.</td><td class='bg-emerald-50/60 px-5 py-4 align-top text-sm text-foreground dark:bg-emerald-500/10'><span class='mr-2 inline-flex h-5 w-5 items-center justify-center rounded-full bg-emerald-100 text-xs font-bold text-emerald-700 dark:bg-emerald-500/20 dark:text-emerald-200'>✓</span>An editor types it in a Notion-style editor.</td></tr><tr class='border-t border-slate-200 dark:border-slate-800'><th scope='row' class='px-5 py-4 text-left align-top text-sm font-semibold text-foreground'>Drafts and revisions</th><td class='px-5 py-4 align-top text-sm text-muted-foreground'><span class='mr-2 inline-flex h-5 w-5 items-center justify-center rounded-full bg-rose-100 text-xs font-bold text-rose-600 dark:bg-rose-500/20 dark:text-rose-300'>✗</span>Code history only.</td><td class='bg-emerald-50/60 px-5 py-4 align-top text-sm text-foreground dark:bg-emerald-500/10'><span class='mr-2 inline-flex h-5 w-5 items-center justify-center rounded-full bg-emerald-100 text-xs font-bold text-emerald-700 dark:bg-emerald-500/20 dark:text-emerald-200'>✓</span>Live Drafts, revisions, and one-click restore.</td></tr><tr class='border-t border-slate-200 dark:border-slate-800'><th scope='row' class='px-5 py-4 text-left align-top text-sm font-semibold text-foreground'>Translations and SEO</th><td class='px-5 py-4 align-top text-sm text-muted-foreground'><span class='mr-2 inline-flex h-5 w-5 items-center justify-center rounded-full bg-rose-100 text-xs font-bold text-rose-600 dark:bg-rose-500/20 dark:text-rose-300'>✗</span>Not built in.</td><td class='bg-emerald-50/60 px-5 py-4 align-top text-sm text-foreground dark:bg-emerald-500/10'><span class='mr-2 inline-flex h-5 w-5 items-center justify-center rounded-full bg-emerald-100 text-xs font-bold text-emerald-700 dark:bg-emerald-500/20 dark:text-emerald-200'>✓</span>Per-block translation and SEO checks as you type.</td></tr><tr class='border-t border-slate-200 dark:border-slate-800'><th scope='row' class='px-5 py-4 text-left align-top text-sm font-semibold text-foreground'>AI costs</th><td class='px-5 py-4 align-top text-sm text-muted-foreground'><span class='mr-2 inline-flex h-5 w-5 items-center justify-center rounded-full bg-rose-100 text-xs font-bold text-rose-600 dark:bg-rose-500/20 dark:text-rose-300'>✗</span>Platform credits, bought from the tool.</td><td class='bg-emerald-50/60 px-5 py-4 align-top text-sm text-foreground dark:bg-emerald-500/10'><span class='mr-2 inline-flex h-5 w-5 items-center justify-center rounded-full bg-emerald-100 text-xs font-bold text-emerald-700 dark:bg-emerald-500/20 dark:text-emerald-200'>✓</span>Your own subscription over MCP, no markup.</td></tr><tr class='border-t border-slate-200 dark:border-slate-800'><th scope='row' class='px-5 py-4 text-left align-top text-sm font-semibold text-foreground'>Price</th><td class='px-5 py-4 align-top text-sm text-muted-foreground'><span class='mr-2 inline-flex h-5 w-5 items-center justify-center rounded-full bg-rose-100 text-xs font-bold text-rose-600 dark:bg-rose-500/20 dark:text-rose-300'>✗</span>A monthly plan.</td><td class='bg-emerald-50/60 px-5 py-4 align-top text-sm text-foreground dark:bg-emerald-500/10'><span class='mr-2 inline-flex h-5 w-5 items-center justify-center rounded-full bg-emerald-100 text-xs font-bold text-emerald-700 dark:bg-emerald-500/20 dark:text-emerald-200'>✓</span>Free CMS. Cortex AI after a 30-day free trial.</td></tr></tbody></table></div></div><p>NextBlock takes the opposite view from the prototype tools. AI should draft the site, and people should own it. The MCP connection is how those two worlds meet.</p><h2>How Cortex AI Uses Model Context Protocol (MCP)</h2><p>Model Context Protocol is an open standard for giving AI agents tools. A client such as Claude Code lists the tools a server offers, calls them with typed arguments, and reads typed results back. Cortex AI ships that server inside your NextBlock install at <code>/api/mcp</code>.</p><div class='not-prose my-12 overflow-hidden rounded-[2rem] border border-slate-800 bg-slate-950 p-6 shadow-2xl sm:p-8'><p class='text-[0.65rem] font-semibold uppercase tracking-[0.3em] text-indigo-300'>Model Context Protocol · NextBlock Cortex AI</p><p class='mt-2 text-2xl font-extrabold text-white sm:text-3xl'>From prompt to production, without a redeploy.</p><p class='mt-2 max-w-2xl text-sm text-slate-400'>Your AI client talks to the CMS over an open standard. Output lands as data, not as code you have to host.</p><div class='mt-8 grid gap-4 md:grid-cols-2 xl:grid-cols-4'><div class='relative flex flex-col rounded-2xl border border-sky-400/40 bg-white/5 p-5'><span class='block h-1 w-12 rounded-full bg-sky-400'></span><p class='mt-4 text-[0.65rem] font-semibold uppercase tracking-[0.25em] text-sky-300'>Step 1 · Your AI client</p><p class='mt-2 text-lg font-bold leading-snug text-white'>Prompt</p><p class='mt-1 text-xs text-slate-400'>Any MCP client you already pay for.</p><div class='mt-4 flex-1 text-sm text-slate-200'><div class='flex flex-wrap gap-2'><span class='rounded-full border border-sky-400/40 bg-sky-400/10 px-3 py-1 text-xs font-semibold text-slate-100'>Claude Code</span><span class='rounded-full border border-sky-400/40 bg-sky-400/10 px-3 py-1 text-xs font-semibold text-slate-100'>Cursor</span><span class='rounded-full border border-sky-400/40 bg-sky-400/10 px-3 py-1 text-xs font-semibold text-slate-100'>ChatGPT</span><span class='rounded-full border border-sky-400/40 bg-sky-400/10 px-3 py-1 text-xs font-semibold text-slate-100'>Gemini</span></div><p class='mt-4 text-xs text-slate-300'>One JSON block in your client config registers the server. That is the setup.</p></div><p class='mt-5 rounded-lg bg-sky-400/10 px-3 py-2 text-center text-[0.7rem] font-semibold text-sky-300'>Your subscription · no token markup</p><span class='absolute -right-4 top-1/2 hidden -translate-y-1/2 text-xl text-slate-500 xl:block' aria-hidden='true'>→</span></div><div class='relative flex flex-col rounded-2xl border border-violet-400/40 bg-white/5 p-5'><span class='block h-1 w-12 rounded-full bg-violet-400'></span><p class='mt-4 text-[0.65rem] font-semibold uppercase tracking-[0.25em] text-violet-300'>Step 2 · /api/mcp</p><p class='mt-2 text-lg font-bold leading-snug text-white'>Cortex AI MCP server</p><p class='mt-1 text-xs text-slate-400'>Streamable HTTP · bearer token · scoped.</p><div class='mt-4 flex-1 text-sm text-slate-200'><div class='space-y-1.5'><code class='block rounded-md bg-white/5 px-3 py-1.5 font-mono text-xs text-violet-100'>get_database_schema</code><code class='block rounded-md bg-white/5 px-3 py-1.5 font-mono text-xs text-violet-100'>generate_jsonb_layout</code><code class='block rounded-md bg-white/5 px-3 py-1.5 font-mono text-xs text-violet-100'>update_site_navigation</code><code class='block rounded-md bg-white/5 px-3 py-1.5 font-mono text-xs text-violet-100'>query_site_analytics</code><code class='block rounded-md bg-white/5 px-3 py-1.5 font-mono text-xs text-violet-100'>search_stock_media</code></div></div><p class='mt-5 rounded-lg bg-violet-400/10 px-3 py-2 text-center text-[0.7rem] font-semibold text-violet-300'>5 contract tools · 29 typed tools</p><span class='absolute -right-4 top-1/2 hidden -translate-y-1/2 text-xl text-slate-500 xl:block' aria-hidden='true'>→</span></div><div class='relative flex flex-col rounded-2xl border border-emerald-400/40 bg-white/5 p-5'><span class='block h-1 w-12 rounded-full bg-emerald-400'></span><p class='mt-4 text-[0.65rem] font-semibold uppercase tracking-[0.25em] text-emerald-300'>Step 3 · PostgreSQL</p><p class='mt-2 text-lg font-bold leading-snug text-white'>Validated JSONB blocks</p><p class='mt-1 text-xs text-slate-400'>Supabase · one Zod schema per block.</p><div class='mt-4 flex-1 text-sm text-slate-200'><div class='space-y-2'><p class='flex items-start gap-2 text-sm text-slate-200'><span class='mt-0.5 inline-flex h-4 w-4 flex-shrink-0 items-center justify-center rounded-full bg-emerald-400/20 text-[0.6rem] font-bold text-emerald-300'>✓</span><span>Staged as a Live Draft.</span></p><p class='flex items-start gap-2 text-sm text-slate-200'><span class='mt-0.5 inline-flex h-4 w-4 flex-shrink-0 items-center justify-center rounded-full bg-emerald-400/20 text-[0.6rem] font-bold text-emerald-300'>✓</span><span>Editors refine in the visual CMS.</span></p><p class='flex items-start gap-2 text-sm text-slate-200'><span class='mt-0.5 inline-flex h-4 w-4 flex-shrink-0 items-center justify-center rounded-full bg-emerald-400/20 text-[0.6rem] font-bold text-emerald-300'>✓</span><span>Revisions and SEO checks built in.</span></p></div></div><p class='mt-5 rounded-lg bg-emerald-400/10 px-3 py-2 text-center text-[0.7rem] font-semibold text-emerald-300'>Nothing goes live until publish</p><span class='absolute -right-4 top-1/2 hidden -translate-y-1/2 text-xl text-slate-500 xl:block' aria-hidden='true'>→</span></div><div class='relative flex flex-col rounded-2xl border border-amber-400/40 bg-white/5 p-5'><span class='block h-1 w-12 rounded-full bg-amber-400'></span><p class='mt-4 text-[0.65rem] font-semibold uppercase tracking-[0.25em] text-amber-300'>Step 4 · Next.js 16</p><p class='mt-2 text-lg font-bold leading-snug text-white'>Published page</p><p class='mt-1 text-xs text-slate-400'>Server Components · edge cached.</p><div class='mt-4 flex-1 text-sm text-slate-200'><div class='space-y-2'><p class='flex items-start gap-2 text-sm text-slate-200'><span class='mt-0.5 inline-flex h-4 w-4 flex-shrink-0 items-center justify-center rounded-full bg-amber-400/20 text-[0.6rem] font-bold text-amber-300'>✓</span><span>No rebuild, no redeploy.</span></p><p class='flex items-start gap-2 text-sm text-slate-200'><span class='mt-0.5 inline-flex h-4 w-4 flex-shrink-0 items-center justify-center rounded-full bg-amber-400/20 text-[0.6rem] font-bold text-amber-300'>✓</span><span>100/100 Lighthouse defaults.</span></p><p class='flex items-start gap-2 text-sm text-slate-200'><span class='mt-0.5 inline-flex h-4 w-4 flex-shrink-0 items-center justify-center rounded-full bg-amber-400/20 text-[0.6rem] font-bold text-amber-300'>✓</span><span>Same site on day two.</span></p></div></div><p class='mt-5 rounded-lg bg-amber-400/10 px-3 py-2 text-center text-[0.7rem] font-semibold text-amber-300'>A website plus a CMS</p></div></div><div class='mt-6 h-1.5 rounded-full bg-gradient-to-r from-sky-400 via-violet-400 to-amber-400'></div><p class='mt-4 text-center text-sm text-slate-300'>Editors keep a visual CMS. Developers keep a clean Next.js 16 codebase. The agent never touches either.</p></div><p>The endpoint speaks Streamable HTTP. Your client posts JSON-RPC messages over a normal HTTPS request, and the server answers in the same response. There is no long-lived SSE stream to babysit and no SDK to install on the server side. The same 29 typed tools that power Cortex AI inside the editor are exposed over the wire, so the agent in your IDE and the agent in your CMS never drift apart.</p><div class='grid gap-4 md:grid-cols-2 my-8'><div class='rounded-3xl border border-violet-200/70 bg-violet-50/70 p-6 dark:border-violet-500/20 dark:bg-violet-500/10'><p class='mt-0 mb-0 text-xs font-semibold uppercase tracking-[0.22em] text-violet-700 dark:text-violet-200'>Safety rule one</p><p class='mt-3 mb-0 text-xl font-semibold text-slate-900 dark:text-white'>Layouts stage as Live Drafts.</p><p class='mt-3 mb-0 text-sm text-slate-600 dark:text-slate-300'>Layout tools write drafts, so nothing reaches visitors until an editor publishes it.</p></div><div class='rounded-3xl border border-blue-200/70 bg-blue-50/70 p-6 dark:border-blue-500/20 dark:bg-blue-500/10'><p class='mt-0 mb-0 text-xs font-semibold uppercase tracking-[0.22em] text-blue-700 dark:text-blue-200'>Safety rule two</p><p class='mt-3 mb-0 text-xl font-semibold text-slate-900 dark:text-white'>Every token carries a scope.</p><p class='mt-3 mb-0 text-sm text-slate-600 dark:text-slate-300'>A read-only token never even sees a tool that could change data. Mutating tools are absent from its list.</p></div></div><h3>Available MCP Database Tools</h3><p>Five tool names form the public MCP contract. Each one forwards to a tested Cortex AI executor.</p><div class='grid gap-4 md:grid-cols-2 my-8'><div class='rounded-3xl border border-slate-200 bg-white p-5 shadow-sm dark:border-white/10 dark:bg-white/5'><div class='flex items-center justify-between gap-3'><code class='rounded-lg bg-violet-50 px-2.5 py-1 text-sm text-violet-700 dark:bg-violet-500/15 dark:text-violet-200'>get_database_schema</code><span class='rounded-full border px-2.5 py-0.5 text-[0.65rem] font-semibold uppercase tracking-[0.18em] border-emerald-300 text-emerald-700 dark:border-emerald-500/40 dark:text-emerald-200'>read</span></div><p class='mt-3 mb-0 text-sm text-slate-600 dark:text-slate-300'>Returns every table the agent may read or change, with columns, primary keys, and read-only flags.</p></div><div class='rounded-3xl border border-slate-200 bg-white p-5 shadow-sm dark:border-white/10 dark:bg-white/5'><div class='flex items-center justify-between gap-3'><code class='rounded-lg bg-violet-50 px-2.5 py-1 text-sm text-violet-700 dark:bg-violet-500/15 dark:text-violet-200'>generate_jsonb_layout</code><span class='rounded-full border px-2.5 py-0.5 text-[0.65rem] font-semibold uppercase tracking-[0.18em] border-amber-300 text-amber-700 dark:border-amber-500/40 dark:text-amber-200'>write</span></div><p class='mt-3 mb-0 text-sm text-slate-600 dark:text-slate-300'>Turns a prompt into a full page layout, validates each block against the NextBlock schema, and stages it as a Live Draft.</p></div><div class='rounded-3xl border border-slate-200 bg-white p-5 shadow-sm dark:border-white/10 dark:bg-white/5'><div class='flex items-center justify-between gap-3'><code class='rounded-lg bg-violet-50 px-2.5 py-1 text-sm text-violet-700 dark:bg-violet-500/15 dark:text-violet-200'>update_site_navigation</code><span class='rounded-full border px-2.5 py-0.5 text-[0.65rem] font-semibold uppercase tracking-[0.18em] border-amber-300 text-amber-700 dark:border-amber-500/40 dark:text-amber-200'>write</span></div><p class='mt-3 mb-0 text-sm text-slate-600 dark:text-slate-300'>Adds, renames, or reorders header menu items per locale.</p></div><div class='rounded-3xl border border-slate-200 bg-white p-5 shadow-sm dark:border-white/10 dark:bg-white/5'><div class='flex items-center justify-between gap-3'><code class='rounded-lg bg-violet-50 px-2.5 py-1 text-sm text-violet-700 dark:bg-violet-500/15 dark:text-violet-200'>query_site_analytics</code><span class='rounded-full border px-2.5 py-0.5 text-[0.65rem] font-semibold uppercase tracking-[0.18em] border-emerald-300 text-emerald-700 dark:border-emerald-500/40 dark:text-emerald-200'>read</span></div><p class='mt-3 mb-0 text-sm text-slate-600 dark:text-slate-300'>Reads revenue, order counts, status breakdowns, and top products over a date range.</p></div><div class='rounded-3xl border border-slate-200 bg-white p-5 shadow-sm dark:border-white/10 dark:bg-white/5'><div class='flex items-center justify-between gap-3'><code class='rounded-lg bg-violet-50 px-2.5 py-1 text-sm text-violet-700 dark:bg-violet-500/15 dark:text-violet-200'>search_stock_media</code><span class='rounded-full border px-2.5 py-0.5 text-[0.65rem] font-semibold uppercase tracking-[0.18em] border-emerald-300 text-emerald-700 dark:border-emerald-500/40 dark:text-emerald-200'>read</span></div><p class='mt-3 mb-0 text-sm text-slate-600 dark:text-slate-300'>Finds free stock photos with alt text and photographer credits ready for an image block.</p></div><div class='rounded-3xl border border-dashed border-slate-300 p-5 dark:border-white/20'><p class='mt-0 mb-0 text-sm font-semibold text-slate-900 dark:text-white'>And 24 more.</p><p class='mt-2 mb-0 text-sm text-slate-600 dark:text-slate-300'>Create posts and products, translate pages, upload media, manage themes and scripts. Three resources expose the database, block, and custom block schemas.</p></div></div><h2>Step by Step: Connect Claude to NextBlock CMS in Cursor and Claude Code</h2><p>The server is off by default because it is a remote write surface onto live content. Turning it on takes three steps, and the trial means the first month costs nothing.</p><div class='grid gap-4 md:grid-cols-3 my-8'><div class='rounded-3xl border border-slate-200 bg-slate-50 p-6 dark:border-white/10 dark:bg-white/5'><p class='mt-0 mb-0 font-mono text-3xl font-bold text-sky-500 dark:text-sky-300'>01</p><p class='mt-3 mb-0 text-lg font-semibold text-slate-900 dark:text-white'>Start the free trial.</p><p class='mt-2 mb-0 text-sm text-slate-600 dark:text-slate-300'>Open <strong>CMS Settings → Cortex AI</strong>, start the 30-day trial with no credit card, and switch on the MCP server access card.</p></div><div class='rounded-3xl border border-slate-200 bg-slate-50 p-6 dark:border-white/10 dark:bg-white/5'><p class='mt-0 mb-0 font-mono text-3xl font-bold text-violet-500 dark:text-violet-300'>02</p><p class='mt-3 mb-0 text-lg font-semibold text-slate-900 dark:text-white'>Mint a token.</p><p class='mt-2 mb-0 text-sm text-slate-600 dark:text-slate-300'>Pick the scope you need. Read-only is enough for planning and audits.</p></div><div class='rounded-3xl border border-slate-200 bg-slate-50 p-6 dark:border-white/10 dark:bg-white/5'><p class='mt-0 mb-0 font-mono text-3xl font-bold text-emerald-500 dark:text-emerald-300'>03</p><p class='mt-3 mb-0 text-lg font-semibold text-slate-900 dark:text-white'>Copy the config.</p><p class='mt-2 mb-0 text-sm text-slate-600 dark:text-slate-300'>The card renders one snippet each for Claude Code, Cursor, VS Code, and Claude Desktop.</p></div></div><p>Claude Code needs <code>\"type\": \"http\"</code> in the entry, or it skips the server without a warning. Cursor infers the transport from the URL and needs no type field. VS Code uses a top-level <code>servers</code> key and prompts for the token instead of storing it.</p><h3>Localhost Configuration Without a Token</h3><p>While you build, turn on <strong>Trust localhost without a token</strong> in the same settings card. A dev server on your machine then accepts loopback calls with no header at all. Standalone installs run on port 3000, and the monorepo dev server runs on port 4200.</p><p>Add this block to <code>.mcp.json</code> in your project root for Claude Code.</p><div class='my-8 overflow-hidden rounded-[2rem] border border-slate-800 bg-slate-950 shadow-2xl'><div class='flex items-center gap-2 border-b border-white/10 px-5 py-3'><span class='h-3 w-3 rounded-full bg-red-400/70'></span><span class='h-3 w-3 rounded-full bg-yellow-400/70'></span><span class='h-3 w-3 rounded-full bg-green-400/70'></span><span class='ml-3 text-xs font-mono text-slate-400'>.mcp.json</span></div><pre class='m-0 overflow-x-auto rounded-none bg-transparent px-6 py-5 text-sm leading-6 text-slate-200'><code>{\n \"mcpServers\": {\n \"nextblock\": {\n \"type\": \"http\",\n \"url\": \"http://localhost:3000/api/mcp\"\n }\n }\n}</code></pre></div><p>The CLI form does the same thing in one line.</p><div class='my-8 overflow-hidden rounded-[2rem] border border-slate-800 bg-slate-950 shadow-2xl'><div class='flex items-center gap-2 border-b border-white/10 px-5 py-3'><span class='h-3 w-3 rounded-full bg-red-400/70'></span><span class='h-3 w-3 rounded-full bg-yellow-400/70'></span><span class='h-3 w-3 rounded-full bg-green-400/70'></span><span class='ml-3 text-xs font-mono text-slate-400'>terminal</span></div><pre class='m-0 overflow-x-auto rounded-none bg-transparent px-6 py-5 text-sm leading-6 text-slate-200'><code>claude mcp add --transport http nextblock http://localhost:3000/api/mcp</code></pre></div><div class='rounded-3xl border border-amber-200 bg-amber-50/80 p-6 my-8 dark:border-amber-500/20 dark:bg-amber-500/10'><p class='mt-0 mb-0 text-xs font-semibold uppercase tracking-[0.22em] text-amber-700 dark:text-amber-200'>Development only</p><p class='mt-3 mb-0 text-sm text-slate-700 dark:text-slate-200'>Localhost trust is ignored in production builds, because a proxy can spoof the host header. Production always uses a token.</p></div><h3>Production Authentication via Bearer Tokens</h3><p>In production every client sends a bearer token. Tokens start with <code>nbmcp_</code>, are shown once at mint time, and are stored only as SHA-256 hashes. Revoking one is a single click, and the same value can never be minted again.</p><p>Add this to <code>.cursor/mcp.json</code> for Cursor, or drop the same entry into <code>.mcp.json</code> with a type field for Claude Code.</p><div class='my-8 overflow-hidden rounded-[2rem] border border-slate-800 bg-slate-950 shadow-2xl'><div class='flex items-center gap-2 border-b border-white/10 px-5 py-3'><span class='h-3 w-3 rounded-full bg-red-400/70'></span><span class='h-3 w-3 rounded-full bg-yellow-400/70'></span><span class='h-3 w-3 rounded-full bg-green-400/70'></span><span class='ml-3 text-xs font-mono text-slate-400'>.cursor/mcp.json</span></div><pre class='m-0 overflow-x-auto rounded-none bg-transparent px-6 py-5 text-sm leading-6 text-slate-200'><code>{\n \"mcpServers\": {\n \"nextblock\": {\n \"url\": \"https://your-site.com/api/mcp\",\n \"headers\": { \"Authorization\": \"Bearer nbmcp_your_token\" }\n }\n }\n}</code></pre></div><div class='rounded-3xl border border-violet-200 bg-violet-50/80 p-6 my-8 dark:border-violet-500/20 dark:bg-violet-500/10'><p class='mt-0 mb-0 text-xs font-semibold uppercase tracking-[0.22em] text-violet-700 dark:text-violet-200'>Try it</p><p class='mt-3 mb-0 text-sm text-slate-700 dark:text-slate-200'>Once the client connects, ask for something concrete. Try “inspect the database schema and draft a pricing page with three tiers.” The agent calls the schema tool, then the layout tool, and your CMS shows a new Live Draft ready for review.</p></div><h2>Zero-Redeploy Production Rendering</h2><p>The reason this works is where the output lands. Cortex AI writes strict JSONB block records into PostgreSQL, not HTML strings and not source files. Each block has a Zod schema, so a bad field is rejected before it is stored.</p><div class='grid gap-4 md:grid-cols-3 my-8'><div class='rounded-3xl border border-sky-200/70 bg-sky-50/70 p-6 text-center dark:border-sky-500/20 dark:bg-sky-500/10'><p class='mt-0 mb-0 text-4xl font-extrabold text-slate-900 dark:text-white'>0</p><p class='mt-2 mb-0 text-xs font-semibold uppercase tracking-[0.2em] text-sky-700 dark:text-sky-200'>Rebuilds to publish</p></div><div class='rounded-3xl border border-violet-200/70 bg-violet-50/70 p-6 text-center dark:border-violet-500/20 dark:bg-violet-500/10'><p class='mt-0 mb-0 text-4xl font-extrabold text-slate-900 dark:text-white'>1</p><p class='mt-2 mb-0 text-xs font-semibold uppercase tracking-[0.2em] text-violet-700 dark:text-violet-200'>Zod schema per block</p></div><div class='rounded-3xl border border-emerald-200/70 bg-emerald-50/70 p-6 text-center dark:border-emerald-500/20 dark:bg-emerald-500/10'><p class='mt-0 mb-0 text-4xl font-extrabold text-slate-900 dark:text-white'>100</p><p class='mt-2 mb-0 text-xs font-semibold uppercase tracking-[0.2em] text-emerald-700 dark:text-emerald-200'>Lighthouse by default</p></div></div><p>At request time Next.js 16 renders those records with Server Components and caches the result at the edge. There is no build step between publish and live, and no HTML sanitizer tax on every render. The 100/100 Lighthouse defaults you get on an empty site are the same ones you get after the agent has drafted fifty pages.</p><div class='rounded-3xl border border-slate-200 bg-slate-50 p-6 my-10 dark:border-white/10 dark:bg-white/5'><p class='mt-0 mb-0 text-xs font-semibold uppercase tracking-[0.22em] text-slate-600 dark:text-slate-300'>Next step</p><p class='mt-3 mb-0 text-xl font-semibold text-slate-900 dark:text-white'>Up in ten minutes, free for thirty days.</p><p class='mt-3 text-sm text-slate-600 dark:text-slate-300'>Deploy the free CMS to Vercel in one click, start the Cortex AI trial with no credit card, and connect Claude to NextBlock CMS today. Read how the block registry keeps all of it safe if you want the full picture.</p><div class='mt-5 flex flex-wrap gap-3'><a href='https://nextblock.dev/product/nextblock-cortex-ai-cortex-ai-license' class='inline-flex items-center rounded-full bg-slate-900 px-6 py-3 text-sm font-semibold text-white no-underline shadow-lg hover:bg-slate-700 dark:bg-white dark:text-slate-900 dark:hover:bg-slate-200'>Start the 30-day free trial</a><a href='https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fnextblock-cms%2Fnextblock&project-name=nextblock&repository-name=nextblock&stores=%5B%7B%22type%22%3A%22integration%22%2C%22integrationSlug%22%3A%22supabase%22%2C%22productSlug%22%3A%22supabase%22%7D%5D' class='inline-flex items-center rounded-full border border-slate-300 px-6 py-3 text-sm font-semibold text-slate-700 no-underline hover:border-slate-500 dark:border-white/20 dark:text-slate-200 dark:hover:border-white/50'>Deploy to Vercel</a><a href='/article/how-nextblock-works' class='inline-flex items-center rounded-full border border-slate-300 px-6 py-3 text-sm font-semibold text-slate-700 no-underline hover:border-slate-500 dark:border-white/20 dark:text-slate-200 dark:hover:border-white/50'>How NextBlock works</a></div></div>"}$nbmcpguide3$::jsonb, updated_at = now()
|
|
102
|
-
WHERE post_id = v_post AND block_type = 'text' AND "order" = 0
|
|
103
|
-
AND content->>'html_content' LIKE '%A codebase to babysit.%';
|
|
104
|
-
END IF;
|
|
105
|
-
|
|
106
|
-
DELETE FROM public.media m
|
|
107
|
-
WHERE m.object_key = 'images/mcp-prompt-to-production.webp'
|
|
108
|
-
AND NOT EXISTS (SELECT 1 FROM public.blocks b WHERE b.content::text LIKE '%mcp-prompt-to-production.webp%')
|
|
109
|
-
AND NOT EXISTS (SELECT 1 FROM public.posts p WHERE p.feature_image_id = m.id)
|
|
110
|
-
AND NOT EXISTS (SELECT 1 FROM public.pages p WHERE p.feature_image_id = m.id)
|
|
111
|
-
AND NOT EXISTS (SELECT 1 FROM public.product_media pm WHERE pm.media_id = m.id);
|
|
112
|
-
|
|
113
|
-
---------------------------------------------------------------------------
|
|
114
|
-
-- 4. Articles pages: short hero, essay moves below the grid (EN + FR)
|
|
115
|
-
---------------------------------------------------------------------------
|
|
116
|
-
SELECT id INTO v_articles_en FROM public.pages WHERE slug = 'articles' AND language_id = v_en ORDER BY id LIMIT 1;
|
|
117
|
-
SELECT id INTO v_articles_fr FROM public.pages WHERE slug = 'articles' AND language_id = v_fr ORDER BY id LIMIT 1;
|
|
118
|
-
|
|
119
|
-
IF v_articles_en IS NOT NULL THEN
|
|
120
|
-
UPDATE public.blocks SET content = $nbjhero_en${"is_hero":true,"padding":{"top":"xl","bottom":"xl"},"background":{"type":"gradient","gradient":{"type":"linear","stops":[{"color":"#020817","position":0},{"color":"#1e293b","position":100}],"direction":"135deg"}},"column_gap":"lg","container_type":"container","responsive_columns":{"mobile":1,"tablet":1,"desktop":2},"column_blocks":[[{"block_type":"text","content":{"html_content":"<p class='text-sm uppercase tracking-[0.3em] text-blue-400 font-bold text-center md:text-left mb-4'>The NextBlock Journal</p>"}},{"block_type":"text","content":{"html_content":"<h1 class='text-4xl md:text-5xl font-bold text-white text-center md:text-left mb-6'>The NextBlock Journal: Performance, DX, and Visual Editing</h1>"}},{"block_type":"text","content":{"html_content":"<p class='text-slate-300 text-lg max-w-xl mx-auto md:mx-0 text-center md:text-left leading-relaxed'>Practical guides, architecture deep dives, and editor workflows from the NextBlock team. Pick a topic below or jump straight to the latest posts.</p>"}},{"block_type":"button","content":{"url":"/articles#latest","size":"lg","text":"Explore Articles","variant":"default"}},{"block_type":"button","content":{"url":"https://github.com/nextblock-cms/nextblock/discussions","size":"lg","text":"Subscribe for Updates","variant":"outline"}}],[{"block_type":"text","content":{"html_content":"<div class='h-full flex items-center justify-center rounded-3xl overflow-hidden border border-white/10 bg-white/5 shadow-2xl p-4 backdrop-blur-sm'><img src='/images/developer.webp' alt='Developer working with the Nextblock stack' class='w-full object-cover rounded-2xl shadow-lg' style='max-width: 400px;' /></div>"}}]]}$nbjhero_en$::jsonb, updated_at = now()
|
|
121
|
-
WHERE page_id = v_articles_en AND block_type = 'section' AND content::text LIKE '%Welcome to the NextBlock Journal.%';
|
|
122
|
-
|
|
123
|
-
IF NOT EXISTS (SELECT 1 FROM public.blocks WHERE page_id = v_articles_en AND content::text LIKE '%What the NextBlock Journal Covers%') THEN
|
|
124
|
-
INSERT INTO public.blocks (page_id, language_id, block_type, content, "order")
|
|
125
|
-
VALUES (v_articles_en, v_en, 'section', $nbjsec_en${"padding":{"top":"xl","bottom":"xl"},"background":{"type":"none"},"column_gap":"lg","container_type":"container","responsive_columns":{"mobile":1,"tablet":1,"desktop":1},"column_blocks":[[{"block_type":"heading","content":{"level":2,"textAlign":"center","text_content":"What the NextBlock Journal Covers"}},{"block_type":"text","content":{"html_content":"<p class='text-lg text-muted-foreground text-center max-w-3xl mx-auto mb-10'>Every post is tested on a live site before it is published, and each one includes the full technical reasoning and diagrams. Start with the topic that matches where you are.</p><div class='grid gap-4 md:grid-cols-2'><div class='rounded-3xl border border-sky-200/70 bg-sky-50/70 p-6 dark:border-sky-500/20 dark:bg-sky-500/10'><p class='text-xs font-semibold uppercase tracking-[0.22em] text-sky-700 dark:text-sky-200'>Getting started</p><h3 class='mt-3 text-xl font-semibold text-foreground'>Setup, every way</h3><p class='mt-3 text-sm text-muted-foreground'>Walkthroughs for one-click Vercel deploys, local Docker environments, and custom cloud stacks. Each guide gives you clear, tested steps, so a fresh site is live in minutes rather than days.</p><a href='/article/how-to-setup-nextblock' class='mt-4 inline-flex text-sm font-semibold text-sky-700 no-underline hover:underline dark:text-sky-200'>Read the setup guide →</a></div><div class='rounded-3xl border border-indigo-200/70 bg-indigo-50/70 p-6 dark:border-indigo-500/20 dark:bg-indigo-500/10'><p class='text-xs font-semibold uppercase tracking-[0.22em] text-indigo-700 dark:text-indigo-200'>Architecture and performance</p><h3 class='mt-3 text-xl font-semibold text-foreground'>How the engine works</h3><p class='mt-3 text-sm text-muted-foreground'>Deep dives into fast page rendering, clean CSS delivery, image optimization, and safe database migrations. Learn how NextBlock keeps a 100% Lighthouse score while giving writers a rich block editor.</p><a href='/article/how-nextblock-works' class='mt-4 inline-flex text-sm font-semibold text-indigo-700 no-underline hover:underline dark:text-indigo-200'>Look under the hood →</a></div><div class='rounded-3xl border border-emerald-200/70 bg-emerald-50/70 p-6 dark:border-emerald-500/20 dark:bg-emerald-500/10'><p class='text-xs font-semibold uppercase tracking-[0.22em] text-emerald-700 dark:text-emerald-200'>E-commerce workflows</p><h3 class='mt-3 text-xl font-semibold text-foreground'>From catalog to checkout</h3><p class='mt-3 text-sm text-muted-foreground'>Practical patterns for multi-currency pricing, automated tax sync, stock tracking, and provider-aware checkout with Stripe and Freemius, all managed from the same block editor.</p><a href='/article/nextblock-commerce-guide' class='mt-4 inline-flex text-sm font-semibold text-emerald-700 no-underline hover:underline dark:text-emerald-200'>Read the commerce guide →</a></div><div class='rounded-3xl border border-violet-200/70 bg-violet-50/70 p-6 dark:border-violet-500/20 dark:bg-violet-500/10'><p class='text-xs font-semibold uppercase tracking-[0.22em] text-violet-700 dark:text-violet-200'>Cortex AI and MCP</p><h3 class='mt-3 text-xl font-semibold text-foreground'>AI that writes blocks, not code</h3><p class='mt-3 text-sm text-muted-foreground'>How to generate structured layouts with Cortex AI, connect Claude Code or Cursor to your site over MCP, and speed up translation work. The CMS is free, and Cortex AI starts with a 30-day trial and no credit card.</p><a href='/article/cortex-ai-mcp-connection-guide' class='mt-4 inline-flex text-sm font-semibold text-violet-700 no-underline hover:underline dark:text-violet-200'>Connect your AI →</a></div></div><p class='mt-8 text-center text-base text-foreground max-w-2xl mx-auto'>Every guide reads in under ten minutes. Code samples come from sites already in production, and every screenshot comes from the real CMS interface, so what you see here is what you get.</p><p class='mt-6 text-center text-sm text-muted-foreground max-w-2xl mx-auto'>Have a topic you want covered, or a case study to share? Join the community on <a href='https://github.com/nextblock-cms/nextblock/discussions' class='font-semibold text-foreground underline'>GitHub Discussions</a>. We welcome questions, ideas, and pull requests from all builders, and we update this collection with every release.</p>"}}]]}$nbjsec_en$::jsonb,
|
|
126
|
-
(SELECT COALESCE(MAX("order"), 0) + 1 FROM public.blocks WHERE page_id = v_articles_en));
|
|
127
|
-
END IF;
|
|
128
|
-
END IF;
|
|
129
|
-
|
|
130
|
-
IF v_articles_fr IS NOT NULL THEN
|
|
131
|
-
UPDATE public.blocks SET content = $nbjhero_fr${"is_hero":true,"padding":{"top":"xl","bottom":"xl"},"background":{"type":"gradient","gradient":{"type":"linear","stops":[{"color":"#020817","position":0},{"color":"#1e293b","position":100}],"direction":"135deg"}},"column_gap":"lg","container_type":"container","responsive_columns":{"mobile":1,"tablet":1,"desktop":2},"column_blocks":[[{"block_type":"text","content":{"html_content":"<p class='text-sm uppercase tracking-[0.3em] text-blue-400 font-bold text-center md:text-left mb-4'>Le journal Nextblock</p>"}},{"block_type":"text","content":{"html_content":"<h1 class='text-4xl md:text-5xl font-bold text-white text-center md:text-left mb-6'>Le Journal NextBlock : Performance, Expérience Dev et Édition</h1>"}},{"block_type":"text","content":{"html_content":"<p class='text-slate-300 text-lg max-w-xl mx-auto md:mx-0 text-center md:text-left leading-relaxed'>Guides pratiques, dossiers d'architecture et conseils d'édition par l'équipe NextBlock. Choisissez un thème plus bas, ou allez droit aux derniers articles.</p>"}},{"block_type":"button","content":{"url":"/articles#latest","size":"lg","text":"Explorer les articles","variant":"default"}},{"block_type":"button","content":{"url":"https://github.com/nextblock-cms/nextblock/discussions","size":"lg","text":"S'abonner aux mises à jour","variant":"outline"}}],[{"block_type":"text","content":{"html_content":"<div class='h-full flex items-center justify-center rounded-3xl overflow-hidden border border-white/10 bg-white/5 shadow-2xl p-4 backdrop-blur-sm'><img src='/images/developer.webp' alt='Développeur travaillant avec la stack Nextblock' class='w-full object-cover rounded-2xl shadow-lg' style='max-width: 400px;' /></div>"}}]]}$nbjhero_fr$::jsonb, updated_at = now()
|
|
132
|
-
WHERE page_id = v_articles_fr AND block_type = 'section' AND content::text LIKE '%Bienvenue sur le Journal NextBlock.%';
|
|
133
|
-
|
|
134
|
-
IF NOT EXISTS (SELECT 1 FROM public.blocks WHERE page_id = v_articles_fr AND content::text LIKE '%Ce que couvre le Journal NextBlock%') THEN
|
|
135
|
-
INSERT INTO public.blocks (page_id, language_id, block_type, content, "order")
|
|
136
|
-
VALUES (v_articles_fr, v_fr, 'section', $nbjsec_fr${"padding":{"top":"xl","bottom":"xl"},"background":{"type":"none"},"column_gap":"lg","container_type":"container","responsive_columns":{"mobile":1,"tablet":1,"desktop":1},"column_blocks":[[{"block_type":"heading","content":{"level":2,"textAlign":"center","text_content":"Ce que couvre le Journal NextBlock"}},{"block_type":"text","content":{"html_content":"<p class='text-lg text-muted-foreground text-center max-w-3xl mx-auto mb-10'>Chaque article est testé sur un vrai site avant sa sortie. Il donne le raisonnement complet et des schémas clairs. Commencez par le thème qui vous parle.</p><div class='grid gap-4 md:grid-cols-2'><div class='rounded-3xl border border-sky-200/70 bg-sky-50/70 p-6 dark:border-sky-500/20 dark:bg-sky-500/10'><p class='text-xs font-semibold uppercase tracking-[0.22em] text-sky-700 dark:text-sky-200'>Premiers pas</p><h3 class='mt-3 text-xl font-semibold text-foreground'>Installer NextBlock, à votre façon</h3><p class='mt-3 text-sm text-muted-foreground'>Des guides pas à pas pour un déploiement Vercel en un clic, un Docker local ou votre propre cloud. Chaque étape est vérifiée. Votre site est en ligne en quelques minutes, pas en quelques jours.</p><a href='/article/comment-configurer-nextblock' class='mt-4 inline-flex text-sm font-semibold text-sky-700 no-underline hover:underline dark:text-sky-200'>Lire le guide d'installation →</a></div><div class='rounded-3xl border border-indigo-200/70 bg-indigo-50/70 p-6 dark:border-indigo-500/20 dark:bg-indigo-500/10'><p class='text-xs font-semibold uppercase tracking-[0.22em] text-indigo-700 dark:text-indigo-200'>Architecture et performance</p><h3 class='mt-3 text-xl font-semibold text-foreground'>Comment marche le moteur</h3><p class='mt-3 text-sm text-muted-foreground'>Des dossiers sur le rendu rapide des pages, la livraison du CSS, les images et les migrations sûres. Vous verrez comment NextBlock garde un score Lighthouse parfait, avec un vrai éditeur de blocs pour vos auteurs.</p><a href='/article/comment-nextblock-fonctionne' class='mt-4 inline-flex text-sm font-semibold text-indigo-700 no-underline hover:underline dark:text-indigo-200'>Regarder sous le capot →</a></div><div class='rounded-3xl border border-emerald-200/70 bg-emerald-50/70 p-6 dark:border-emerald-500/20 dark:bg-emerald-500/10'><p class='text-xs font-semibold uppercase tracking-[0.22em] text-emerald-700 dark:text-emerald-200'>Commerce en ligne</p><h3 class='mt-3 text-xl font-semibold text-foreground'>Du catalogue au paiement</h3><p class='mt-3 text-sm text-muted-foreground'>Des méthodes concrètes pour les prix en plusieurs devises, les taxes automatiques, les stocks et le paiement avec Stripe et Freemius. Tout se gère depuis le même éditeur de blocs.</p><a href='/article/guide-commerce-nextblock' class='mt-4 inline-flex text-sm font-semibold text-emerald-700 no-underline hover:underline dark:text-emerald-200'>Lire le guide commerce →</a></div><div class='rounded-3xl border border-violet-200/70 bg-violet-50/70 p-6 dark:border-violet-500/20 dark:bg-violet-500/10'><p class='text-xs font-semibold uppercase tracking-[0.22em] text-violet-700 dark:text-violet-200'>Cortex AI et MCP</p><h3 class='mt-3 text-xl font-semibold text-foreground'>Une IA qui écrit des blocs, pas du code</h3><p class='mt-3 text-sm text-muted-foreground'>Créez des mises en page avec Cortex AI. Reliez Claude Code ou Cursor à votre site via MCP. Traduisez plus vite. Le CMS est gratuit, et Cortex AI offre un essai de 30 jours sans carte bancaire.</p><a href='/article/cortex-ai-mcp-connection-guide' class='mt-4 inline-flex text-sm font-semibold text-violet-700 no-underline hover:underline dark:text-violet-200'>Connecter votre IA →</a></div></div><p class='mt-8 text-center text-base text-foreground max-w-2xl mx-auto'>Chaque guide se lit en moins de dix minutes. Les exemples de code viennent de sites déjà en production, et chaque capture vient de la vraie interface du CMS. Ce que vous lisez ici est ce que vous obtenez.</p><p class='mt-6 text-center text-sm text-muted-foreground max-w-2xl mx-auto'>Un sujet à proposer, ou une étude de cas à partager ? Rejoignez la communauté sur <a href='https://github.com/nextblock-cms/nextblock/discussions' class='font-semibold text-foreground underline'>GitHub Discussions</a>. Vos questions, idées et contributions sont les bienvenues. Cette collection grandit à chaque version.</p>"}}]]}$nbjsec_fr$::jsonb,
|
|
137
|
-
(SELECT COALESCE(MAX("order"), 0) + 1 FROM public.blocks WHERE page_id = v_articles_fr));
|
|
138
|
-
END IF;
|
|
139
|
-
END IF;
|
|
140
|
-
END
|
|
141
|
-
$body$;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
-- 00000000000042_how_nextblock_works_css_diagram.sql
|
|
2
|
-
--
|
|
3
|
-
-- The "How NextBlock™ Works" article (EN 'how-nextblock-works', FR
|
|
4
|
-
-- 'comment-nextblock-fonctionne') illustrated the platform with a rasterised
|
|
5
|
-
-- figure (public/images/extensibility.webp). This replaces that <figure> with a
|
|
6
|
-
-- CSS/HTML architecture diagram inside the same rich-text block: the NB platform
|
|
7
|
-
-- core (site logo) with four spokes, the "unified architecture" band with three
|
|
8
|
-
-- panels (content modeling, live editor and publishing, premium modules), the
|
|
9
|
-
-- stack strip and the tagline. Same visual story, but crisp at every size,
|
|
10
|
-
-- theme-aware and editable in the CMS.
|
|
11
|
-
--
|
|
12
|
-
-- The image file and its media row stay: the sandbox reset route registers it as
|
|
13
|
-
-- a core media record and nothing else changes. Only the two article bodies do.
|
|
14
|
-
--
|
|
15
|
-
-- Idempotent: replace() is a no-op once the figure is gone, and the row is only
|
|
16
|
-
-- matched while the exact seeded figure is still present, so an editor's rewrite
|
|
17
|
-
-- of the article is left alone. Both posts still grade 100/100 in
|
|
18
|
-
-- libs/utils/src/lib/seo (the logo <img> carries alt text).
|
|
19
|
-
--
|
|
20
|
-
-- After adding this file: npm run generate:migrations-bundle && npm run
|
|
21
|
-
-- generate:sandbox && npm run sync:create-nextblock.
|
|
22
|
-
|
|
23
|
-
DO $body$
|
|
24
|
-
DECLARE
|
|
25
|
-
v_en integer;
|
|
26
|
-
v_fr integer;
|
|
27
|
-
v_post integer;
|
|
28
|
-
BEGIN
|
|
29
|
-
SELECT id INTO v_en FROM public.languages WHERE code = 'en' LIMIT 1;
|
|
30
|
-
SELECT id INTO v_fr FROM public.languages WHERE code = 'fr' LIMIT 1;
|
|
31
|
-
|
|
32
|
-
SELECT id INTO v_post FROM public.posts WHERE slug = 'how-nextblock-works' AND language_id = v_en ORDER BY id LIMIT 1;
|
|
33
|
-
IF v_post IS NOT NULL THEN
|
|
34
|
-
UPDATE public.blocks
|
|
35
|
-
SET content = jsonb_set(content, '{html_content}', to_jsonb(replace(content->>'html_content', $nbfig_en$<figure class='my-12 overflow-hidden rounded-[2rem] border border-slate-200/80 bg-slate-950 shadow-2xl dark:border-white/10'>
|
|
36
|
-
<img src='/images/extensibility.webp' alt='NextBlock™ extensibility artwork showing the CMS connected to reusable modules and integrations' class='w-full h-auto object-cover' />
|
|
37
|
-
<figcaption class='border-t border-white/10 px-6 py-4 text-sm text-slate-300'>One unified design system spans content blocks, editing tools, and store features.</figcaption>
|
|
38
|
-
</figure>$nbfig_en$, $nbdiag_en$<div class='not-prose my-12 overflow-hidden rounded-[2rem] border border-slate-800 shadow-2xl'><div class='bg-gradient-to-b from-[#020817] via-[#0b1a3a] to-[#0f172a] p-6 sm:p-8'><p class='text-center text-[0.65rem] font-semibold uppercase tracking-[0.3em] text-cyan-300'>NB platform core</p><div class='mx-auto mt-4 flex h-28 w-28 items-center justify-center rounded-full border border-cyan-400/40 bg-cyan-400/10 shadow-[0_0_70px_rgba(34,211,238,0.28)]'><img src='/images/nextblock-logo-small.webp' alt='NextBlock logo at the centre of the platform core' class='h-16 w-16 object-contain' /></div><p class='mt-3 text-center text-sm font-bold text-white'>One Next.js 16 app on Supabase</p><div class='mx-auto h-8 w-px bg-cyan-400/40'></div><div class='relative'><div class='absolute left-[12.5%] right-[12.5%] top-0 h-px bg-cyan-400/30'></div><div class='grid grid-cols-2 gap-3 md:grid-cols-4'><div class='flex flex-col items-center'><div class='h-6 w-px bg-cyan-400/40'></div><div class='flex w-full flex-col items-center rounded-2xl border border-cyan-400/30 bg-white/5 px-3 py-4 text-center'><span class='flex h-11 w-11 items-center justify-center rounded-xl border border-cyan-400/40 bg-cyan-400/10 text-cyan-300'><svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' class='h-6 w-6' aria-hidden='true'><path d='M3 4h2l2.4 11.2a1 1 0 0 0 1 .8h9.2a1 1 0 0 0 1-.8L20 8H6.2M9 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm8 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2z'/></svg></span><span class='mt-3 text-[0.65rem] font-semibold uppercase tracking-[0.2em] text-slate-100'>Commerce</span></div></div><div class='flex flex-col items-center'><div class='h-6 w-px bg-cyan-400/40'></div><div class='flex w-full flex-col items-center rounded-2xl border border-cyan-400/30 bg-white/5 px-3 py-4 text-center'><span class='flex h-11 w-11 items-center justify-center rounded-xl border border-cyan-400/40 bg-cyan-400/10 text-cyan-300'><svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' class='h-6 w-6' aria-hidden='true'><path d='M13 2 4 14h7l-1 8 9-12h-7l1-8z'/></svg></span><span class='mt-3 text-[0.65rem] font-semibold uppercase tracking-[0.2em] text-slate-100'>Performance</span></div></div><div class='flex flex-col items-center'><div class='h-6 w-px bg-cyan-400/40'></div><div class='flex w-full flex-col items-center rounded-2xl border border-cyan-400/30 bg-white/5 px-3 py-4 text-center'><span class='flex h-11 w-11 items-center justify-center rounded-xl border border-cyan-400/40 bg-cyan-400/10 text-cyan-300'><svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' class='h-6 w-6' aria-hidden='true'><path d='M4 20V11M10 20V4M16 20v-7M2 20h20'/></svg></span><span class='mt-3 text-[0.65rem] font-semibold uppercase tracking-[0.2em] text-slate-100'>Analytics</span></div></div><div class='flex flex-col items-center'><div class='h-6 w-px bg-cyan-400/40'></div><div class='flex w-full flex-col items-center rounded-2xl border border-cyan-400/30 bg-white/5 px-3 py-4 text-center'><span class='flex h-11 w-11 items-center justify-center rounded-xl border border-cyan-400/40 bg-cyan-400/10 text-cyan-300'><svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' class='h-6 w-6' aria-hidden='true'><path d='M10 13a5 5 0 0 0 7 0l3-3a5 5 0 0 0-7-7l-1 1M14 11a5 5 0 0 0-7 0l-3 3a5 5 0 0 0 7 7l1-1'/></svg></span><span class='mt-3 text-[0.65rem] font-semibold uppercase tracking-[0.2em] text-slate-100'>API & integrations</span></div></div></div></div><div class='mt-8 flex items-center gap-3'><span class='h-px flex-1 bg-cyan-400/30'></span><span class='rounded-full border border-cyan-400/40 bg-slate-950 px-4 py-1 text-[0.65rem] font-semibold uppercase tracking-[0.3em] text-cyan-200'>Unified architecture</span><span class='h-px flex-1 bg-cyan-400/30'></span></div><div class='mt-4 grid gap-4 md:grid-cols-3'><div class='flex flex-col rounded-2xl border border-cyan-400/20 bg-slate-950/70 p-4'><p class='text-[0.65rem] font-semibold uppercase tracking-[0.2em] text-cyan-300'>CMS & content modeling</p><div class='mt-3 flex-1'><div class='flex items-center justify-center gap-2'><div class='space-y-1.5'><span class='block rounded-md border border-slate-600/70 bg-slate-900 px-2.5 py-1 text-center font-mono text-[0.65rem] text-slate-200'>page</span><span class='block rounded-md border border-slate-600/70 bg-slate-900 px-2.5 py-1 text-center font-mono text-[0.65rem] text-slate-200'>post</span><span class='block rounded-md border border-slate-600/70 bg-slate-900 px-2.5 py-1 text-center font-mono text-[0.65rem] text-slate-200'>product</span></div><span class='h-px w-4 bg-cyan-400/50'></span><div class='rounded-xl border border-cyan-400/40 bg-cyan-400/10 px-3 py-2 text-center'><p class='text-[0.55rem] uppercase tracking-[0.2em] text-cyan-300'>PostgreSQL</p><p class='text-xs font-semibold text-white'>JSONB blocks</p></div><span class='h-px w-4 bg-cyan-400/50'></span><div class='space-y-1.5'><span class='block rounded-md border border-slate-600/70 bg-slate-900 px-2.5 py-1 text-center font-mono text-[0.65rem] text-slate-200'>block</span><span class='block rounded-md border border-slate-600/70 bg-slate-900 px-2.5 py-1 text-center font-mono text-[0.65rem] text-slate-200'>revision</span><span class='block rounded-md border border-slate-600/70 bg-slate-900 px-2.5 py-1 text-center font-mono text-[0.65rem] text-slate-200'>draft</span></div></div><p class='mt-3 text-xs text-slate-400'>Every page, post, and product is an ordered list of typed blocks. One Zod schema per block keeps the data valid.</p></div></div><div class='flex flex-col rounded-2xl border border-cyan-400/20 bg-slate-950/70 p-4'><p class='text-[0.65rem] font-semibold uppercase tracking-[0.2em] text-cyan-300'>Live editor & publishing</p><div class='mt-3 flex-1'><div class='overflow-hidden rounded-xl border border-slate-700 bg-slate-900'><div class='flex items-center gap-1.5 border-b border-white/10 px-3 py-2'><span class='h-2 w-2 rounded-full bg-red-400/70'></span><span class='h-2 w-2 rounded-full bg-yellow-400/70'></span><span class='h-2 w-2 rounded-full bg-green-400/70'></span><span class='ml-2 truncate font-mono text-[0.6rem] text-slate-400'>cms/pages/home</span></div><div class='flex gap-2 p-3'><div class='w-10 space-y-1.5'><span class='block h-1.5 rounded-full bg-slate-700 w-full'></span><span class='block h-1.5 rounded-full bg-slate-700 w-3/4'></span><span class='block h-1.5 rounded-full bg-slate-700 w-full'></span><span class='block h-1.5 rounded-full bg-slate-700 w-1/2'></span></div><div class='flex-1 rounded-lg border border-dashed border-cyan-400/40 bg-cyan-400/5 p-2'><p class='text-[0.6rem] font-semibold text-cyan-200'>Live preview</p><div class='mt-1.5 space-y-1.5'><span class='block h-1.5 rounded-full bg-slate-600 w-11/12'></span><span class='block h-1.5 rounded-full bg-slate-600 w-2/3'></span><span class='block h-1.5 rounded-full bg-slate-600 w-4/5'></span></div></div></div><div class='flex items-center justify-between border-t border-white/10 px-3 py-2'><span class='rounded-full border border-amber-400/40 bg-amber-400/10 px-2 py-0.5 text-[0.6rem] font-semibold text-amber-200'>Live Draft</span><span class='rounded-md bg-cyan-400 px-2.5 py-1 text-[0.6rem] font-bold text-slate-950'>Publish</span></div></div><p class='mt-3 text-xs text-slate-400'>Editors work in a Notion-style editor with drafts and revisions. Publishing reads straight from PostgreSQL, so there is no redeploy.</p></div></div><div class='flex flex-col rounded-2xl border border-cyan-400/20 bg-slate-950/70 p-4'><p class='text-[0.65rem] font-semibold uppercase tracking-[0.2em] text-cyan-300'>Premium modules</p><div class='mt-3 flex-1'><div class='flex items-center gap-2'><span class='shrink-0 rounded-md border border-cyan-400/40 bg-cyan-400/10 px-2 py-1 text-[0.6rem] font-semibold uppercase tracking-[0.15em] text-cyan-200'>Add-on</span><span class='h-px w-4 bg-cyan-400/50'></span><div class='flex-1 space-y-2'><div class='flex items-center gap-2 rounded-xl border border-emerald-400/40 bg-emerald-400/10 px-3 py-2'><span class='text-emerald-300'><svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' class='h-6 w-6' aria-hidden='true'><path d='M3 4h2l2.4 11.2a1 1 0 0 0 1 .8h9.2a1 1 0 0 0 1-.8L20 8H6.2M9 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm8 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2z'/></svg></span><div><p class='text-xs font-semibold text-white'>Commerce Pro</p><p class='text-[0.6rem] text-slate-400'>Products, checkout, taxes, shipping.</p></div></div><div class='flex items-center gap-2 rounded-xl border border-violet-400/40 bg-violet-400/10 px-3 py-2'><span class='text-violet-300'><svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' class='h-6 w-6' aria-hidden='true'><path d='M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8L12 3zM19 16l.8 2.2L22 19l-2.2.8L19 22l-.8-2.2L16 19l2.2-.8L19 16z'/></svg></span><div><p class='text-xs font-semibold text-white'>Cortex AI</p><p class='text-[0.6rem] text-slate-400'>AI in the editor + MCP server. 30-day free trial.</p></div></div></div></div><p class='mt-3 text-xs text-slate-400'>The core CMS is free and open source. Modules switch on with a license and use the same blocks and editor.</p></div></div></div><div class='mt-6 flex flex-wrap items-center justify-center gap-2'><span class='rounded-full border border-white/10 bg-white/5 px-3 py-1 text-[0.65rem] font-semibold uppercase tracking-[0.15em] text-slate-300'>Next.js 16</span><span class='rounded-full border border-white/10 bg-white/5 px-3 py-1 text-[0.65rem] font-semibold uppercase tracking-[0.15em] text-slate-300'>Supabase</span><span class='rounded-full border border-white/10 bg-white/5 px-3 py-1 text-[0.65rem] font-semibold uppercase tracking-[0.15em] text-slate-300'>Tiptap</span><span class='rounded-full border border-white/10 bg-white/5 px-3 py-1 text-[0.65rem] font-semibold uppercase tracking-[0.15em] text-slate-300'>Tailwind</span><span class='rounded-full border border-white/10 bg-white/5 px-3 py-1 text-[0.65rem] font-semibold uppercase tracking-[0.15em] text-slate-300'>Nx</span><span class='rounded-full border border-white/10 bg-white/5 px-3 py-1 text-[0.65rem] font-semibold uppercase tracking-[0.15em] text-slate-300'>Git</span></div><p class='mt-6 rounded-2xl border border-cyan-400/30 bg-slate-950/80 px-4 py-4 text-center text-base font-bold uppercase tracking-[0.12em] text-white sm:text-lg'>One visual system. CMS, editor, and unlimited extensibility.</p></div></div>$nbdiag_en$))),
|
|
39
|
-
updated_at = now()
|
|
40
|
-
WHERE post_id = v_post
|
|
41
|
-
AND block_type = 'text'
|
|
42
|
-
AND content->>'html_content' LIKE '%extensibility.webp%'
|
|
43
|
-
AND position($nbfig_eng$<figure class='my-12 overflow-hidden rounded-[2rem] border border-slate-200/80 bg-slate-950 shadow-2xl dark:border-white/10'>
|
|
44
|
-
<img src='/images/extensibility.webp' alt='NextBlock™ extensibility artwork showing the CMS connected to reusable modules and integrations' class='w-full h-auto object-cover' />
|
|
45
|
-
<figcaption class='border-t border-white/10 px-6 py-4 text-sm text-slate-300'>One unified design system spans content blocks, editing tools, and store features.</figcaption>
|
|
46
|
-
</figure>$nbfig_eng$ in content->>'html_content') > 0;
|
|
47
|
-
END IF;
|
|
48
|
-
|
|
49
|
-
SELECT id INTO v_post FROM public.posts WHERE slug = 'comment-nextblock-fonctionne' AND language_id = v_fr ORDER BY id LIMIT 1;
|
|
50
|
-
IF v_post IS NOT NULL THEN
|
|
51
|
-
UPDATE public.blocks
|
|
52
|
-
SET content = jsonb_set(content, '{html_content}', to_jsonb(replace(content->>'html_content', $nbfig_fr$<figure class='my-12 overflow-hidden rounded-[2rem] border border-slate-200/80 bg-slate-950 shadow-2xl dark:border-white/10'>
|
|
53
|
-
<img src='/images/extensibility.webp' alt='Illustration NextBlock montrant les connexions entre le CMS et les modules externes' class='w-full h-auto object-cover' />
|
|
54
|
-
<figcaption class='border-t border-white/10 px-6 py-4 text-sm text-slate-300'>Un même système visuel réunit la gestion de contenu, l'édition et les modules du store.</figcaption>
|
|
55
|
-
</figure>$nbfig_fr$, $nbdiag_fr$<div class='not-prose my-12 overflow-hidden rounded-[2rem] border border-slate-800 shadow-2xl'><div class='bg-gradient-to-b from-[#020817] via-[#0b1a3a] to-[#0f172a] p-6 sm:p-8'><p class='text-center text-[0.65rem] font-semibold uppercase tracking-[0.3em] text-cyan-300'>Cœur de la plateforme NB</p><div class='mx-auto mt-4 flex h-28 w-28 items-center justify-center rounded-full border border-cyan-400/40 bg-cyan-400/10 shadow-[0_0_70px_rgba(34,211,238,0.28)]'><img src='/images/nextblock-logo-small.webp' alt='Logo NextBlock au centre du cœur de la plateforme' class='h-16 w-16 object-contain' /></div><p class='mt-3 text-center text-sm font-bold text-white'>Une seule app Next.js 16 sur Supabase</p><div class='mx-auto h-8 w-px bg-cyan-400/40'></div><div class='relative'><div class='absolute left-[12.5%] right-[12.5%] top-0 h-px bg-cyan-400/30'></div><div class='grid grid-cols-2 gap-3 md:grid-cols-4'><div class='flex flex-col items-center'><div class='h-6 w-px bg-cyan-400/40'></div><div class='flex w-full flex-col items-center rounded-2xl border border-cyan-400/30 bg-white/5 px-3 py-4 text-center'><span class='flex h-11 w-11 items-center justify-center rounded-xl border border-cyan-400/40 bg-cyan-400/10 text-cyan-300'><svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' class='h-6 w-6' aria-hidden='true'><path d='M3 4h2l2.4 11.2a1 1 0 0 0 1 .8h9.2a1 1 0 0 0 1-.8L20 8H6.2M9 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm8 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2z'/></svg></span><span class='mt-3 text-[0.65rem] font-semibold uppercase tracking-[0.2em] text-slate-100'>Commerce</span></div></div><div class='flex flex-col items-center'><div class='h-6 w-px bg-cyan-400/40'></div><div class='flex w-full flex-col items-center rounded-2xl border border-cyan-400/30 bg-white/5 px-3 py-4 text-center'><span class='flex h-11 w-11 items-center justify-center rounded-xl border border-cyan-400/40 bg-cyan-400/10 text-cyan-300'><svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' class='h-6 w-6' aria-hidden='true'><path d='M13 2 4 14h7l-1 8 9-12h-7l1-8z'/></svg></span><span class='mt-3 text-[0.65rem] font-semibold uppercase tracking-[0.2em] text-slate-100'>Performance</span></div></div><div class='flex flex-col items-center'><div class='h-6 w-px bg-cyan-400/40'></div><div class='flex w-full flex-col items-center rounded-2xl border border-cyan-400/30 bg-white/5 px-3 py-4 text-center'><span class='flex h-11 w-11 items-center justify-center rounded-xl border border-cyan-400/40 bg-cyan-400/10 text-cyan-300'><svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' class='h-6 w-6' aria-hidden='true'><path d='M4 20V11M10 20V4M16 20v-7M2 20h20'/></svg></span><span class='mt-3 text-[0.65rem] font-semibold uppercase tracking-[0.2em] text-slate-100'>Analytique</span></div></div><div class='flex flex-col items-center'><div class='h-6 w-px bg-cyan-400/40'></div><div class='flex w-full flex-col items-center rounded-2xl border border-cyan-400/30 bg-white/5 px-3 py-4 text-center'><span class='flex h-11 w-11 items-center justify-center rounded-xl border border-cyan-400/40 bg-cyan-400/10 text-cyan-300'><svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' class='h-6 w-6' aria-hidden='true'><path d='M10 13a5 5 0 0 0 7 0l3-3a5 5 0 0 0-7-7l-1 1M14 11a5 5 0 0 0-7 0l-3 3a5 5 0 0 0 7 7l1-1'/></svg></span><span class='mt-3 text-[0.65rem] font-semibold uppercase tracking-[0.2em] text-slate-100'>API et intégrations</span></div></div></div></div><div class='mt-8 flex items-center gap-3'><span class='h-px flex-1 bg-cyan-400/30'></span><span class='rounded-full border border-cyan-400/40 bg-slate-950 px-4 py-1 text-[0.65rem] font-semibold uppercase tracking-[0.3em] text-cyan-200'>Architecture unifiée</span><span class='h-px flex-1 bg-cyan-400/30'></span></div><div class='mt-4 grid gap-4 md:grid-cols-3'><div class='flex flex-col rounded-2xl border border-cyan-400/20 bg-slate-950/70 p-4'><p class='text-[0.65rem] font-semibold uppercase tracking-[0.2em] text-cyan-300'>CMS et modélisation du contenu</p><div class='mt-3 flex-1'><div class='flex items-center justify-center gap-2'><div class='space-y-1.5'><span class='block rounded-md border border-slate-600/70 bg-slate-900 px-2.5 py-1 text-center font-mono text-[0.65rem] text-slate-200'>page</span><span class='block rounded-md border border-slate-600/70 bg-slate-900 px-2.5 py-1 text-center font-mono text-[0.65rem] text-slate-200'>article</span><span class='block rounded-md border border-slate-600/70 bg-slate-900 px-2.5 py-1 text-center font-mono text-[0.65rem] text-slate-200'>produit</span></div><span class='h-px w-4 bg-cyan-400/50'></span><div class='rounded-xl border border-cyan-400/40 bg-cyan-400/10 px-3 py-2 text-center'><p class='text-[0.55rem] uppercase tracking-[0.2em] text-cyan-300'>PostgreSQL</p><p class='text-xs font-semibold text-white'>Blocs JSONB</p></div><span class='h-px w-4 bg-cyan-400/50'></span><div class='space-y-1.5'><span class='block rounded-md border border-slate-600/70 bg-slate-900 px-2.5 py-1 text-center font-mono text-[0.65rem] text-slate-200'>bloc</span><span class='block rounded-md border border-slate-600/70 bg-slate-900 px-2.5 py-1 text-center font-mono text-[0.65rem] text-slate-200'>révision</span><span class='block rounded-md border border-slate-600/70 bg-slate-900 px-2.5 py-1 text-center font-mono text-[0.65rem] text-slate-200'>brouillon</span></div></div><p class='mt-3 text-xs text-slate-400'>Chaque page, article et produit est une liste de blocs typés. Un schéma Zod par bloc garde les données valides.</p></div></div><div class='flex flex-col rounded-2xl border border-cyan-400/20 bg-slate-950/70 p-4'><p class='text-[0.65rem] font-semibold uppercase tracking-[0.2em] text-cyan-300'>Éditeur en direct et publication</p><div class='mt-3 flex-1'><div class='overflow-hidden rounded-xl border border-slate-700 bg-slate-900'><div class='flex items-center gap-1.5 border-b border-white/10 px-3 py-2'><span class='h-2 w-2 rounded-full bg-red-400/70'></span><span class='h-2 w-2 rounded-full bg-yellow-400/70'></span><span class='h-2 w-2 rounded-full bg-green-400/70'></span><span class='ml-2 truncate font-mono text-[0.6rem] text-slate-400'>cms/pages/accueil</span></div><div class='flex gap-2 p-3'><div class='w-10 space-y-1.5'><span class='block h-1.5 rounded-full bg-slate-700 w-full'></span><span class='block h-1.5 rounded-full bg-slate-700 w-3/4'></span><span class='block h-1.5 rounded-full bg-slate-700 w-full'></span><span class='block h-1.5 rounded-full bg-slate-700 w-1/2'></span></div><div class='flex-1 rounded-lg border border-dashed border-cyan-400/40 bg-cyan-400/5 p-2'><p class='text-[0.6rem] font-semibold text-cyan-200'>Aperçu en direct</p><div class='mt-1.5 space-y-1.5'><span class='block h-1.5 rounded-full bg-slate-600 w-11/12'></span><span class='block h-1.5 rounded-full bg-slate-600 w-2/3'></span><span class='block h-1.5 rounded-full bg-slate-600 w-4/5'></span></div></div></div><div class='flex items-center justify-between border-t border-white/10 px-3 py-2'><span class='rounded-full border border-amber-400/40 bg-amber-400/10 px-2 py-0.5 text-[0.6rem] font-semibold text-amber-200'>Brouillon</span><span class='rounded-md bg-cyan-400 px-2.5 py-1 text-[0.6rem] font-bold text-slate-950'>Publier</span></div></div><p class='mt-3 text-xs text-slate-400'>Les éditeurs écrivent dans un éditeur de type Notion, avec brouillons et révisions. La mise en ligne lit PostgreSQL en direct. Pas de build, pas d'attente.</p></div></div><div class='flex flex-col rounded-2xl border border-cyan-400/20 bg-slate-950/70 p-4'><p class='text-[0.65rem] font-semibold uppercase tracking-[0.2em] text-cyan-300'>Modules premium</p><div class='mt-3 flex-1'><div class='flex items-center gap-2'><span class='shrink-0 rounded-md border border-cyan-400/40 bg-cyan-400/10 px-2 py-1 text-[0.6rem] font-semibold uppercase tracking-[0.15em] text-cyan-200'>Module</span><span class='h-px w-4 bg-cyan-400/50'></span><div class='flex-1 space-y-2'><div class='flex items-center gap-2 rounded-xl border border-emerald-400/40 bg-emerald-400/10 px-3 py-2'><span class='text-emerald-300'><svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' class='h-6 w-6' aria-hidden='true'><path d='M3 4h2l2.4 11.2a1 1 0 0 0 1 .8h9.2a1 1 0 0 0 1-.8L20 8H6.2M9 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm8 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2z'/></svg></span><div><p class='text-xs font-semibold text-white'>Commerce Pro</p><p class='text-[0.6rem] text-slate-400'>Produits, paiement, taxes, livraison.</p></div></div><div class='flex items-center gap-2 rounded-xl border border-violet-400/40 bg-violet-400/10 px-3 py-2'><span class='text-violet-300'><svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' class='h-6 w-6' aria-hidden='true'><path d='M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8L12 3zM19 16l.8 2.2L22 19l-2.2.8L19 22l-.8-2.2L16 19l2.2-.8L19 16z'/></svg></span><div><p class='text-xs font-semibold text-white'>Cortex AI</p><p class='text-[0.6rem] text-slate-400'>IA dans l'éditeur + serveur MCP. Essai gratuit de 30 jours.</p></div></div></div></div><p class='mt-3 text-xs text-slate-400'>Le cœur du CMS est gratuit et open source. Les modules s'activent avec une licence. Ils utilisent les mêmes blocs et le même éditeur.</p></div></div></div><div class='mt-6 flex flex-wrap items-center justify-center gap-2'><span class='rounded-full border border-white/10 bg-white/5 px-3 py-1 text-[0.65rem] font-semibold uppercase tracking-[0.15em] text-slate-300'>Next.js 16</span><span class='rounded-full border border-white/10 bg-white/5 px-3 py-1 text-[0.65rem] font-semibold uppercase tracking-[0.15em] text-slate-300'>Supabase</span><span class='rounded-full border border-white/10 bg-white/5 px-3 py-1 text-[0.65rem] font-semibold uppercase tracking-[0.15em] text-slate-300'>Tiptap</span><span class='rounded-full border border-white/10 bg-white/5 px-3 py-1 text-[0.65rem] font-semibold uppercase tracking-[0.15em] text-slate-300'>Tailwind</span><span class='rounded-full border border-white/10 bg-white/5 px-3 py-1 text-[0.65rem] font-semibold uppercase tracking-[0.15em] text-slate-300'>Nx</span><span class='rounded-full border border-white/10 bg-white/5 px-3 py-1 text-[0.65rem] font-semibold uppercase tracking-[0.15em] text-slate-300'>Git</span></div><p class='mt-6 rounded-2xl border border-cyan-400/30 bg-slate-950/80 px-4 py-4 text-center text-base font-bold uppercase tracking-[0.12em] text-white sm:text-lg'>Un seul système visuel. CMS, éditeur et extensibilité sans limite.</p></div></div>$nbdiag_fr$))),
|
|
56
|
-
updated_at = now()
|
|
57
|
-
WHERE post_id = v_post
|
|
58
|
-
AND block_type = 'text'
|
|
59
|
-
AND content->>'html_content' LIKE '%extensibility.webp%'
|
|
60
|
-
AND position($nbfig_frg$<figure class='my-12 overflow-hidden rounded-[2rem] border border-slate-200/80 bg-slate-950 shadow-2xl dark:border-white/10'>
|
|
61
|
-
<img src='/images/extensibility.webp' alt='Illustration NextBlock montrant les connexions entre le CMS et les modules externes' class='w-full h-auto object-cover' />
|
|
62
|
-
<figcaption class='border-t border-white/10 px-6 py-4 text-sm text-slate-300'>Un même système visuel réunit la gestion de contenu, l'édition et les modules du store.</figcaption>
|
|
63
|
-
</figure>$nbfig_frg$ in content->>'html_content') > 0;
|
|
64
|
-
END IF;
|
|
65
|
-
END
|
|
66
|
-
$body$;
|