@nextblock-cms/db 0.11.3 → 0.12.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.
Files changed (62) hide show
  1. package/lib/supabase/server.d.ts +9 -0
  2. package/lib/supabase/types.d.ts +9 -0
  3. package/package.json +1 -1
  4. package/supabase/migrations/00000000000000_baseline_schema.sql +2454 -0
  5. package/supabase/migrations/00000000000001_baseline_constraints_and_indexes.sql +1071 -0
  6. package/supabase/migrations/00000000000002_baseline_security_and_grants.sql +1335 -0
  7. package/supabase/migrations/00000000000003_baseline_seed.sql +468 -0
  8. package/supabase/migrations/00000000000004_default_logo_email_safe.sql +24 -0
  9. package/supabase/migrations/00000000000005_add_custom_canonical.sql +13 -0
  10. package/supabase/migrations/00000000000006_home_live_demo_promo.sql +67 -0
  11. package/supabase/migrations/00000000000007_home_live_demo_promo_copy_fix.sql +49 -0
  12. package/supabase/templates/confirmation.html +1 -1
  13. package/supabase/templates/email_change.html +1 -1
  14. package/supabase/templates/invite.html +1 -1
  15. package/supabase/templates/magic_link.html +1 -1
  16. package/supabase/templates/reauthentication.html +1 -1
  17. package/supabase/templates/recovery.html +1 -1
  18. package/supabase/migrations/00000000000000_setup_foundation_and_enums.sql +0 -40
  19. package/supabase/migrations/00000000000001_setup_cms_core.sql +0 -124
  20. package/supabase/migrations/00000000000002_setup_content_tables.sql +0 -138
  21. package/supabase/migrations/00000000000003_setup_catalog_and_licensing.sql +0 -160
  22. package/supabase/migrations/00000000000004_setup_fulfillment_shipping_taxes_and_currencies.sql +0 -797
  23. package/supabase/migrations/00000000000005_setup_functions_and_triggers.sql +0 -767
  24. package/supabase/migrations/00000000000006_setup_rls_and_grants.sql +0 -872
  25. package/supabase/migrations/00000000000007_setup_indexes.sql +0 -158
  26. package/supabase/migrations/00000000000008_seed_platform_defaults.sql +0 -155
  27. package/supabase/migrations/00000000000009_seed_translations.sql +0 -801
  28. package/supabase/migrations/00000000000010_seed_content_scaffold.sql +0 -1088
  29. package/supabase/migrations/00000000000011_setup_cortex_ai_settings.sql +0 -81
  30. package/supabase/migrations/00000000000012_setup_commerce_coupons.sql +0 -275
  31. package/supabase/migrations/00000000000013_setup_cortex_ai_db_mutation_audit.sql +0 -47
  32. package/supabase/migrations/00000000000014_setup_content_drafts.sql +0 -119
  33. package/supabase/migrations/00000000000015_setup_product_drafts.sql +0 -97
  34. package/supabase/migrations/00000000000016_add_feature_image_to_pages.sql +0 -8
  35. package/supabase/migrations/00000000000017_add_product_blocks.sql +0 -118
  36. package/supabase/migrations/00000000000018_setup_bot_protection_settings.sql +0 -77
  37. package/supabase/migrations/00000000000019_add_product_categories.sql +0 -64
  38. package/supabase/migrations/00000000000020_add_category_translations.sql +0 -10
  39. package/supabase/migrations/00000000000021_migrate_hero_blocks_to_sections.sql +0 -29
  40. package/supabase/migrations/00000000000022_seed_cortex_ai_guide_post.sql +0 -184
  41. package/supabase/migrations/00000000000023_setup_custom_block_definitions.sql +0 -183
  42. package/supabase/migrations/00000000000024_setup_ucp_cart_sessions.sql +0 -72
  43. package/supabase/migrations/00000000000025_add_sale_schedule_columns.sql +0 -406
  44. package/supabase/migrations/00000000000026_seed_on_sale_translation.sql +0 -9
  45. package/supabase/migrations/00000000000027_setup_privacy_and_mfa.sql +0 -479
  46. package/supabase/migrations/00000000000028_clear_advisor_warnings.sql +0 -93
  47. package/supabase/migrations/00000000000029_refresh_setup_article.sql +0 -252
  48. package/supabase/migrations/00000000000030_setup_system_configuration.sql +0 -80
  49. package/supabase/migrations/00000000000031_seed_footer_navigation.sql +0 -85
  50. package/supabase/migrations/00000000000032_neutralize_seeded_contact_emails.sql +0 -34
  51. package/supabase/migrations/00000000000033_setup_config_settings.sql +0 -99
  52. package/supabase/migrations/00000000000034_enable_staff_2fa_reminder_default.sql +0 -15
  53. package/supabase/migrations/00000000000035_reassert_advisor_fixes.sql +0 -33
  54. package/supabase/migrations/00000000000036_setup_system_alerts.sql +0 -72
  55. package/supabase/migrations/00000000000037_refresh_setup_article_install_paths.sql +0 -317
  56. package/supabase/migrations/00000000000038_seed_consent_banner_translations.sql +0 -126
  57. package/supabase/migrations/00000000000039_setup_interactions.sql +0 -153
  58. package/supabase/migrations/00000000000040_add_profiles_fk_to_interactions.sql +0 -8
  59. package/supabase/migrations/00000000000041_seed_interactions_translations.sql +0 -145
  60. package/supabase/migrations/00000000000042_seed_deploy_to_vercel_ctas.sql +0 -72
  61. package/supabase/migrations/00000000000043_swap_home_hero_media_to_youtube.sql +0 -42
  62. package/supabase/migrations/00000000000044_swap_article_nx_graph_for_youtube.sql +0 -66
@@ -1,1088 +0,0 @@
1
- -- 00000000000010_seed_content_scaffold.sql
2
- -- Consolidated migration preserving original statement order within grouped sections.
3
-
4
- -- 00000000000033_seed_logo_and_content_scaffold.sql
5
- -- Foundational translations, logo assets, and starter content scaffolding.
6
-
7
- BEGIN;
8
-
9
- -- 1. Translations
10
- -- Merged from multiple translation seed files
11
- INSERT INTO public.translations (key, translations) VALUES
12
- ('sign_in', '{"en": "Sign in", "fr": "Connexion"}'),
13
- ('sign_up', '{"en": "Sign up", "fr": "Inscription"}'),
14
- ('sign_out', '{"en": "Sign out", "fr": "Déconnexion"}'),
15
- ('dont_have_account', '{"en": "Don''t have an account?", "fr": "Pas encore de compte ?"}'),
16
- ('email', '{"en": "Email", "fr": "Email"}'),
17
- ('you_at_example_com', '{"en": "you@example.com", "fr": "vous@example.com"}'),
18
- ('password', '{"en": "Password", "fr": "Mot de passe"}'),
19
- ('forgot_password', '{"en": "Forgot Password?", "fr": "Mot de passe oublié ?"}'),
20
- ('your_password', '{"en": "Your password", "fr": "Votre mot de passe"}'),
21
- ('signing_in_pending', '{"en": "Signing In...", "fr": "Connexion en cours..."}'),
22
- ('already_have_account', '{"en": "Already have an account?", "fr": "Déjà un compte ?"}'),
23
- ('signing_up_pending', '{"en": "Signing up...", "fr": "Inscription en cours..."}'),
24
- ('reset_password', '{"en": "Reset Password", "fr": "Réinitialiser le mot de passe"}'),
25
- ('auth.signup_form_description', '{"en": "Create your account in one quick step. We''ll email you a confirmation link before you finish your profile.", "fr": "Créez votre compte en une étape rapide. Nous vous enverrons un lien de confirmation avant de terminer votre profil."}'),
26
- ('auth.signup_success_badge', '{"en": "Signup received", "fr": "Inscription reçue"}'),
27
- ('auth.signup_success_title', '{"en": "Check your inbox", "fr": "Vérifiez votre boîte de réception"}'),
28
- ('auth.signup_success_step_confirm', '{"en": "Open the email we sent and confirm your address.", "fr": "Ouvrez l''e-mail envoyé et confirmez votre adresse."}'),
29
- ('auth.signup_success_step_profile', '{"en": "After confirmation, we''ll bring you to your profile to finish setup.", "fr": "Après confirmation, nous vous amènerons à votre profil pour terminer la configuration."}'),
30
- ('auth.signup_success_step_spam', '{"en": "If it doesn''t arrive soon, check spam, junk, or promotions.", "fr": "S''il n''arrive pas bientôt, vérifiez les dossiers spam, indésirables ou promotions."}'),
31
- ('auth.signup_use_different_email', '{"en": "Use a different email", "fr": "Utiliser une autre adresse e-mail"}'),
32
- ('auth.back_to_sign_in', '{"en": "Back to sign in", "fr": "Retour à la connexion"}'),
33
- ('auth.signup_rate_limit', '{"en": "You''re trying too quickly. Please wait a moment before requesting another confirmation email.", "fr": "Vous allez trop vite. Veuillez attendre un instant avant de demander un nouvel e-mail de confirmation."}'),
34
- ('blog_prefix', '{"en": "article", "fr": "article"}'),
35
- ('edit_page', '{"en": "Edit Page", "fr": "Éditer la page"}'),
36
- ('edit_post', '{"en": "Edit Post", "fr": "Éditer l''article"}'),
37
- ('open_main_menu', '{"en": "Open main menu", "fr": "Ouvrir le menu principal"}'),
38
- ('mobile_navigation_menu', '{"en": "Mobile navigation menu", "fr": "Menu de navigation mobile"}'),
39
- ('cms_dashboard', '{"en": "CMS Dashboard", "fr": "Tableau de bord CMS"}'),
40
- ('update_env_file_warning', '{"en": "Please update .env.local file with anon key and url", "fr": "Veuillez mettre à jour .env.local avec l''anon key et l''URL"}'),
41
- ('greeting', '{"en": "Hey, {username}!", "fr": "Salut, {username} !"}'),
42
- ('theme_switcher', '{"en": "Theme Switcher", "fr": "Sélecteur de thème"}'),
43
- ('theme_light', '{"en": "Light", "fr": "Clair"}'),
44
- ('theme_dark', '{"en": "Dark", "fr": "Sombre"}'),
45
- ('theme_system', '{"en": "System", "fr": "Système"}'),
46
- ('theme_vibrant', '{"en": "Vibrant", "fr": "Vibrant"}'),
47
- ('sandbox_mode_banner', '{"en": "Sandbox Mode: Data is public and resets every 15 minutes.", "fr": "Mode Sandbox : Les données sont publiques et réinitialisées toutes les 15 minutes."}'),
48
- ('demo_access_title', '{"en": "Demo Access", "fr": "Accès Démo"}'),
49
- ('demo_access_desc', '{"en": "This is a demo site. You may use the following credentials to access the admin section:", "fr": "Ceci est un site de démonstration. Vous pouvez utiliser les identifiants suivants pour accéder à l''administration :"}'),
50
- ('demo_user_label', '{"en": "User:", "fr": "Utilisateur :"}'),
51
- ('demo_password_label', '{"en": "Password:", "fr": "Mot de passe :"}')
52
- ON CONFLICT (key) DO UPDATE
53
- SET translations = EXCLUDED.translations;
54
-
55
-
56
- -- 2. Site Logo
57
- DO $$
58
- DECLARE
59
- v_logo_media_id UUID := gen_random_uuid();
60
- v_admin_id UUID;
61
- BEGIN
62
- -- Get an admin user ID to set as uploader (optional, fallback to NULL)
63
- SELECT id INTO v_admin_id FROM public.profiles WHERE role = 'ADMIN' LIMIT 1;
64
-
65
- -- Insert the logo into the media table
66
- INSERT INTO public.media (id, uploader_id, file_name, object_key, file_type, size_bytes, description)
67
- VALUES (
68
- v_logo_media_id,
69
- v_admin_id,
70
- 'nextblock-logo-small.webp',
71
- 'images/nextblock-logo-small.webp',
72
- 'image/webp',
73
- 10000,
74
- 'NextBlock™ Site Logo'
75
- )
76
- ON CONFLICT (object_key) DO UPDATE
77
- SET
78
- file_name = excluded.file_name,
79
- file_type = excluded.file_type,
80
- description = excluded.description
81
- RETURNING id INTO v_logo_media_id;
82
-
83
- -- Insert the logo into the logos table
84
- INSERT INTO public.logos (name, media_id)
85
- VALUES ('NextBlock™ Logo', v_logo_media_id)
86
- ON CONFLICT DO NOTHING; -- Assuming name is not unique but we don't want to double insert if running multiple times? No unique constraint on name.
87
- -- Actually, logos table has no unique constraint on name.
88
- -- But since this is a seed, we might want to avoid duplicates if run multiple times.
89
- -- Let's check if it exists.
90
- IF NOT EXISTS (SELECT 1 FROM public.logos WHERE name = 'NextBlock™ Logo') THEN
91
- INSERT INTO public.logos (name, media_id) VALUES ('NextBlock™ Logo', v_logo_media_id);
92
- END IF;
93
-
94
- END $$;
95
-
96
-
97
-
98
- -- 3. Foundational Content (Pages & Posts Structure)
99
- DO $$
100
- DECLARE
101
- v_home_page_group_id uuid := gen_random_uuid();
102
- v_blog_page_group_id uuid := gen_random_uuid();
103
- v_how_it_works_post_group_id uuid := gen_random_uuid();
104
- v_setup_post_group_id uuid := gen_random_uuid();
105
- v_commerce_post_group_id uuid := gen_random_uuid();
106
- v_contact_page_group_id uuid := gen_random_uuid();
107
- v_en_lang_id bigint;
108
- v_fr_lang_id bigint;
109
- v_architecture_media_id uuid;
110
- v_extensibility_media_id uuid;
111
- v_included_media_id uuid;
112
- v_setup_media_id uuid;
113
- v_commerce_plan_media_id uuid;
114
- v_commerce_media_id uuid;
115
- BEGIN
116
- SELECT id INTO v_en_lang_id FROM public.languages WHERE code = 'en' LIMIT 1;
117
- SELECT id INTO v_fr_lang_id FROM public.languages WHERE code = 'fr' LIMIT 1;
118
-
119
- IF v_en_lang_id IS NULL OR v_fr_lang_id IS NULL THEN
120
- RAISE EXCEPTION 'Required languages (en, fr) not found.';
121
- END IF;
122
-
123
- INSERT INTO public.pages (language_id, title, slug, status, translation_group_id)
124
- VALUES (v_en_lang_id, 'Home', 'home', 'published', v_home_page_group_id)
125
- ON CONFLICT (language_id, slug) DO UPDATE SET title = EXCLUDED.title, status = EXCLUDED.status;
126
-
127
- INSERT INTO public.pages (language_id, title, slug, status, translation_group_id)
128
- VALUES (v_fr_lang_id, 'Accueil', 'accueil', 'published', v_home_page_group_id)
129
- ON CONFLICT (language_id, slug) DO UPDATE SET title = EXCLUDED.title, status = EXCLUDED.status;
130
-
131
- INSERT INTO public.pages (language_id, title, slug, status, translation_group_id)
132
- VALUES (v_en_lang_id, 'Articles', 'articles', 'published', v_blog_page_group_id)
133
- ON CONFLICT (language_id, slug) DO UPDATE SET title = EXCLUDED.title, status = EXCLUDED.status;
134
-
135
- INSERT INTO public.pages (language_id, title, slug, status, translation_group_id)
136
- VALUES (v_fr_lang_id, 'Articles', 'articles', 'published', v_blog_page_group_id)
137
- ON CONFLICT (language_id, slug) DO UPDATE SET title = EXCLUDED.title, status = EXCLUDED.status;
138
-
139
- INSERT INTO public.pages (language_id, title, slug, status, translation_group_id)
140
- VALUES (v_en_lang_id, 'Contact Us', 'contact', 'published', v_contact_page_group_id)
141
- ON CONFLICT (language_id, slug) DO UPDATE SET title = EXCLUDED.title, status = EXCLUDED.status;
142
-
143
- INSERT INTO public.pages (language_id, title, slug, status, translation_group_id)
144
- VALUES (v_fr_lang_id, 'Contactez-nous', 'contact', 'published', v_contact_page_group_id)
145
- ON CONFLICT (language_id, slug) DO UPDATE SET title = EXCLUDED.title, status = EXCLUDED.status;
146
-
147
- v_architecture_media_id := gen_random_uuid();
148
- INSERT INTO public.media (id, file_name, object_key, file_type, size_bytes, width, height, description)
149
- VALUES (
150
- v_architecture_media_id,
151
- 'NBcover.webp',
152
- 'images/NBcover.webp',
153
- 'image/webp',
154
- 180000,
155
- 1024,
156
- 572,
157
- 'NextBlock™ architecture overview cover image'
158
- )
159
- ON CONFLICT (object_key) DO UPDATE
160
- SET
161
- file_name = EXCLUDED.file_name,
162
- width = EXCLUDED.width,
163
- height = EXCLUDED.height,
164
- description = EXCLUDED.description
165
- RETURNING id INTO v_architecture_media_id;
166
-
167
- v_extensibility_media_id := gen_random_uuid();
168
- INSERT INTO public.media (id, file_name, object_key, file_type, size_bytes, width, height, description)
169
- VALUES (
170
- v_extensibility_media_id,
171
- 'extensibility.webp',
172
- 'images/extensibility.webp',
173
- 'image/webp',
174
- 246808,
175
- 1024,
176
- 559,
177
- 'NextBlock™ extensibility editorial artwork'
178
- )
179
- ON CONFLICT (object_key) DO UPDATE
180
- SET
181
- file_name = EXCLUDED.file_name,
182
- width = EXCLUDED.width,
183
- height = EXCLUDED.height,
184
- description = EXCLUDED.description
185
- RETURNING id INTO v_extensibility_media_id;
186
-
187
- v_included_media_id := gen_random_uuid();
188
- INSERT INTO public.media (id, file_name, object_key, file_type, size_bytes, width, height, description)
189
- VALUES (
190
- v_included_media_id,
191
- 'included.webp',
192
- 'images/included.webp',
193
- 'image/webp',
194
- 237478,
195
- 1024,
196
- 559,
197
- 'NextBlock™ getting-started platform artwork'
198
- )
199
- ON CONFLICT (object_key) DO UPDATE
200
- SET
201
- file_name = EXCLUDED.file_name,
202
- width = EXCLUDED.width,
203
- height = EXCLUDED.height,
204
- description = EXCLUDED.description
205
- RETURNING id INTO v_included_media_id;
206
-
207
- v_setup_media_id := gen_random_uuid();
208
- INSERT INTO public.media (id, file_name, object_key, file_type, size_bytes, width, height, description)
209
- VALUES (
210
- v_setup_media_id,
211
- 'programmer-upscaled.webp',
212
- 'images/programmer-upscaled.webp',
213
- 'image/webp',
214
- 780000,
215
- 8192,
216
- 2632,
217
- 'NextBlock™ setup guide cover image'
218
- )
219
- ON CONFLICT (object_key) DO UPDATE
220
- SET
221
- file_name = EXCLUDED.file_name,
222
- width = EXCLUDED.width,
223
- height = EXCLUDED.height,
224
- description = EXCLUDED.description
225
- RETURNING id INTO v_setup_media_id;
226
-
227
- v_commerce_plan_media_id := gen_random_uuid();
228
- INSERT INTO public.media (id, file_name, object_key, file_type, size_bytes, width, height, description)
229
- VALUES (
230
- v_commerce_plan_media_id,
231
- 'commerce-plan.webp',
232
- 'images/commerce-plan.webp',
233
- 'image/webp',
234
- 269854,
235
- 1024,
236
- 559,
237
- 'NextBlock™ commerce roadmap artwork'
238
- )
239
- ON CONFLICT (object_key) DO UPDATE
240
- SET
241
- file_name = EXCLUDED.file_name,
242
- width = EXCLUDED.width,
243
- height = EXCLUDED.height,
244
- description = EXCLUDED.description
245
- RETURNING id INTO v_commerce_plan_media_id;
246
-
247
- v_commerce_media_id := gen_random_uuid();
248
- INSERT INTO public.media (id, file_name, object_key, file_type, size_bytes, width, height, description)
249
- VALUES (
250
- v_commerce_media_id,
251
- 'commerce-wide.webp',
252
- 'images/commerce-wide.webp',
253
- 'image/webp',
254
- 250584,
255
- 1024,
256
- 434,
257
- 'NextBlock™ Commerce editorial feature image'
258
- )
259
- ON CONFLICT (object_key) DO UPDATE
260
- SET
261
- file_name = EXCLUDED.file_name,
262
- width = EXCLUDED.width,
263
- height = EXCLUDED.height,
264
- description = EXCLUDED.description
265
- RETURNING id INTO v_commerce_media_id;
266
-
267
- INSERT INTO public.posts (language_id, title, slug, label, status, excerpt, subtitle, translation_group_id, feature_image_id)
268
- VALUES (
269
- v_en_lang_id,
270
- 'How NextBlock™ Works: A Look Under the Hood',
271
- 'how-nextblock-works',
272
- 'Architecture',
273
- 'published',
274
- 'Under the hood of the monorepo, block registry, and editor stack that power NextBlock.',
275
- 'A guided tour of the monorepo, block registry, editor stack, and open-core architecture behind NextBlock.',
276
- v_how_it_works_post_group_id,
277
- v_architecture_media_id
278
- )
279
- ON CONFLICT (language_id, slug) DO UPDATE
280
- SET
281
- title = EXCLUDED.title,
282
- label = EXCLUDED.label,
283
- excerpt = EXCLUDED.excerpt,
284
- subtitle = EXCLUDED.subtitle,
285
- status = EXCLUDED.status,
286
- feature_image_id = EXCLUDED.feature_image_id;
287
-
288
- INSERT INTO public.posts (language_id, title, slug, label, status, excerpt, subtitle, translation_group_id, feature_image_id)
289
- VALUES (
290
- v_fr_lang_id,
291
- 'Comment NextBlock™ Fonctionne : Regard Sous le Capot',
292
- 'comment-nextblock-fonctionne',
293
- 'Architecture',
294
- 'published',
295
- 'Sous le capot du monorepo, du registre de blocs et de l editeur qui propulsent NextBlock.',
296
- 'Une visite guidee du monorepo, du registre de blocs, de l editeur et de l architecture open-core de NextBlock.',
297
- v_how_it_works_post_group_id,
298
- v_architecture_media_id
299
- )
300
- ON CONFLICT (language_id, slug) DO UPDATE
301
- SET
302
- title = EXCLUDED.title,
303
- label = EXCLUDED.label,
304
- excerpt = EXCLUDED.excerpt,
305
- subtitle = EXCLUDED.subtitle,
306
- status = EXCLUDED.status,
307
- feature_image_id = EXCLUDED.feature_image_id;
308
-
309
- INSERT INTO public.posts (language_id, title, slug, label, status, excerpt, subtitle, translation_group_id, feature_image_id)
310
- VALUES (
311
- v_en_lang_id,
312
- 'How to Setup NextBlock: From Scratch',
313
- 'how-to-setup-nextblock',
314
- 'Getting Started',
315
- 'published',
316
- 'Installation paths, launch checklists, and setup notes for teams adopting NextBlock.',
317
- 'Two clear ways to launch NextBlock: the full monorepo for contributors, or the CLI for a fast standalone setup.',
318
- v_setup_post_group_id,
319
- v_setup_media_id
320
- )
321
- ON CONFLICT (language_id, slug) DO UPDATE
322
- SET
323
- title = EXCLUDED.title,
324
- label = EXCLUDED.label,
325
- excerpt = EXCLUDED.excerpt,
326
- subtitle = EXCLUDED.subtitle,
327
- status = EXCLUDED.status,
328
- feature_image_id = EXCLUDED.feature_image_id;
329
-
330
- INSERT INTO public.posts (language_id, title, slug, label, status, excerpt, subtitle, translation_group_id, feature_image_id)
331
- VALUES (
332
- v_fr_lang_id,
333
- 'Comment Configurer NextBlock™ : Guide Complet',
334
- 'comment-configurer-nextblock',
335
- 'Mise En Route',
336
- 'published',
337
- 'Parcours d installation, checklist de lancement et notes de configuration pour adopter NextBlock.',
338
- 'Deux chemins simples pour lancer NextBlock™ : le monorepo complet pour les contributeurs, ou le CLI pour un demarrage rapide.',
339
- v_setup_post_group_id,
340
- v_setup_media_id
341
- )
342
- ON CONFLICT (language_id, slug) DO UPDATE
343
- SET
344
- title = EXCLUDED.title,
345
- label = EXCLUDED.label,
346
- excerpt = EXCLUDED.excerpt,
347
- subtitle = EXCLUDED.subtitle,
348
- status = EXCLUDED.status,
349
- feature_image_id = EXCLUDED.feature_image_id;
350
-
351
- INSERT INTO public.posts (language_id, title, slug, label, status, excerpt, subtitle, translation_group_id, feature_image_id)
352
- VALUES (
353
- v_en_lang_id,
354
- 'NextBlock™ Commerce: Multi-Currency, Tax Sync & Beyond',
355
- 'nextblock-commerce-guide',
356
- 'Commerce',
357
- 'published',
358
- 'Storefront architecture, checkout flows, and premium commerce capabilities inside NextBlock.',
359
- 'A closer look at the commerce module, from multi-currency and tax sync to shipping, inventory, and provider-aware checkout.',
360
- v_commerce_post_group_id,
361
- v_commerce_media_id
362
- )
363
- ON CONFLICT (language_id, slug) DO UPDATE
364
- SET
365
- title = EXCLUDED.title,
366
- label = EXCLUDED.label,
367
- excerpt = EXCLUDED.excerpt,
368
- subtitle = EXCLUDED.subtitle,
369
- status = EXCLUDED.status,
370
- feature_image_id = EXCLUDED.feature_image_id;
371
-
372
- INSERT INTO public.posts (language_id, title, slug, status, excerpt, translation_group_id, feature_image_id)
373
- VALUES (
374
- v_fr_lang_id,
375
- 'NextBlock™ Commerce : Multi-Devises, Taxes Automatiques et Plus',
376
- 'guide-commerce-nextblock',
377
- 'published',
378
- 'Un apercu du module commerce : multi-devises, sync taxes, expédition, inventaire et paiements connectes.',
379
- v_commerce_post_group_id,
380
- v_commerce_media_id
381
- )
382
- ON CONFLICT (language_id, slug) DO UPDATE
383
- SET
384
- title = EXCLUDED.title,
385
- excerpt = EXCLUDED.excerpt,
386
- status = EXCLUDED.status,
387
- feature_image_id = EXCLUDED.feature_image_id;
388
-
389
- UPDATE public.posts
390
- SET
391
- label = 'Architecture',
392
- excerpt = 'Under the hood of the monorepo, block registry, and editor stack that power NextBlock.',
393
- subtitle = 'A guided tour of the monorepo, block registry, editor stack, and open-core architecture behind NextBlock.'
394
- WHERE slug = 'how-nextblock-works';
395
-
396
- UPDATE public.posts
397
- SET
398
- label = 'Architecture',
399
- excerpt = 'Sous le capot du monorepo, du registre de blocs et de l editeur qui propulsent NextBlock.',
400
- subtitle = 'Une visite guidee du monorepo, du registre de blocs, de l editeur et de l architecture open-core de NextBlock.'
401
- WHERE slug = 'comment-nextblock-fonctionne';
402
-
403
- UPDATE public.posts
404
- SET
405
- label = 'Getting Started',
406
- excerpt = 'Installation paths, launch checklists, and setup notes for teams adopting NextBlock.',
407
- subtitle = 'Two clear ways to launch NextBlock: the full monorepo for contributors, or the CLI for a fast standalone setup.'
408
- WHERE slug = 'how-to-setup-nextblock';
409
-
410
- UPDATE public.posts
411
- SET
412
- label = 'Mise En Route',
413
- excerpt = 'Parcours d installation, checklist de lancement et notes de configuration pour adopter NextBlock.',
414
- subtitle = 'Deux chemins simples pour lancer NextBlock™ : le monorepo complet pour les contributeurs, ou le CLI pour un demarrage rapide.'
415
- WHERE slug = 'comment-configurer-nextblock';
416
-
417
- UPDATE public.posts
418
- SET
419
- label = 'Commerce',
420
- excerpt = 'Storefront architecture, checkout flows, and premium commerce capabilities inside NextBlock.',
421
- subtitle = 'A closer look at the commerce module, from multi-currency and tax sync to shipping, inventory, and provider-aware checkout.'
422
- WHERE slug = 'nextblock-commerce-guide';
423
-
424
- UPDATE public.posts
425
- SET
426
- label = 'Commerce',
427
- excerpt = 'Architecture boutique, parcours de paiement et fonctions commerce premium au coeur de NextBlock.',
428
- subtitle = 'Un apercu du module commerce : multi-devises, sync taxes, expedition, inventaire et paiements connectes.'
429
- WHERE slug = 'guide-commerce-nextblock';
430
-
431
- END $$;
432
-
433
- COMMIT;
434
- -- English Home + Blog blocks
435
- DO $seed$
436
- DECLARE
437
- v_en_lang_id BIGINT;
438
- v_home_page_id BIGINT;
439
- v_blog_page_id BIGINT;
440
- v_contact_page_id BIGINT;
441
- BEGIN
442
- SELECT id INTO v_en_lang_id FROM public.languages WHERE code = 'en' LIMIT 1;
443
- IF v_en_lang_id IS NULL THEN RAISE EXCEPTION 'English language not found.'; END IF;
444
-
445
- SELECT id INTO v_home_page_id FROM public.pages WHERE slug = 'home' AND language_id = v_en_lang_id ORDER BY created_at DESC LIMIT 1;
446
- IF v_home_page_id IS NULL THEN RAISE EXCEPTION 'English Home page not found.'; END IF;
447
-
448
- SELECT id INTO v_blog_page_id FROM public.pages WHERE slug = 'articles' AND language_id = v_en_lang_id ORDER BY created_at DESC LIMIT 1;
449
- IF v_blog_page_id IS NULL THEN RAISE EXCEPTION 'English Articles page not found.'; END IF;
450
-
451
- SELECT id INTO v_contact_page_id FROM public.pages WHERE slug = 'contact' AND language_id = v_en_lang_id ORDER BY created_at DESC LIMIT 1;
452
- IF v_contact_page_id IS NULL THEN RAISE EXCEPTION 'English Contact page not found.'; END IF;
453
-
454
- DELETE FROM public.blocks WHERE page_id = v_home_page_id;
455
- DELETE FROM public.blocks WHERE page_id = v_blog_page_id;
456
- DELETE FROM public.blocks WHERE page_id = v_contact_page_id;
457
-
458
- INSERT INTO public.blocks (page_id, language_id, block_type, content, "order") VALUES
459
- (v_home_page_id, v_en_lang_id, 'hero',
460
- '{"container_type":"container","background":{"type":"gradient","gradient":{"type":"linear","direction":"135deg","stops":[{"color":"#020817","position":0},{"color":"#0f172a","position":50},{"color":"#1e293b","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":"<h1 class=''text-5xl md:text-6xl font-extrabold tracking-tight text-white text-center leading-tight''>Build <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''>Blazing-Fast</span></span><br class=''md:hidden'' /> Websites.</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 open-source, developer-first Next.js CMS that merges 100% Lighthouse scores with a powerful visual block editor.</p>"}},{"block_type":"button","content":{"text":"Get Started","url":"/article/how-to-setup-nextblock","variant":"default","size":"lg","position":"center"}},{"block_type":"button","content":{"text":"View on GitHub","url":"https://github.com/nextblock-cms/nextblock","variant":"outline","size":"lg","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''>Why teams switch</p><p class=''text-3xl font-bold text-white mb-2''>100% Lighthouse</p><p class=''text-base text-slate-300 mb-6''>Edge-rendered marketing sites, launches, and docs with uncompromising performance.</p><ul class=''space-y-3 text-sm text-slate-200''><li><span class=''text-blue-400 mr-2''>&#10003;</span> Next.js 16 with ISR and edge caching</li><li><span class=''text-blue-400 mr-2''>&#10003;</span> Supabase auth, data, and storage</li><li><span class=''text-blue-400 mr-2''>&#10003;</span> Notion-style block editor powered by Tiptap</li></ul><div class=''mt-6 rounded-2xl overflow-hidden border border-white/10 shadow-lg''><img src=''/images/NBcover.webp'' alt=''Nextblock cover showcasing dashboards and blocks'' class=''w-full h-auto object-cover transform group-hover:scale-105 transition-transform duration-700'' fetchpriority=''high'' /></div></div></div>"}}]]}'::jsonb, 0),
461
-
462
- (v_home_page_id, v_en_lang_id, 'section',
463
- '{"container_type":"container","background":{"type":"none"},"responsive_columns":{"mobile":1,"tablet":1,"desktop":1},"column_gap":"lg","padding":{"top":"xl","bottom":"xl"},"column_blocks":[[{"block_type":"heading","content":{"level":2,"text_content":"Key Features: The Three Pillars of NextBlock™","textAlign":"center"}},{"block_type":"text","content":{"html_content":"<p class=''text-lg text-slate-600 dark:text-slate-400 text-center max-w-3xl mx-auto''>NextBlock™ is a holistic platform that unites performance, editorial experience, and developer control so every stakeholder delivers their best work.</p>"}},{"block_type":"text","content":{"html_content":"<div class=''grid gap-8 md:grid-cols-3 mt-12''><div class=''p-10 rounded-3xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 backdrop-blur-sm hover:bg-slate-100 dark:hover:bg-white/10 transition-colors duration-300''><div class=''w-12 h-12 rounded-xl flex items-center justify-center text-black dark:text-white mb-6''><svg class=''w-6 h-6'' fill=''none'' stroke=''currentColor'' viewBox=''0 0 24 24''><path stroke-linecap=''round'' stroke-linejoin=''round'' stroke-width=''2'' d=''M13 10V3L4 14h7v7l9-11h-7z''></path></svg></div><h3 class=''text-xl font-bold text-slate-900 dark:text-white mb-3''>Built for Speed.</h3><p class=''text-sm text-slate-600 dark:text-slate-400 leading-relaxed''>Architected for 100% Lighthouse scores with global delivery and near-instant FCP.</p><ul class=''mt-6 space-y-3 text-sm text-slate-600 dark:text-slate-400''><li><strong class=''text-slate-800 dark:text-slate-200''>Edge Caching &amp; ISR:</strong> Serve pages worldwide.</li><li><strong class=''text-slate-800 dark:text-slate-200''>Critical CSS:</strong> Inline styles to eliminate blocking.</li><li><strong class=''text-slate-800 dark:text-slate-200''>Image Opt:</strong> AVIF &amp; blurred placeholders.</li></ul></div><div class=''p-10 rounded-3xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 backdrop-blur-sm hover:bg-slate-100 dark:hover:bg-white/10 transition-colors duration-300''><div class=''w-12 h-12 rounded-xl flex items-center justify-center text-black dark:text-white mb-6''><svg class=''w-6 h-6'' fill=''none'' stroke=''currentColor'' viewBox=''0 0 24 24''><path stroke-linecap=''round'' stroke-linejoin=''round'' stroke-width=''2'' d=''M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z''></path></svg></div><h3 class=''text-xl font-bold text-slate-900 dark:text-white mb-3''>Editor-First Experience.</h3><p class=''text-sm text-slate-600 dark:text-slate-400 leading-relaxed''>A low-code, Notion-style block editor empowers teams to ship pages without engineering help.</p><ul class=''mt-6 space-y-3 text-sm text-slate-600 dark:text-slate-400''><li><strong class=''text-slate-800 dark:text-slate-200''>Notion-Style:</strong> Slash commands &amp; drag-and-drop.</li><li><strong class=''text-slate-800 dark:text-slate-200''>Bilingual:</strong> Manage locales from one interface.</li><li><strong class=''text-slate-800 dark:text-slate-200''>History:</strong> Restore any version with a click.</li></ul></div><div class=''p-10 rounded-3xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 backdrop-blur-sm hover:bg-slate-100 dark:hover:bg-white/10 transition-colors duration-300''><div class=''w-12 h-12 bg-white/50 dark:bg-white/10 rounded-xl flex items-center justify-center mb-6''><svg class=''w-6 h-6 text-slate-900 dark:text-white'' fill=''none'' stroke=''currentColor'' viewBox=''0 0 24 24''><path stroke-linecap=''round'' stroke-linejoin=''round'' stroke-width=''2'' d=''M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10''></path></svg></div><h3 class=''text-xl font-bold text-slate-900 dark:text-white mb-3''>Infinitely Extensible.</h3><p class=''text-sm text-slate-700 dark:text-slate-200 leading-relaxed''>Open-source control with a clean Nx monorepo and a typed SDK for limitless customization.</p><ul class=''mt-6 space-y-3 text-sm text-slate-700 dark:text-slate-200''><li><strong class=''text-slate-900 dark:text-white''>Open Source:</strong> Own the code &amp; data forever.</li><li><strong class=''text-slate-900 dark:text-white''>Nx Monorepo:</strong> Scale confidently.</li><li><strong class=''text-slate-900 dark:text-white''>Developer SDK:</strong> Scaffold blocks in minutes.</li></ul></div></div>"}}]]}'::jsonb, 1),
464
-
465
- (v_home_page_id, v_en_lang_id, 'section',
466
- '{"container_type":"container","background":{"type":"gradient","gradient":{"type":"linear","direction":"180deg","stops":[{"color":"#0f172a","position":0},{"color":"#020817","position":100}]}},"responsive_columns":{"mobile":1,"tablet":1,"desktop":1},"column_gap":"lg","padding":{"top":"xl","bottom":"xl"},"column_blocks":[[{"block_type":"text","content":{"html_content":"<h2 class=''text-3xl md:text-4xl font-bold text-white text-center mb-6''>Built with the Best.</h2>"}},{"block_type":"text","content":{"html_content":"<p class=''text-slate-400 text-center max-w-2xl mx-auto''>Every layer of NextBlock™ leans on proven developer-first technology so the platform feels familiar, performant, and trustworthy from day one.</p><div class=''grid grid-cols-2 sm:grid-cols-4 lg:grid-cols-8 gap-4 mt-10 text-sm font-semibold text-center text-white''><div class=''p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors''>Next.js</div><div class=''p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors''>React</div><div class=''p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors''>Supabase</div><div class=''p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors''>Stripe</div><div class=''p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors''>Tailwind</div><div class=''p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors''>Tiptap</div><div class=''p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors''>Vercel</div><div class=''p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors''>Nx</div></div>"}},{"block_type":"text","content":{"html_content":"<h2 class=''text-3xl md:text-4xl font-bold text-white text-center mb-6 mt-16''>Powerful for Developers. Intuitive for Editors.</h2>"}},{"block_type":"text","content":{"html_content":"<div class=''grid md:grid-cols-2 gap-8 mt-10 text-white''><div class=''p-8 rounded-3xl border border-white/10 bg-white/5 backdrop-blur-sm''><h3 class=''text-xl font-bold mb-6 text-blue-400''>For Content Creators</h3><ul class=''space-y-4 text-sm text-slate-300''><li><strong class=''text-white block mb-1''>Intuitive Block Editor</strong>Drag-and-drop layouts with a Notion-like interface.</li><li><strong class=''text-white block mb-1''>Rich Content Blocks</strong>Deploy heroes, galleries, testimonials, and more in one click.</li><li><strong class=''text-white block mb-1''>Effortless Media Management</strong>Organize assets with folders, tags, and bulk actions.</li><li><strong class=''text-white block mb-1''>Worry-Free Revisions</strong>Automatic version history with instant restore.</li></ul></div><div class=''p-8 rounded-3xl border border-white/10 bg-gradient-to-br from-white/5 to-white/[0.02] backdrop-blur-sm''><h3 class=''text-xl font-bold mb-6 text-purple-400''>For Developers</h3><ul class=''space-y-4 text-sm text-slate-300''><li><strong class=''text-white block mb-1''>Next.js 16 Core</strong>Server Components, ISR, and Edge Functions ready out of the box.</li><li><strong class=''text-white block mb-1''>Supabase Integration</strong>Postgres, auth, storage, and real-time APIs without glue code.</li><li><strong class=''text-white block mb-1''>Monorepo Ready</strong>Nx-powered dev experience for scalable architectures.</li><li><strong class=''text-white block mb-1''>Extensible Block SDK</strong>Ship fully typed custom blocks and widgets.</li></ul></div></div>"}}]]}'::jsonb, 2),
467
- (v_home_page_id, v_en_lang_id, 'section',
468
- '{"container_type":"container","background":{"type":"gradient","gradient":{"type":"linear","direction":"135deg","stops":[{"color":"#022c22","position":0},{"color":"#0f172a","position":50},{"color":"#020817","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.25em] text-emerald-400 font-bold mb-4''>Now Available — Premium Module</p><h2 class=''text-4xl md:text-5xl font-bold text-white mb-6 leading-tight''>Turn Your CMS Into<br/>a Full Storefront.</h2><p class=''text-lg text-slate-300 max-w-2xl leading-relaxed mb-8''>NextBlock™ Commerce transforms your content platform into a complete e-commerce engine. Products, checkout, multi-currency, taxes, shipping, invoices — all natively integrated into the block editor you already know.</p>"}},{"block_type":"button","content":{"text":"Explore Commerce Features →","url":"/article/nextblock-commerce-guide","variant":"default","size":"lg"}},{"block_type":"button","content":{"text":"Get a License","url":"https://nextblock.dev/product/nextblock-commerce-pro-commerce-license","variant":"outline","size":"lg"}}],[{"block_type":"text","content":{"html_content":"<div class=''rounded-3xl overflow-hidden border border-emerald-500/20 bg-gradient-to-br from-white/5 to-emerald-500/5 shadow-2xl p-6 backdrop-blur-sm''><img src=''/images/commerce-square.webp'' alt=''NextBlock™ Commerce dashboard showing product management'' class=''w-full h-auto rounded-2xl shadow-lg'' /><div class=''mt-4 grid grid-cols-3 gap-3 text-center''><div class=''p-3 rounded-xl bg-white/5 border border-white/10''><p class=''text-lg font-bold text-emerald-400''>∞</p><p class=''text-xs text-slate-400''>Currencies</p></div><div class=''p-3 rounded-xl bg-white/5 border border-white/10''><p class=''text-lg font-bold text-emerald-400''>2</p><p class=''text-xs text-slate-400''>Providers</p></div><div class=''p-3 rounded-xl bg-white/5 border border-white/10''><p class=''text-lg font-bold text-emerald-400''>Auto</p><p class=''text-xs text-slate-400''>Tax Sync</p></div></div></div>"}}]]}'::jsonb, 3),
469
-
470
- (v_home_page_id, v_en_lang_id, 'section',
471
- '{"container_type":"container","background":{"type":"none"},"responsive_columns":{"mobile":1,"tablet":1,"desktop":1},"column_gap":"lg","padding":{"top":"xl","bottom":"xl"},"column_blocks":[[{"block_type":"heading","content":{"level":2,"text_content":"Everything You Need to Sell Online","textAlign":"center"}},{"block_type":"text","content":{"html_content":"<p class=''text-lg text-slate-600 dark:text-slate-400 text-center max-w-3xl mx-auto mb-12''>NextBlock™ Commerce ships a complete e-commerce toolkit so you can go from catalog to checkout without third-party plugins.</p><div class=''grid gap-6 md:grid-cols-2 lg:grid-cols-3''><div class=''p-8 rounded-3xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 hover:border-emerald-500/30 transition-colors duration-300''><div class=''w-10 h-10 rounded-lg bg-emerald-100 dark:bg-emerald-500/10 flex items-center justify-center mb-4''><svg class=''w-5 h-5 text-emerald-600 dark:text-emerald-400'' fill=''none'' stroke=''currentColor'' viewBox=''0 0 24 24''><path stroke-linecap=''round'' stroke-linejoin=''round'' stroke-width=''2'' d=''M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z''></path></svg></div><h3 class=''text-lg font-bold text-slate-900 dark:text-white mb-2''>Multi-Currency</h3><p class=''text-sm text-slate-600 dark:text-slate-400''>Real-time FX rates, rounding modes, charm pricing, and automatic product price sync across unlimited currencies.</p></div><div class=''p-8 rounded-3xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 hover:border-emerald-500/30 transition-colors duration-300''><div class=''w-10 h-10 rounded-lg bg-emerald-100 dark:bg-emerald-500/10 flex items-center justify-center mb-4''><svg class=''w-5 h-5 text-emerald-600 dark:text-emerald-400'' fill=''none'' stroke=''currentColor'' viewBox=''0 0 24 24''><path stroke-linecap=''round'' stroke-linejoin=''round'' stroke-width=''2'' d=''M9 14l6-6m-5.5.5h.01m4.99 5h.01M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16l3.5-2 3.5 2 3.5-2 3.5 2z''></path></svg></div><h3 class=''text-lg font-bold text-slate-900 dark:text-white mb-2''>Tax Automation</h3><p class=''text-sm text-slate-600 dark:text-slate-400''>Manual stacked tax rates (GST + PST) or fully automatic calculation via Stripe Tax — you choose.</p></div><div class=''p-8 rounded-3xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 hover:border-emerald-500/30 transition-colors duration-300''><div class=''w-10 h-10 rounded-lg bg-emerald-100 dark:bg-emerald-500/10 flex items-center justify-center mb-4''><svg class=''w-5 h-5 text-emerald-600 dark:text-emerald-400'' fill=''none'' stroke=''currentColor'' viewBox=''0 0 24 24''><path stroke-linecap=''round'' stroke-linejoin=''round'' stroke-width=''2'' d=''M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4''></path></svg></div><h3 class=''text-lg font-bold text-slate-900 dark:text-white mb-2''>Shipping Zones</h3><p class=''text-sm text-slate-600 dark:text-slate-400''>Zone-based rate resolution with country and state matching, per-currency pricing, and free-shipping thresholds.</p></div><div class=''p-8 rounded-3xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 hover:border-emerald-500/30 transition-colors duration-300''><div class=''w-10 h-10 rounded-lg bg-emerald-100 dark:bg-emerald-500/10 flex items-center justify-center mb-4''><svg class=''w-5 h-5 text-emerald-600 dark:text-emerald-400'' fill=''none'' stroke=''currentColor'' viewBox=''0 0 24 24''><path stroke-linecap=''round'' stroke-linejoin=''round'' stroke-width=''2'' d=''M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z''></path></svg></div><h3 class=''text-lg font-bold text-slate-900 dark:text-white mb-2''>Stripe &amp; Freemius Checkout</h3><p class=''text-sm text-slate-600 dark:text-slate-400''>Stripe for physical products, Freemius for digital licensing — provider-aware checkout with inventory validation.</p></div><div class=''p-8 rounded-3xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 hover:border-emerald-500/30 transition-colors duration-300''><div class=''w-10 h-10 rounded-lg bg-emerald-100 dark:bg-emerald-500/10 flex items-center justify-center mb-4''><svg class=''w-5 h-5 text-emerald-600 dark:text-emerald-400'' fill=''none'' stroke=''currentColor'' viewBox=''0 0 24 24''><path stroke-linecap=''round'' stroke-linejoin=''round'' stroke-width=''2'' d=''M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4''></path></svg></div><h3 class=''text-lg font-bold text-slate-900 dark:text-white mb-2''>Inventory Tracking</h3><p class=''text-sm text-slate-600 dark:text-slate-400''>Automatic quantity deduction on payment with resilient fallback paths and variant-level stock management.</p></div><div class=''p-8 rounded-3xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 hover:border-emerald-500/30 transition-colors duration-300''><div class=''w-10 h-10 rounded-lg bg-emerald-100 dark:bg-emerald-500/10 flex items-center justify-center mb-4''><svg class=''w-5 h-5 text-emerald-600 dark:text-emerald-400'' fill=''none'' stroke=''currentColor'' viewBox=''0 0 24 24''><path stroke-linecap=''round'' stroke-linejoin=''round'' stroke-width=''2'' d=''M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z''></path></svg></div><h3 class=''text-lg font-bold text-slate-900 dark:text-white mb-2''>Orders &amp; Invoices</h3><p class=''text-sm text-slate-600 dark:text-slate-400''>Full order lifecycle management, stable invoice numbering, printable documents, and exportable order reports.</p></div></div>"}}]]}'::jsonb, 4),
472
-
473
- (v_home_page_id, v_en_lang_id, 'section',
474
- '{"container_type":"container","background":{"type":"gradient","gradient":{"type":"linear","direction":"135deg","stops":[{"color":"#1e1b4b","position":0},{"color":"#0f172a","position":50},{"color":"#020817","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":"<div class=''rounded-3xl overflow-hidden border border-violet-500/20 bg-gradient-to-br from-white/5 to-violet-500/5 shadow-2xl p-6 backdrop-blur-sm''><img src=''/images/cortex-ai-square.webp'' alt=''NextBlock™ Cortex AI dashboard showing block generator'' class=''w-full h-auto rounded-2xl shadow-lg'' /><div class=''mt-4 grid grid-cols-3 gap-3 text-center''><div class=''p-3 rounded-xl bg-white/5 border border-white/10''><p class=''text-lg font-bold text-violet-400''>OpenRouter</p><p class=''text-xs text-slate-400''>AI Gateway</p></div><div class=''p-3 rounded-xl bg-white/5 border border-white/10''><p class=''text-lg font-bold text-violet-400''>BYOK</p><p class=''text-xs text-slate-400''>Cost Control</p></div><div class=''p-3 rounded-xl bg-white/5 border border-white/10''><p class=''text-lg font-bold text-violet-400''>Zod</p><p class=''text-xs text-slate-400''>Typed Blocks</p></div></div></div>"}}],[{"block_type":"text","content":{"html_content":"<p class=''text-xs uppercase tracking-[0.25em] text-violet-400 font-bold mb-4''>Now Available — AI Copilot</p><h2 class=''text-4xl md:text-5xl font-bold text-white mb-6 leading-tight''>Supercharge Your<br/>Content with AI.</h2><p class=''text-lg text-slate-300 max-w-2xl leading-relaxed mb-8''>NextBlock™ Cortex AI brings native block-level intelligence directly to your editor. Generate copy, refactor structures, and automate translations in one click, built directly on our high-performance architecture.</p>"}},{"block_type":"button","content":{"text":"Explore AI Capabilities →","url":"/article/nextblock-cortex-ai-guide","variant":"default","size":"lg"}},{"block_type":"button","content":{"text":"Get a License","url":"https://nextblock.dev/product/nextblock-cortex-ai-cortex-ai-license","variant":"outline","size":"lg"}}]]}'::jsonb, 5),
475
-
476
- (v_home_page_id, v_en_lang_id, 'section',
477
- '{"container_type":"container","background":{"type":"none"},"responsive_columns":{"mobile":1,"tablet":1,"desktop":1},"column_gap":"lg","padding":{"top":"xl","bottom":"xl"},"column_blocks":[[{"block_type":"heading","content":{"level":2,"text_content":"More Than a CMS. An Ecosystem.","textAlign":"center"}},{"block_type":"text","content":{"html_content":"<p class=''text-slate-600 dark:text-slate-400 text-center max-w-3xl mx-auto''>NextBlock™ is building a sustainable open-core roadmap so the platform grows with your business.</p>"}},{"block_type":"text","content":{"html_content":"<div class=''grid gap-6 lg:grid-cols-[0.75fr_1.25fr] mt-10 items-stretch''><div class=''overflow-hidden rounded-[2rem] border border-slate-200 dark:border-white/10 bg-slate-950 shadow-2xl''><img src=''/images/goals.webp'' alt=''Roadmap board outlining the NextBlock™ ecosystem and premium module direction'' class=''h-full w-full object-cover'' /><div class=''border-t border-white/10 bg-slate-950/95 px-6 py-5''><p class=''text-xs uppercase tracking-[0.24em] text-emerald-300 mb-2 font-bold''>Roadmap in motion</p><p class=''text-sm text-slate-300 mb-0''>Commerce ships first, then the broader ecosystem grows around plugins, blocks, and partner-built modules.</p></div></div><div class=''grid gap-6''><div class=''p-10 rounded-3xl border border-emerald-500/20 bg-gradient-to-br from-emerald-50 to-white dark:from-emerald-500/5 dark:to-white/5 hover:border-emerald-500/40 transition-colors''><p class=''text-xs uppercase tracking-wide text-emerald-600 dark:text-emerald-400 mb-2 font-bold''>Available now</p><h3 class=''text-xl font-bold text-slate-900 dark:text-white mb-3''>NextBlock™ Commerce</h3><p class=''text-sm text-slate-600 dark:text-slate-400''>Transform your site into a composable storefront with products, checkout, multi-currency pricing, tax automation, and commerce blocks that live beside your editorial content.</p></div><div class=''p-10 rounded-3xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 hover:border-violet-500/30 transition-colors''><p class=''text-xs uppercase tracking-wide text-violet-700 dark:text-violet-300 mb-2 font-bold''>Build the future</p><h3 class=''text-xl font-bold text-slate-900 dark:text-white mb-3''>Plugin and block marketplace</h3><p class=''text-sm text-slate-600 dark:text-slate-400''>A community marketplace gives developers room to publish, sell, and distribute custom blocks, themes, integrations, and partner modules.</p></div></div></div>"}},{"block_type":"heading","content":{"level":2,"text_content":"Join Our Community.","textAlign":"center"}},{"block_type":"text","content":{"html_content":"<p class=''text-slate-600 dark:text-slate-400 text-center mx-auto''>NextBlock™ is being built in the open. Star the repo, share feedback, and help define the future of performance-first content management.</p>"}},{"block_type":"text","content":{"html_content":"<div class=''grid gap-4 md:grid-cols-3 mt-10 text-sm''><a class=''p-6 rounded-2xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 hover:bg-slate-100 dark:hover:bg-white/10 transition-all hover:scale-[1.02]'' href=''https://github.com/nextblock-cms'' target=''_blank'' rel=''noopener noreferrer''><strong class=''block text-base text-slate-900 dark:text-white mb-1''>GitHub</strong><span class=''text-slate-600 dark:text-slate-400''>Star the repo &amp; contribute</span></a><a class=''p-6 rounded-2xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 hover:bg-slate-100 dark:hover:bg-white/10 transition-all hover:scale-[1.02]'' href=''https://x.com/NextBlockCMS'' target=''_blank'' rel=''noopener noreferrer''><strong class=''block text-base text-slate-900 dark:text-white mb-1''>X (Twitter)</strong><span class=''text-slate-600 dark:text-slate-400''>Follow updates &amp; announcements</span></a><a class=''p-6 rounded-2xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 hover:bg-slate-100 dark:hover:bg-white/10 transition-all hover:scale-[1.02]'' href=''https://dev.to/nextblockcms'' target=''_blank'' rel=''noopener noreferrer''><strong class=''block text-base text-slate-900 dark:text-white mb-1''>Dev.to</strong><span class=''text-slate-600 dark:text-slate-400''>Read technical deep dives</span></a></div>"}}]]}'::jsonb, 6),
478
-
479
- (v_home_page_id, v_en_lang_id, 'section',
480
- '{"container_type":"container","background":{"type":"gradient","gradient":{"type":"linear","direction":"180deg","stops":[{"color":"#020817","position":0},{"color":"#0f172a","position":100}]}},"responsive_columns":{"mobile":1,"tablet":1,"desktop":1},"column_gap":"lg","padding":{"top":"xl","bottom":"xl"},"column_blocks":[[{"block_type":"text","content":{"html_content":"<h2 class=''text-3xl md:text-4xl font-bold text-center text-white mb-4''>Have Questions?</h2>"}},{"block_type":"text","content":{"html_content":"<p class=''text-center text-lg text-slate-300 mx-auto mb-8''>NextBlock™ partners with early adopters to co-build features, sponsor modules, and shape the product direction.</p>"}},{"block_type":"button","content":{"text":"Get in Touch","url":"/contact","variant":"default","size":"lg","position":"center"}}]]}'::jsonb, 6),
481
-
482
- (v_blog_page_id, v_en_lang_id, 'hero',
483
- '{"container_type":"container","background":{"type":"gradient","gradient":{"type":"linear","direction":"135deg","stops":[{"color":"#020817","position":0},{"color":"#1e293b","position":100}]}},"responsive_columns":{"mobile":1,"tablet":1,"desktop":2},"column_gap":"lg","padding":{"top":"xl","bottom":"xl"},"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":"<h2 class=''text-4xl md:text-5xl font-bold text-white text-center md:text-left mb-6''>Deep dives into performance, DX, and visual editing.</h2>"}},{"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''>Explore architectural walkthroughs, Supabase recipes, and block editor experiments written by the Nextblock core team.</p>"}},{"block_type":"button","content":{"text":"Explore Articles","url":"/articles#latest","variant":"default","size":"lg"}},{"block_type":"button","content":{"text":"Subscribe for Updates","url":"https://github.com/nextblock-cms/nextblock/discussions","variant":"outline","size":"lg"}}],[{"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>"}}]]}'::jsonb, 0),
484
-
485
- (v_blog_page_id, v_en_lang_id, 'posts_grid',
486
- '{"postsPerPage":6,"columns":3,"showPagination":true,"title":"Latest Deep Dives"}'::jsonb, 1);
487
-
488
- DELETE FROM public.navigation_items WHERE menu_key = 'HEADER' AND language_id = v_en_lang_id;
489
-
490
- INSERT INTO public.navigation_items (language_id, menu_key, label, url, "order", page_id) VALUES
491
- (v_en_lang_id, 'HEADER', 'Home', '/', 0, v_home_page_id),
492
- (v_en_lang_id, 'HEADER', 'Articles', '/articles', 1, v_blog_page_id),
493
- (v_en_lang_id, 'HEADER', 'Contact', '/contact', 3, v_contact_page_id);
494
-
495
- INSERT INTO public.blocks (page_id, language_id, block_type, content, "order") VALUES
496
- (v_contact_page_id, v_en_lang_id, 'hero', '{"container_type":"container","background":{"type":"gradient","gradient":{"type":"linear","direction":"135deg","stops":[{"color":"#020817","position":0},{"color":"#0f172a","position":100}]}},"responsive_columns":{"mobile":1,"tablet":1,"desktop":1},"padding":{"top":"xl","bottom":"xl"},"column_blocks":[[{"block_type":"heading","content":{"level":1,"text_content":"Let''s Build the Future Together","textAlign":"center","textColor":"white"}},{"block_type":"text","content":{"html_content":"<p class=''text-xl text-slate-300 text-center max-w-3xl mx-auto mt-4''>NextBlock™ is an open-source project driven by community feedback. We''d love to hear your thoughts, ideas, or questions.</p>"}}]]}'::jsonb, 0),
497
- (v_contact_page_id, v_en_lang_id, 'section', '{"container_type":"container","background":{"type":"none"},"responsive_columns":{"mobile":1,"tablet":1,"desktop":1},"padding":{"top":"lg","bottom":"lg"},"column_blocks":[[{"block_type":"text","content":{"html_content":"<div class=''max-w-2xl mx-auto text-center''><h2 class=''text-2xl font-bold mb-4''>Open Source & Community Driven</h2><p class=''text-slate-600 dark:text-slate-400 mb-6''>NextBlock™ is built in the open. We rely on developers and editors like you to help us define the roadmap. Whether it''s a bug report, a feature request, or just a shoutout, every message helps us move faster.</p></div>"}}]]}'::jsonb, 1),
498
- (v_contact_page_id, v_en_lang_id, 'form', '{"recipient_email":"foo@bar.com","submit_button_text":"Send Message","success_message":"Thank you for your feedback! We''ll get back to you soon.","fields":[{"temp_id":"name","label":"Name","field_type":"text","is_required":true,"placeholder":"Your name"},{"temp_id":"email","label":"Email","field_type":"email","is_required":true,"placeholder":"your@email.com"},{"temp_id":"message","label":"Message","field_type":"textarea","is_required":true,"placeholder":"How can we help?"}]}'::jsonb, 2);
499
- END;
500
- $seed$;
501
- SELECT id AS home_page_id
502
- FROM public.pages
503
- WHERE slug = 'home'
504
- AND language_id = (SELECT id FROM public.languages WHERE code = 'en' LIMIT 1)
505
- ORDER BY created_at DESC
506
- LIMIT 1;
507
-
508
- SELECT id AS blog_page_id
509
- FROM public.pages
510
- WHERE slug = 'articles'
511
- AND language_id = (SELECT id FROM public.languages WHERE code = 'en' LIMIT 1)
512
- ORDER BY created_at DESC
513
- LIMIT 1;
514
- -- French Home + Blog blocks
515
- DO $seed_fr$
516
- DECLARE
517
- v_fr_lang_id BIGINT;
518
- v_home_page_fr_id BIGINT;
519
- v_blog_page_fr_id BIGINT;
520
- v_contact_page_fr_id BIGINT;
521
- BEGIN
522
- SELECT id INTO v_fr_lang_id FROM public.languages WHERE code = 'fr' LIMIT 1;
523
- IF v_fr_lang_id IS NULL THEN RAISE EXCEPTION 'French language not found.'; END IF;
524
-
525
- SELECT id INTO v_home_page_fr_id FROM public.pages WHERE slug = 'accueil' AND language_id = v_fr_lang_id ORDER BY created_at DESC LIMIT 1;
526
- SELECT id INTO v_blog_page_fr_id FROM public.pages WHERE slug = 'articles' AND language_id = v_fr_lang_id ORDER BY created_at DESC LIMIT 1;
527
- SELECT id INTO v_contact_page_fr_id FROM public.pages WHERE slug = 'contact' AND language_id = v_fr_lang_id ORDER BY created_at DESC LIMIT 1;
528
-
529
- IF v_home_page_fr_id IS NULL THEN RAISE EXCEPTION 'French home page not found.'; END IF;
530
- IF v_blog_page_fr_id IS NULL THEN RAISE EXCEPTION 'French articles page not found.'; END IF;
531
- IF v_contact_page_fr_id IS NULL THEN RAISE EXCEPTION 'French contact page not found.'; END IF;
532
-
533
- DELETE FROM public.blocks WHERE page_id IN (v_home_page_fr_id, v_blog_page_fr_id, v_contact_page_fr_id);
534
-
535
- DELETE FROM public.navigation_items WHERE menu_key = 'HEADER' AND language_id = v_fr_lang_id;
536
-
537
- INSERT INTO public.navigation_items (language_id, menu_key, label, url, "order", page_id) VALUES
538
- (v_fr_lang_id, 'HEADER', 'Accueil', '/accueil', 0, v_home_page_fr_id),
539
- (v_fr_lang_id, 'HEADER', 'Articles', '/articles', 1, v_blog_page_fr_id),
540
- (v_fr_lang_id, 'HEADER', 'Contact', '/contact', 3, v_contact_page_fr_id);
541
-
542
- INSERT INTO public.blocks (page_id, language_id, block_type, content, "order") VALUES
543
- (v_contact_page_fr_id, v_fr_lang_id, 'hero', '{"container_type":"container","background":{"type":"gradient","gradient":{"type":"linear","direction":"135deg","stops":[{"color":"#020817","position":0},{"color":"#0f172a","position":100}]}},"responsive_columns":{"mobile":1,"tablet":1,"desktop":1},"padding":{"top":"xl","bottom":"xl"},"column_blocks":[[{"block_type":"heading","content":{"level":1,"text_content":"Bâtissons le futur ensemble","textAlign":"center","textColor":"white"}},{"block_type":"text","content":{"html_content":"<p class=''text-xl text-slate-300 text-center max-w-3xl mx-auto mt-4''>NextBlock™ est un projet open-source propulsé par vos retours. Nous serions ravis d''entendre vos idées ou vos questions.</p>"}}]]}'::jsonb, 0),
544
- (v_contact_page_fr_id, v_fr_lang_id, 'section', '{"container_type":"container","background":{"type":"none"},"responsive_columns":{"mobile":1,"tablet":1,"desktop":1},"padding":{"top":"lg","bottom":"lg"},"column_blocks":[[{"block_type":"text","content":{"html_content":"<div class=''max-w-2xl mx-auto text-center''><h2 class=''text-2xl font-bold mb-4''>Open Source & Communautaire</h2><p class=''text-slate-600 dark:text-slate-400 mb-6''>NextBlock™ est construit en public. Nous comptons sur les développeurs et éditeurs comme vous pour définir notre roadmap. Qu''il s''agisse d''un bug, d''une suggestion ou d''un simple salut, chaque message compte.</p></div>"}}]]}'::jsonb, 1),
545
- (v_contact_page_fr_id, v_fr_lang_id, 'form', '{"recipient_email":"foo@bar.com","submit_button_text":"Envoyer le message","success_message":"Merci pour vos retours ! Nous vous répondrons bientôt.","fields":[{"temp_id":"nom","label":"Nom","field_type":"text","is_required":true,"placeholder":"Votre nom"},{"temp_id":"email","label":"Email","field_type":"email","is_required":true,"placeholder":"votre@email.com"},{"temp_id":"message","label":"Message","field_type":"textarea","is_required":true,"placeholder":"Comment pouvons-nous vous aider ?"}]}'::jsonb, 2);
546
-
547
- INSERT INTO public.blocks (page_id, language_id, block_type, content, "order") VALUES
548
- (v_home_page_fr_id, v_fr_lang_id, 'hero',
549
- '{"container_type":"container","background":{"type":"gradient","gradient":{"type":"linear","direction":"135deg","stops":[{"color":"#020817","position":0},{"color":"#0f172a","position":50},{"color":"#1e293b","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":"<h1 class=''text-5xl md:text-6xl font-bold tracking-tight text-white text-center drop-shadow-lg''>Créez des sites <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''>Ultra-Rapides</span></span><br class=''md:hidden'' />.</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™ est le CMS Next.js open-source alliant scores Lighthouse parfaits et éditeur visuel puissant.</p>"}},{"block_type":"button","content":{"text":"Commencer","url":"/article/comment-configurer-nextblock","variant":"default","size":"lg","position":"center"}},{"block_type":"button","content":{"text":"Voir sur GitHub","url":"https://github.com/nextblock-cms/nextblock","variant":"outline","size":"lg","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''>Pourquoi migrer</p><p class=''text-3xl font-bold text-white mb-2''>100% Lighthouse</p><p class=''text-base text-slate-300 mb-6''>Sites marketing et docs rendus à l''edge avec des performances irréprochables.</p><ul class=''space-y-3 text-sm text-slate-200''><li><span class=''text-blue-400 mr-2''>&#10003;</span> Next.js 16 avec ISR et cache edge</li><li><span class=''text-blue-400 mr-2''>&#10003;</span> Supabase pour l''auth, les données et le stockage</li><li><span class=''text-blue-400 mr-2''>&#10003;</span> Éditeur de blocs type Notion sur Tiptap</li></ul><div class=''mt-6 rounded-2xl overflow-hidden border border-white/10 shadow-lg''><img src=''/images/NBcover.webp'' alt=''Couverture Nextblock'' class=''w-full h-auto object-cover transform group-hover:scale-105 transition-transform duration-700'' fetchpriority=''high'' /></div></div></div>"}}]]}'::jsonb, 0),
550
-
551
- (v_home_page_fr_id, v_fr_lang_id, 'section',
552
- '{"container_type":"container","background":{"type":"none"},"responsive_columns":{"mobile":1,"tablet":1,"desktop":1},"column_gap":"lg","padding":{"top":"xl","bottom":"xl"},"column_blocks":[[{"block_type":"heading","content":{"level":2,"text_content":"Fonctionnalités clés : les trois piliers de NextBlock™","textAlign":"center"}},{"block_type":"text","content":{"html_content":"<p class=''text-lg text-slate-600 dark:text-slate-400 text-center max-w-3xl mx-auto''>NextBlock™ unifie performances, expérience éditoriale et contrôle développeur pour que chaque équipe livre son meilleur travail.</p>"}},{"block_type":"text","content":{"html_content":"<div class=''grid gap-8 md:grid-cols-3 mt-12''><div class=''p-10 rounded-3xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 backdrop-blur-sm hover:bg-slate-100 dark:hover:bg-white/10 transition-colors duration-300''><h3 class=''text-xl font-bold text-slate-900 dark:text-white mb-3''>Vitesse Extrême.</h3><p class=''text-sm text-slate-600 dark:text-slate-400 leading-relaxed''>Pensé pour des scores Lighthouse parfaits avec une diffusion mondiale.</p><ul class=''mt-6 space-y-3 text-sm text-slate-600 dark:text-slate-400''><li><strong class=''text-slate-800 dark:text-slate-200''>Edge Caching:</strong> Servez vos pages partout.</li><li><strong class=''text-slate-800 dark:text-slate-200''>Critical CSS:</strong> Styles en ligne pour éviter les blocages.</li><li><strong class=''text-slate-800 dark:text-slate-200''>Images Opt:</strong> AVIF et placeholders floutés.</li></ul></div><div class=''p-10 rounded-3xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 backdrop-blur-sm hover:bg-slate-100 dark:hover:bg-white/10 transition-colors duration-300''><h3 class=''text-xl font-bold text-slate-900 dark:text-white mb-3''>Expérience Éditeur.</h3><p class=''text-sm text-slate-600 dark:text-slate-400 leading-relaxed''>Un éditeur façon Notion pour publier sans dépendre des développeurs.</p><ul class=''mt-6 space-y-3 text-sm text-slate-600 dark:text-slate-400''><li><strong class=''text-slate-800 dark:text-slate-200''>Visuel:</strong> Héros, galeries, témoignages.</li><li><strong class=''text-slate-800 dark:text-slate-200''>Média:</strong> Dossiers, tags et actions groupées.</li><li><strong class=''text-slate-800 dark:text-slate-200''>Historique:</strong> Restauration complète.</li></ul></div><div class=''p-10 rounded-3xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 backdrop-blur-sm hover:bg-slate-100 dark:hover:bg-white/10 transition-colors duration-300''><h3 class=''text-xl font-bold text-slate-900 dark:text-white mb-3''>Extensible à l''Infini.</h3><p class=''text-sm text-slate-700 dark:text-slate-200 leading-relaxed''>Un socle Next.js + Supabase modulaire, extensible et auto-hébergeable.</p><ul class=''mt-6 space-y-3 text-sm text-slate-700 dark:text-slate-200''><li><strong class=''text-slate-900 dark:text-white''>SDK de blocs:</strong> Composants typés.</li><li><strong class=''text-slate-900 dark:text-white''>CLI:</strong> Générez modules en minutes.</li><li><strong class=''text-slate-900 dark:text-white''>Monorepo Nx:</strong> Dépendances maintenables.</li></ul></div></div>"}}]]}'::jsonb, 1),
553
-
554
- (v_home_page_fr_id, v_fr_lang_id, 'section',
555
- '{"container_type":"container","background":{"type":"gradient","gradient":{"type":"linear","direction":"180deg","stops":[{"color":"#0f172a","position":0},{"color":"#020817","position":100}]}},"responsive_columns":{"mobile":1,"tablet":1,"desktop":1},"column_gap":"lg","padding":{"top":"xl","bottom":"xl"},"column_blocks":[[{"block_type":"text","content":{"html_content":"<h2 class=''text-3xl md:text-4xl font-bold text-white text-center mb-6''>Conçu avec les meilleurs outils.</h2>"}},{"block_type":"text","content":{"html_content":"<p class=''text-slate-400 text-center max-w-2xl mx-auto''>Chaque couche de NextBlock™ repose sur des technologies éprouvées pour une expérience familière et performante.</p><div class=''grid grid-cols-2 sm:grid-cols-4 lg:grid-cols-8 gap-4 mt-10 text-sm font-semibold text-center text-white''><div class=''p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors''>Next.js</div><div class=''p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors''>React</div><div class=''p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors''>Supabase</div><div class=''p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors''>Stripe</div><div class=''p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors''>Tailwind</div><div class=''p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors''>Tiptap</div><div class=''p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors''>Vercel</div><div class=''p-4 rounded-2xl border border-white/10 bg-white/5 hover:bg-white/10 transition-colors''>Nx</div></div>"}},{"block_type":"text","content":{"html_content":"<h2 class=''text-3xl md:text-4xl font-bold text-white text-center mb-6 mt-16''>Puissant pour les développeurs. Intuitif pour les éditeurs.</h2>"}},{"block_type":"text","content":{"html_content":"<div class=''grid md:grid-cols-2 gap-8 mt-10 text-white''><div class=''p-8 rounded-3xl border border-white/10 bg-white/5 backdrop-blur-sm''><h3 class=''text-xl font-bold mb-6 text-blue-400''>Pour les créateurs</h3><ul class=''space-y-4 text-sm text-slate-300''><li><strong class=''text-white block mb-1''>Éditeur de blocs</strong>Glisser-déposer façon Notion.</li><li><strong class=''text-white block mb-1''>Blocs riches</strong>Héros, galeries, témoignages.</li><li><strong class=''text-white block mb-1''>Médiathèque</strong>Dossiers, tags et actions groupées.</li><li><strong class=''text-white block mb-1''>Versions sécurisées</strong>Historique et restauration instantanée.</li></ul></div><div class=''p-8 rounded-3xl border border-white/10 bg-gradient-to-br from-white/5 to-white/[0.02] backdrop-blur-sm''><h3 class=''text-xl font-bold mb-6 text-purple-400''>Pour les développeurs</h3><ul class=''space-y-4 text-sm text-slate-300''><li><strong class=''text-white block mb-1''>Next.js 16</strong>Server Components, ISR et Edge prêts à l''emploi.</li><li><strong class=''text-white block mb-1''>Supabase</strong>Postgres, auth, stockage, temps réel.</li><li><strong class=''text-white block mb-1''>Monorepo Nx</strong>Dépendances lisibles et centrales.</li><li><strong class=''text-white block mb-1''>SDK de blocs</strong>Widgets typés et extensibles.</li></ul></div></div>"}}]]}'::jsonb, 2),
556
- (v_home_page_fr_id, v_fr_lang_id, 'section',
557
- '{"container_type":"container","background":{"type":"gradient","gradient":{"type":"linear","direction":"135deg","stops":[{"color":"#022c22","position":0},{"color":"#0f172a","position":50},{"color":"#020817","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.25em] text-emerald-400 font-bold mb-4''>Disponible — Module Premium</p><h2 class=''text-4xl md:text-5xl font-bold text-white mb-6 leading-tight''>Transformez votre CMS<br/>en vitrine complète.</h2><p class=''text-lg text-slate-300 max-w-2xl leading-relaxed mb-8''>NextBlock™ Commerce transforme votre plateforme de contenu en moteur e-commerce complet. Produits, checkout, multi-devises, taxes, expédition, factures — le tout intégré nativement dans l''éditeur de blocs que vous connaissez déjà.</p>"}},{"block_type":"button","content":{"text":"Découvrir Commerce →","url":"/article/guide-commerce-nextblock","variant":"default","size":"lg"}},{"block_type":"button","content":{"text":"Obtenir une licence","url":"https://nextblock.dev/product/nextblock-commerce-pro-commerce-license","variant":"outline","size":"lg"}}],[{"block_type":"text","content":{"html_content":"<div class=''rounded-3xl overflow-hidden border border-emerald-500/20 bg-gradient-to-br from-white/5 to-emerald-500/5 shadow-2xl p-6 backdrop-blur-sm''><img src=''/images/commerce-square.webp'' alt=''Tableau de bord NextBlock™ Commerce'' class=''w-full h-auto rounded-2xl shadow-lg'' /><div class=''mt-4 grid grid-cols-3 gap-3 text-center''><div class=''p-3 rounded-xl bg-white/5 border border-white/10''><p class=''text-lg font-bold text-emerald-400''>∞</p><p class=''text-xs text-slate-400''>Devises</p></div><div class=''p-3 rounded-xl bg-white/5 border border-white/10''><p class=''text-lg font-bold text-emerald-400''>2</p><p class=''text-xs text-slate-400''>Fournisseurs</p></div><div class=''p-3 rounded-xl bg-white/5 border border-white/10''><p class=''text-lg font-bold text-emerald-400''>Auto</p><p class=''text-xs text-slate-400''>Taxes</p></div></div></div>"}}]]}'::jsonb, 3),
558
-
559
- (v_home_page_fr_id, v_fr_lang_id, 'section',
560
- '{"container_type":"container","background":{"type":"none"},"responsive_columns":{"mobile":1,"tablet":1,"desktop":1},"column_gap":"lg","padding":{"top":"xl","bottom":"xl"},"column_blocks":[[{"block_type":"heading","content":{"level":2,"text_content":"Tout pour vendre en ligne","textAlign":"center"}},{"block_type":"text","content":{"html_content":"<p class=''text-lg text-slate-600 dark:text-slate-400 text-center max-w-3xl mx-auto mb-12''>NextBlock™ Commerce livre une boîte à outils e-commerce complète pour aller du catalogue au paiement sans plugins tiers.</p><div class=''grid gap-6 md:grid-cols-2 lg:grid-cols-3''><div class=''p-8 rounded-3xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 hover:border-emerald-500/30 transition-colors duration-300''><h3 class=''text-lg font-bold text-slate-900 dark:text-white mb-2''>Multi-Devises</h3><p class=''text-sm text-slate-600 dark:text-slate-400''>Taux de change en temps réel, modes d''arrondi, prix charme et synchronisation automatique sur toutes les devises.</p></div><div class=''p-8 rounded-3xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 hover:border-emerald-500/30 transition-colors duration-300''><h3 class=''text-lg font-bold text-slate-900 dark:text-white mb-2''>Taxes Automatiques</h3><p class=''text-sm text-slate-600 dark:text-slate-400''>Taux manuels empilés (TPS + TVQ) ou calcul automatique via Stripe Tax — à vous de choisir.</p></div><div class=''p-8 rounded-3xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 hover:border-emerald-500/30 transition-colors duration-300''><h3 class=''text-lg font-bold text-slate-900 dark:text-white mb-2''>Zones d''Expédition</h3><p class=''text-sm text-slate-600 dark:text-slate-400''>Résolution par pays et état, tarification par devise et seuils de livraison gratuite.</p></div><div class=''p-8 rounded-3xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 hover:border-emerald-500/30 transition-colors duration-300''><h3 class=''text-lg font-bold text-slate-900 dark:text-white mb-2''>Stripe &amp; Freemius</h3><p class=''text-sm text-slate-600 dark:text-slate-400''>Stripe pour les produits physiques, Freemius pour les licences numériques — checkout intelligent avec validation d''inventaire.</p></div><div class=''p-8 rounded-3xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 hover:border-emerald-500/30 transition-colors duration-300''><h3 class=''text-lg font-bold text-slate-900 dark:text-white mb-2''>Suivi d''Inventaire</h3><p class=''text-sm text-slate-600 dark:text-slate-400''>Déduction automatique des quantités au paiement avec gestion des stocks par variante.</p></div><div class=''p-8 rounded-3xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 hover:border-emerald-500/30 transition-colors duration-300''><h3 class=''text-lg font-bold text-slate-900 dark:text-white mb-2''>Commandes &amp; Factures</h3><p class=''text-sm text-slate-600 dark:text-slate-400''>Gestion du cycle de vie des commandes, numérotation stable des factures et rapports de commandes exportables.</p></div></div>"}}]]}'::jsonb, 4),
561
-
562
- (v_home_page_fr_id, v_fr_lang_id, 'section',
563
- '{"container_type":"container","background":{"type":"gradient","gradient":{"type":"linear","direction":"135deg","stops":[{"color":"#1e1b4b","position":0},{"color":"#0f172a","position":50},{"color":"#020817","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":"<div class=''rounded-3xl overflow-hidden border border-violet-500/20 bg-gradient-to-br from-white/5 to-violet-500/5 shadow-2xl p-6 backdrop-blur-sm''><img src=''/images/cortex-ai-square.webp'' alt=''Tableau de bord NextBlock™ Cortex AI montrant le générateur de blocs'' class=''w-full h-auto rounded-2xl shadow-lg'' /><div class=''mt-4 grid grid-cols-3 gap-3 text-center''><div class=''p-3 rounded-xl bg-white/5 border border-white/10''><p class=''text-lg font-bold text-violet-400''>OpenRouter</p><p class=''text-xs text-slate-400''>Passerelle IA</p></div><div class=''p-3 rounded-xl bg-white/5 border border-white/10''><p class=''text-lg font-bold text-violet-400''>BYOK</p><p class=''text-xs text-slate-400''>Contrôle des coûts</p></div><div class=''p-3 rounded-xl bg-white/5 border border-white/10''><p class=''text-lg font-bold text-violet-400''>Zod</p><p class=''text-xs text-slate-400''>Blocs typés</p></div></div></div>"}}],[{"block_type":"text","content":{"html_content":"<p class=''text-xs uppercase tracking-[0.25em] text-violet-400 font-bold mb-4''>Disponible — Copilote IA</p><h2 class=''text-4xl md:text-5xl font-bold text-white mb-6 leading-tight''>Boostez votre<br/>contenu avec l''IA.</h2><p class=''text-lg text-slate-300 max-w-2xl leading-relaxed mb-8''>NextBlock™ Cortex AI apporte une intelligence native au niveau des blocs directement dans votre éditeur. Générez du texte, restructurez vos contenus et automatisez les traductions en un clic, le tout propulsé par notre architecture haute performance.</p>"}},{"block_type":"button","content":{"text":"Découvrir l''IA →","url":"/article/nextblock-cortex-ai-guide","variant":"default","size":"lg"}},{"block_type":"button","content":{"text":"Obtenir une licence","url":"https://nextblock.dev/product/nextblock-cortex-ai-cortex-ai-license","variant":"outline","size":"lg"}}]]}'::jsonb, 5),
564
-
565
- (v_home_page_fr_id, v_fr_lang_id, 'section',
566
- '{"container_type":"container","background":{"type":"none"},"responsive_columns":{"mobile":1,"tablet":1,"desktop":1},"column_gap":"lg","padding":{"top":"xl","bottom":"xl"},"column_blocks":[[{"block_type":"heading","content":{"level":2,"text_content":"Plus qu''un CMS. Un écosystème.","textAlign":"center"}},{"block_type":"text","content":{"html_content":"<p class=''text-slate-600 dark:text-slate-400 text-center max-w-3xl mx-auto''>NextBlock™ construit une feuille de route open-core durable qui évolue avec votre activité.</p>"}},{"block_type":"text","content":{"html_content":"<div class=''grid gap-6 lg:grid-cols-[0.75fr_1.25fr] mt-10 items-stretch''><div class=''overflow-hidden rounded-[2rem] border border-slate-200 dark:border-white/10 bg-slate-950 shadow-2xl''><img src=''/images/goals.webp'' alt=''Tableau de roadmap montrant la direction de l''ecosysteme NextBlock™ et des modules premium'' class=''h-full w-full object-cover'' /><div class=''border-t border-white/10 bg-slate-950/95 px-6 py-5''><p class=''text-xs uppercase tracking-[0.24em] text-emerald-300 mb-2 font-bold''>Roadmap en mouvement</p><p class=''text-sm text-slate-300 mb-0''>Le commerce arrive en premier, puis l''ecosysteme s''etend avec des plugins, des blocs et des modules construits par les partenaires.</p></div></div><div class=''grid gap-6''><div class=''p-10 rounded-3xl border border-emerald-500/20 bg-gradient-to-br from-emerald-50 to-white dark:from-emerald-500/5 dark:to-white/5 hover:border-emerald-500/40 transition-colors''><p class=''text-xs uppercase tracking-wide text-emerald-600 dark:text-emerald-400 mb-2 font-bold''>Disponible maintenant</p><h3 class=''text-xl font-bold text-slate-900 dark:text-white mb-3''>NextBlock™ Commerce</h3><p class=''text-sm text-slate-600 dark:text-slate-400''>Transformez votre site en vitrine composable avec produits, checkout, tarification multi-devise, taxes automatiques et blocs commerce relies a votre contenu editorial.</p></div><div class=''p-10 rounded-3xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 hover:border-violet-500/30 transition-colors''><p class=''text-xs uppercase tracking-wide text-violet-700 dark:text-violet-300 mb-2 font-bold''>Construire la suite</p><h3 class=''text-xl font-bold text-slate-900 dark:text-white mb-3''>Marketplace de plugins et blocs</h3><p class=''text-sm text-slate-600 dark:text-slate-400''>Une marketplace communautaire ouvrira la voie a la publication, la vente et la distribution de blocs, themes, integrations et modules partenaires.</p></div></div></div>"}},{"block_type":"heading","content":{"level":2,"text_content":"Rejoignez la communauté.","textAlign":"center"}},{"block_type":"text","content":{"html_content":"<p class=''text-slate-600 dark:text-slate-400 text-center max-w-3xl mx-auto''>NextBlock™ se construit en public. Ajoutez une étoile, partagez vos retours et façonnez l''avenir du CMS orienté performance.</p>"}},{"block_type":"text","content":{"html_content":"<div class=''grid gap-4 md:grid-cols-3 mt-10 text-sm''><a class=''p-6 rounded-2xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 hover:bg-slate-100 dark:hover:bg-white/10 transition-all hover:scale-[1.02]'' href=''https://github.com/nextblock-cms'' target=''_blank'' rel=''noopener noreferrer''><strong class=''block text-base text-slate-900 dark:text-white mb-1''>GitHub</strong><span class=''text-slate-600 dark:text-slate-400''>Ajoutez une étoile &amp; contribuez</span></a><a class=''p-6 rounded-2xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 hover:bg-slate-100 dark:hover:bg-white/10 transition-all hover:scale-[1.02]'' href=''https://x.com/NextBlockCMS'' target=''_blank'' rel=''noopener noreferrer''><strong class=''block text-base text-slate-900 dark:text-white mb-1''>X (Twitter)</strong><span class=''text-slate-600 dark:text-slate-400''>Suivez les annonces</span></a><a class=''p-6 rounded-2xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5 hover:bg-slate-100 dark:hover:bg-white/10 transition-all hover:scale-[1.02]'' href=''https://dev.to/nextblockcms'' target=''_blank'' rel=''noopener noreferrer''><strong class=''block text-base text-slate-900 dark:text-white mb-1''>Dev.to</strong><span class=''text-slate-600 dark:text-slate-400''>Lisez nos articles techniques</span></a></div>"}}]]}'::jsonb, 6),
567
-
568
- (v_home_page_fr_id, v_fr_lang_id, 'section',
569
- '{"container_type":"container","background":{"type":"gradient","gradient":{"type":"linear","direction":"180deg","stops":[{"color":"#020817","position":0},{"color":"#0f172a","position":100}]}},"responsive_columns":{"mobile":1,"tablet":1,"desktop":1},"column_gap":"lg","padding":{"top":"xl","bottom":"xl"},"column_blocks":[[{"block_type":"text","content":{"html_content":"<h2 class=''text-3xl md:text-4xl font-bold text-center text-white mb-4''>Des questions ?</h2>"}},{"block_type":"text","content":{"html_content":"<p class=''text-center text-base text-slate-300 max-w-2xl mx-auto''>NextBlock™ co-construit avec des partenaires : fonctionnalités, modules sponsorisés et direction produit.</p>"}},{"block_type":"button","content":{"text":"Nous contacter","url":"mailto:info@nextblock.dev","variant":"default","size":"lg","position":"center"}}]]}'::jsonb, 7),
570
-
571
- (v_blog_page_fr_id, v_fr_lang_id, 'hero',
572
- '{"container_type":"container","background":{"type":"gradient","gradient":{"type":"linear","direction":"135deg","stops":[{"color":"#020817","position":0},{"color":"#1e293b","position":100}]}},"responsive_columns":{"mobile":1,"tablet":1,"desktop":2},"column_gap":"lg","padding":{"top":"xl","bottom":"xl"},"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":"<h2 class=''text-4xl md:text-5xl font-bold text-white text-center md:text-left mb-6''>Plongées dans la performance, l''expérience dev et l''édition visuelle.</h2>"}},{"block_type":"text","content":{"html_content":"<p class=''text-lg max-w-xl mx-auto md:mx-0 text-center md:text-left text-slate-300 leading-relaxed''>Walkthroughs d''architecture, recettes Supabase et expérimentations éditeur écrits par l''équipe Nextblock.</p>"}},{"block_type":"button","content":{"text":"Explorer les articles","url":"/articles#latest","variant":"default","size":"lg"}},{"block_type":"button","content":{"text":"S''abonner aux mises à jour","url":"https://github.com/nextblock-cms/nextblock/discussions","variant":"outline","size":"lg"}}],[{"block_type":"text","content":{"html_content":"<div class=''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>"}}]]}'::jsonb, 0),
573
-
574
- (v_blog_page_fr_id, v_fr_lang_id, 'posts_grid',
575
- '{"postsPerPage":6,"columns":3,"showPagination":true,"title":"Derniers articles"}'::jsonb, 1);
576
- END;
577
- $seed_fr$;
578
-
579
- -- Convert seeded 'hero' block types to 'section' with is_hero = true
580
- UPDATE public.blocks
581
- SET
582
- block_type = 'section',
583
- content = COALESCE(content, '{}'::jsonb) || '{"is_hero": true}'::jsonb
584
- WHERE block_type = 'hero';
585
-
586
- -- Post content blocks for all 3 posts (EN + FR)
587
- WITH target_posts AS (
588
- SELECT id, language_id, slug
589
- FROM public.posts
590
- WHERE slug IN ('how-nextblock-works', 'comment-nextblock-fonctionne', 'how-to-setup-nextblock', 'comment-configurer-nextblock', 'nextblock-commerce-guide', 'guide-commerce-nextblock')
591
- ),
592
- purged AS (
593
- DELETE FROM public.blocks
594
- WHERE post_id IN (SELECT id FROM target_posts)
595
- )
596
- INSERT INTO public.blocks (post_id, language_id, block_type, content, "order")
597
-
598
- -- Post 1 EN: How NextBlock™ Works
599
- SELECT tp.id, tp.language_id, 'text', jsonb_build_object('html_content',
600
- $$<p class='text-lg leading-8 text-slate-700 dark:text-slate-300'>NextBlock™ is designed so the hosted CMS, the open-source starter, and the developer tooling all feel like the same product. The shared Nx workspace, typed block contracts, and reusable editor package keep product polish and developer velocity moving together.</p>
601
-
602
- <div class='grid gap-4 md:grid-cols-3 my-10'>
603
- <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'>
604
- <p class='text-xs font-semibold uppercase tracking-[0.22em] text-sky-700 dark:text-sky-200'>One codebase</p>
605
- <h3 class='mt-3 text-xl font-semibold text-slate-900 dark:text-white'>Shared foundation</h3>
606
- <p class='mt-3 text-sm text-slate-600 dark:text-slate-300'>Marketing pages, CMS screens, and the starter template evolve together instead of drifting apart.</p>
607
- </div>
608
- <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'>
609
- <p class='text-xs font-semibold uppercase tracking-[0.22em] text-indigo-700 dark:text-indigo-200'>Typed content</p>
610
- <h3 class='mt-3 text-xl font-semibold text-slate-900 dark:text-white'>Blocks with guardrails</h3>
611
- <p class='mt-3 text-sm text-slate-600 dark:text-slate-300'>Zod schemas, defaults, and renderer contracts make every custom block safer to ship.</p>
612
- </div>
613
- <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'>
614
- <p class='text-xs font-semibold uppercase tracking-[0.22em] text-emerald-700 dark:text-emerald-200'>Editorial UX</p>
615
- <h3 class='mt-3 text-xl font-semibold text-slate-900 dark:text-white'>Product-grade editing</h3>
616
- <p class='mt-3 text-sm text-slate-600 dark:text-slate-300'>The Tiptap layer gives editors a richer surface without hiding the underlying HTML power.</p>
617
- </div>
618
- </div>
619
-
620
- <div class='flex flex-col md:flex-row gap-8 items-start my-12'>
621
- <div class='w-full md:w-3/5 space-y-4'>
622
- <h2>Monorepo Layout and Dependency Flow</h2>
623
- <p>The <code>apps/nextblock</code> directory contains the production Next.js experience, including the public site and authenticated CMS shell. The <code>apps/create-nextblock</code> CLI mirrors that foundation so teams can start from the same product decisions instead of rebuilding them from scratch.</p>
624
- <ul class='list-disc pl-6 space-y-2 text-sm'>
625
- <li><strong>@nextblock-cms/ui</strong> - UI components, tokens, and shared design primitives</li>
626
- <li><strong>@nextblock-cms/utils</strong> - translations, environment guards, and storage helpers</li>
627
- <li><strong>@nextblock-cms/db</strong> - migrations, typed database access, and generated types</li>
628
- <li><strong>@nextblock-cms/editor</strong> - the reusable Tiptap v3 editing surface</li>
629
- <li><strong>@nextblock-cms/sdk</strong> - typed contracts for block authorship and validation</li>
630
- <li><strong>@nextblock-cms/ecommerce</strong> - the premium commerce module when activated</li>
631
- </ul>
632
- <p>Run <code>nx graph</code> and you can see exactly how changes ripple through the workspace. Path aliases from <code>tsconfig.base.json</code> and the shared Tailwind setup help keep design parity between marketing pages, admin screens, and generated projects.</p>
633
- </div>
634
- <aside class='w-full md:w-2/5 rounded-[2rem] border border-slate-200/80 bg-white p-4 shadow-xl dark:border-white/10 dark:bg-white/5'>
635
- <img src='/images/nx-graph.webp' alt='Nx project graph preview showing apps and shared libraries linked together' class='w-full h-auto rounded-2xl object-cover' />
636
- <p class='mt-3 text-sm text-slate-500 dark:text-slate-400'>Nx makes every workspace relationship visible, which is exactly why the starter, CMS, and packages stay aligned.</p>
637
- </aside>
638
- </div>
639
-
640
- <figure class='my-12 overflow-hidden rounded-[2rem] border border-slate-200/80 bg-slate-950 shadow-2xl dark:border-white/10'>
641
- <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' />
642
- <figcaption class='border-t border-white/10 px-6 py-4 text-sm text-slate-300'>A single visual system spans content modeling, editing, and future premium modules like commerce.</figcaption>
643
- </figure>
644
-
645
- <h2>Block Registry as Product Surface</h2>
646
- <p>The block registry in <code>apps/nextblock/lib/blocks/blockRegistry.ts</code> is the source of truth for available block types, Zod schemas, starter content, and editor or renderer components. Today that includes everything from <code>text</code> and <code>heading</code> to <code>section</code>, <code>posts_grid</code>, <code>checkout</code>, and <code>product_details</code>.</p>
647
- <p>Sections support nested column arrays, so layouts can be composed like real pages instead of flat content lists. Helpers such as <code>getBlockDefinition()</code>, <code>getInitialContent()</code>, and <code>validateBlockContent()</code> keep that flexibility strongly typed.</p>
648
-
649
- <h2>The Editing Layer</h2>
650
- <p>The <code>@nextblock-cms/editor</code> package wraps Tiptap v3 into a reusable editorial surface with slash commands, floating and bubble menus, drag handles, tables, task lists, character counts, and syntax-highlighted code blocks. It deliberately preserves richer HTML so advanced teams are not boxed into a simplified subset.</p>
651
-
652
- <h2>Inside the CMS Shell</h2>
653
- <p>Within <code>apps/nextblock/app/cms</code>, each feature area follows a repeatable pattern: list pages, create and edit routes, scoped client components, and server actions that wrap Supabase mutations. The result feels consistent for editors while keeping credentials and permissions on the server side.</p>
654
-
655
- <h2>Open Core Without Product Drift</h2>
656
- <p>The core CMS is open source under AGPL. Premium modules like <code>@nextblock-cms/ecommerce</code> remain source-available but are activated through <code>package_activations</code> and <code>verifyPackageOnline()</code>. That means the same shell can stay clean for open-source users while revealing commerce surfaces only when the license is active.</p>
657
-
658
- <h2>Why It Holds Together</h2>
659
- <p>The Nx workspace keeps libraries honest, the Next.js app enforces UI consistency, Supabase migrations codify access rules, and the Tiptap editor gives collaborators the same authoring experience regardless of deployment. When a team runs <code>npm create nextblock</code>, they inherit the full operating model, not just a pile of files.</p>$$
660
- ), 0 FROM target_posts tp WHERE tp.slug = 'how-nextblock-works'
661
-
662
- UNION ALL
663
-
664
- -- Post 1 FR: Comment NextBlock™ fonctionne
665
- SELECT tp.id, tp.language_id, 'text', jsonb_build_object('html_content',
666
- $$<p class='text-lg leading-8 text-slate-700 dark:text-slate-300'>NextBlock™ relie le CMS h&eacute;berg&eacute;, le starter open source et les outils dev dans un m&ecirc;me socle produit. Le workspace Nx, les contrats de blocs typ&eacute;s et l'&eacute;diteur partag&eacute; permettent d'avancer vite sans sacrifier la coh&eacute;rence.</p>
667
-
668
- <div class='grid gap-4 md:grid-cols-3 my-10'>
669
- <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'>
670
- <p class='text-xs font-semibold uppercase tracking-[0.22em] text-sky-700 dark:text-sky-200'>Socle unique</p>
671
- <h3 class='mt-3 text-xl font-semibold text-slate-900 dark:text-white'>Une m&ecirc;me base</h3>
672
- <p class='mt-3 text-sm text-slate-600 dark:text-slate-300'>Le site public, le shell CMS et le starter gardent les m&ecirc;mes choix produit et la m&ecirc;me direction visuelle.</p>
673
- </div>
674
- <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'>
675
- <p class='text-xs font-semibold uppercase tracking-[0.22em] text-indigo-700 dark:text-indigo-200'>Contenu typ&eacute;</p>
676
- <h3 class='mt-3 text-xl font-semibold text-slate-900 dark:text-white'>Blocs avec garde-fous</h3>
677
- <p class='mt-3 text-sm text-slate-600 dark:text-slate-300'>Sch&eacute;mas Zod, contenus par d&eacute;faut et contrats de rendu rendent les extensions plus s&ucirc;res &agrave; maintenir.</p>
678
- </div>
679
- <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'>
680
- <p class='text-xs font-semibold uppercase tracking-[0.22em] text-emerald-700 dark:text-emerald-200'>Exp&eacute;rience &eacute;ditoriale</p>
681
- <h3 class='mt-3 text-xl font-semibold text-slate-900 dark:text-white'>Edition premium</h3>
682
- <p class='mt-3 text-sm text-slate-600 dark:text-slate-300'>La couche Tiptap donne aux &eacute;diteurs une interface riche sans masquer la puissance HTML pour les cas avanc&eacute;s.</p>
683
- </div>
684
- </div>
685
-
686
- <div class='flex flex-col md:flex-row gap-8 items-start my-12'>
687
- <div class='w-full md:w-3/5 space-y-4'>
688
- <h2>Architecture monorepo et flux de d&eacute;pendances</h2>
689
- <p>Le dossier <code>apps/nextblock</code> contient l'exp&eacute;rience Next.js en production, incluant le site public et le shell CMS authentifi&eacute;. Le CLI <code>apps/create-nextblock</code> reprend cette base pour que les nouveaux projets partent des m&ecirc;mes d&eacute;cisions produit.</p>
690
- <ul class='list-disc pl-6 space-y-2 text-sm'>
691
- <li><strong>@nextblock-cms/ui</strong> - composants UI, tokens et primitives visuelles partag&eacute;es</li>
692
- <li><strong>@nextblock-cms/utils</strong> - traductions, gardes d'environnement et helpers de stockage</li>
693
- <li><strong>@nextblock-cms/db</strong> - migrations, acc&egrave;s base typ&eacute; et types g&eacute;n&eacute;r&eacute;s</li>
694
- <li><strong>@nextblock-cms/editor</strong> - la surface d'&eacute;dition Tiptap v3 r&eacute;utilisable</li>
695
- <li><strong>@nextblock-cms/sdk</strong> - contrats typ&eacute;s pour l'auteuring et la validation des blocs</li>
696
- <li><strong>@nextblock-cms/ecommerce</strong> - le module commerce premium lorsqu'il est activ&eacute;</li>
697
- </ul>
698
- <p>Lancez <code>nx graph</code> et vous voyez imm&eacute;diatement comment un changement se propage. Les alias de <code>tsconfig.base.json</code> et la configuration Tailwind partag&eacute;e aident &agrave; garder une vraie parit&eacute; entre marketing, back-office et projets g&eacute;n&eacute;r&eacute;s.</p>
699
- </div>
700
- <aside class='w-full md:w-2/5 rounded-[2rem] border border-slate-200/80 bg-white p-4 shadow-xl dark:border-white/10 dark:bg-white/5'>
701
- <img src='/images/nx-graph.webp' alt='Apercu du graphe Nx montrant les applications et librairies partagees' class='w-full h-auto rounded-2xl object-cover' />
702
- <p class='mt-3 text-sm text-slate-500 dark:text-slate-400'>Nx rend visibles les relations du workspace, ce qui aide le starter, le CMS et les packages a rester alignes.</p>
703
- </aside>
704
- </div>
705
-
706
- <figure class='my-12 overflow-hidden rounded-[2rem] border border-slate-200/80 bg-slate-950 shadow-2xl dark:border-white/10'>
707
- <img src='/images/extensibility.webp' alt='Visuel NextBlock™ montrant le CMS relie a des modules reutilisables et des integrations' class='w-full h-auto object-cover' />
708
- <figcaption class='border-t border-white/10 px-6 py-4 text-sm text-slate-300'>Un seul langage visuel relie la modelisation de contenu, l'edition et les futurs modules premium comme le commerce.</figcaption>
709
- </figure>
710
-
711
- <h2>Le registre de blocs comme surface produit</h2>
712
- <p>Le registre dans <code>apps/nextblock/lib/blocks/blockRegistry.ts</code> d&eacute;finit les types disponibles, les sch&eacute;mas Zod, les contenus de d&eacute;part et les composants d'&eacute;dition ou de rendu. On y trouve aujourd'hui des blocs comme <code>text</code>, <code>heading</code>, <code>section</code>, <code>posts_grid</code>, <code>checkout</code> et <code>product_details</code>.</p>
713
- <p>Les sections supportent des colonnes imbriqu&eacute;es, ce qui permet de composer de vraies pages plut&ocirc;t qu'une simple liste de contenu. Des helpers comme <code>getBlockDefinition()</code>, <code>getInitialContent()</code> and <code>validateBlockContent()</code> gardent cette flexibilit&eacute; bien typ&eacute;e.</p>
714
-
715
- <h2>La couche d'edition</h2>
716
- <p>Le package <code>@nextblock-cms/editor</code> enveloppe Tiptap v3 dans une surface &eacute;ditoriale r&eacute;utilisable avec slash commands, menus contextuels, drag handles, tableaux, listes de taches, compteurs et blocs de code. Le but est de conserver un HTML riche quand une equipe en a besoin.</p>
717
-
718
- <h2>A l'interieur du shell CMS</h2>
719
- <p>Dans <code>apps/nextblock/app/cms</code>, chaque zone suit un motif lisible : pages de liste, routes de creation et d'edition, composants clients cibles et server actions qui encapsulent les mutations Supabase. Les editeurs y gagnent une interface coherente et les identifiants restent cote serveur.</p>
720
-
721
- <h2>Open core sans derive produit</h2>
722
- <p>Le coeur du CMS est open source sous AGPL. Les modules premium comme <code>@nextblock-cms/ecommerce</code> restent disponibles en source mais sont actives via <code>package_activations</code> et <code>verifyPackageOnline()</code>. Le meme shell peut donc rester simple pour l'open source tout en deverrouillant les surfaces commerce au bon moment.</p>
723
-
724
- <h2>Pourquoi l'ensemble tient</h2>
725
- <p>Le workspace Nx garde les librairies honnetes, l'app Next.js maintient la coherence UI, les migrations Supabase codifient les regles d'acces, et l'editeur Tiptap donne la meme experience de contribution quel que soit le deploiement. Quand une equipe lance <code>npm create nextblock</code>, elle recupere une facon de travailler complete, pas juste des fichiers.</p>$$
726
- ), 0 FROM target_posts tp WHERE tp.slug = 'comment-nextblock-fonctionne'
727
-
728
- UNION ALL
729
-
730
- -- Post 2 EN: How to Setup NextBlock™
731
- SELECT tp.id, tp.language_id, 'text', jsonb_build_object('html_content',
732
- $$<p class='text-lg leading-8 text-slate-700 dark:text-slate-300'>There are two strong ways to start with NextBlock: clone the full monorepo if you want the whole platform, or scaffold a standalone app if you want to ship quickly. Both paths land you on the same editorial model, design system, and CMS foundation.</p>
733
-
734
- <div class='rounded-[2rem] border border-blue-200 bg-blue-50/80 p-6 my-10 dark:border-blue-500/20 dark:bg-blue-500/10'>
735
- <p class='text-xs font-semibold uppercase tracking-[0.22em] text-blue-700 dark:text-blue-200'>Choose your path</p>
736
- <div class='grid gap-6 md:grid-cols-2 mt-5'>
737
- <div class='rounded-2xl border border-blue-100 bg-white p-5 dark:border-blue-500/10 dark:bg-slate-900/40'>
738
- <h3 class='mt-0 text-xl text-slate-900 dark:text-white'>Monorepo</h3>
739
- <p class='text-sm text-slate-600 dark:text-slate-300'>Best for contributors, plugin authors, and teams that want direct access to every app and shared package.</p>
740
- </div>
741
- <div class='rounded-2xl border border-blue-100 bg-white p-5 dark:border-blue-500/10 dark:bg-slate-900/40'>
742
- <h3 class='mt-0 text-xl text-slate-900 dark:text-white'>CLI starter</h3>
743
- <p class='text-sm text-slate-600 dark:text-slate-300'>Best for launching a production-ready Next.js project with NextBlock™ already wired in and easy to deploy.</p>
744
- </div>
745
- </div>
746
- </div>
747
-
748
- <figure class='my-12 overflow-hidden rounded-[2rem] border border-slate-200/80 bg-slate-950 shadow-2xl dark:border-white/10'>
749
- <img src='/images/included.webp' alt='NextBlock™ platform artwork showing the CMS, blocks, and integrations that ship together' class='w-full h-auto object-cover' />
750
- <figcaption class='border-t border-white/10 px-6 py-4 text-sm text-slate-300'>Whichever path you choose, you still inherit the same block editor, CMS shell, and shared product language.</figcaption>
751
- </figure>
752
-
753
- <h2>Path 1: Clone the Monorepo</h2>
754
- <p>This route is ideal when you want the full Nx workspace and every internal package available locally.</p>
755
-
756
- <div class='grid gap-6 md:grid-cols-2 my-8'>
757
- <div class='rounded-3xl border border-slate-200/80 bg-slate-50 p-6 dark:border-white/10 dark:bg-white/5'>
758
- <p class='text-xs font-semibold uppercase tracking-[0.22em] text-slate-500 dark:text-slate-400'>You get</p>
759
- <ul class='mt-4 list-disc pl-5 space-y-2 text-sm'>
760
- <li>The public site, CMS app, CLI source, and shared libraries</li>
761
- <li>Direct access to <code>libs/</code> for custom block and package work</li>
762
- <li>Workspace tools like <code>nx graph</code> for dependency visibility</li>
763
- </ul>
764
- </div>
765
- <div class='rounded-3xl border border-slate-200/80 bg-slate-50 p-6 dark:border-white/10 dark:bg-white/5'>
766
- <p class='text-xs font-semibold uppercase tracking-[0.22em] text-slate-500 dark:text-slate-400'>Good fit for</p>
767
- <ul class='mt-4 list-disc pl-5 space-y-2 text-sm'>
768
- <li>Core contributors and maintainers</li>
769
- <li>Teams building custom modules or premium extensions</li>
770
- <li>Agencies that want end-to-end control over the platform</li>
771
- </ul>
772
- </div>
773
- </div>
774
-
775
- <pre><code>git clone https://github.com/nextblock-cms/nextblock.git
776
- cd nextblock
777
- npm install
778
- npm run setup</code></pre>
779
-
780
- <p>The <code>npm run setup</code> wizard creates <code>.env.local</code>, asks for your Supabase keys, can wire up R2 and SMTP, links the Supabase CLI, and pushes the schema with <code>npm run db:push</code>.</p>
781
-
782
- <p>Then start the app:</p>
783
- <pre><code>npx nx serve nextblock</code></pre>
784
-
785
- <p>Useful monorepo commands:</p>
786
- <pre><code># Build every workspace package
787
- npm run all-builds
788
-
789
- # Lint the main application
790
- npm run nx:lint:nextblock
791
-
792
- # Regenerate database types
793
- npm run db:types
794
-
795
- # Inspect workspace relationships
796
- npx nx graph</code></pre>
797
-
798
- <h2>Path 2: Use the CLI Starter</h2>
799
- <p>If your goal is to launch quickly, the CLI gives you a standalone Next.js app with NextBlock™ already embedded.</p>
800
-
801
- <pre><code>npm create nextblock@latest my-site
802
- cd my-site</code></pre>
803
-
804
- <p>The CLI copies a production-ready template, rewrites workspace imports to published packages, and can run the same setup flow for you. Your result is a normal Next.js app with no Nx requirement.</p>
805
-
806
- <p>Configure your environment in <code>.env.local</code>:</p>
807
- <pre><code>NEXT_PUBLIC_SUPABASE_URL=your-project-url
808
- NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
809
- SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
810
- NEXT_PUBLIC_URL=http://localhost:3000</code></pre>
811
-
812
- <p>Push the schema and start developing:</p>
813
- <pre><code>npm run db:push
814
- npm run dev</code></pre>
815
-
816
- <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'>
817
- <p class='text-xs font-semibold uppercase tracking-[0.22em] text-amber-700 dark:text-amber-200'>Tip</p>
818
- <p class='mb-0 text-sm text-slate-700 dark:text-slate-200'>The CLI path is the fastest way to evaluate NextBlock™ with your own content model before you decide whether you need the full workspace.</p>
819
- </div>
820
-
821
- <h2>Activating Premium Modules</h2>
822
- <p>For CLI-generated projects, the commerce package can be activated with a single command:</p>
823
- <pre><code>npx create-nextblock activate ecommerce</code></pre>
824
- <p>This injects wrappers for <code>/cms/orders</code>, <code>/cms/products</code>, <code>/checkout</code>, and the checkout API, all gated through <code>verifyPackageOnline()</code> so premium routes stay aligned with your license.</p>
825
-
826
- <h2>Deployment</h2>
827
- <p>NextBlock™ deploys like a standard Next.js app. Push to Vercel, Netlify, or any Node.js host, then make sure your server-side environment variables such as the Supabase service role, Stripe keys, and <code>CRON_SECRET</code> are configured in that environment.</p>$$
828
- ), 0 FROM target_posts tp WHERE tp.slug = 'how-to-setup-nextblock'
829
-
830
- UNION ALL
831
-
832
- -- Post 2 FR: Comment configurer NextBlock™
833
- SELECT tp.id, tp.language_id, 'text', jsonb_build_object('html_content',
834
- $$<p class='text-lg leading-8 text-slate-700 dark:text-slate-300'>Il existe deux bonnes facons de lancer NextBlock™ : cloner le monorepo complet si vous voulez toute la plateforme, ou partir du CLI si vous voulez aller vite. Dans les deux cas, vous retrouvez le meme modele editorial, le meme shell CMS et la meme base produit.</p>
835
-
836
- <div class='rounded-[2rem] border border-blue-200 bg-blue-50/80 p-6 my-10 dark:border-blue-500/20 dark:bg-blue-500/10'>
837
- <p class='text-xs font-semibold uppercase tracking-[0.22em] text-blue-700 dark:text-blue-200'>Choisissez votre chemin</p>
838
- <div class='grid gap-6 md:grid-cols-2 mt-5'>
839
- <div class='rounded-2xl border border-blue-100 bg-white p-5 dark:border-blue-500/10 dark:bg-slate-900/40'>
840
- <h3 class='mt-0 text-xl text-slate-900 dark:text-white'>Monorepo</h3>
841
- <p class='text-sm text-slate-600 dark:text-slate-300'>Ideal pour les contributeurs, auteurs de plugins et equipes qui veulent travailler directement dans tous les packages partages.</p>
842
- </div>
843
- <div class='rounded-2xl border border-blue-100 bg-white p-5 dark:border-blue-500/10 dark:bg-slate-900/40'>
844
- <h3 class='mt-0 text-xl text-slate-900 dark:text-white'>Starter CLI</h3>
845
- <p class='text-sm text-slate-600 dark:text-slate-300'>Ideal pour demarrer une app Next.js prete a deployer avec NextBlock™ deja integre.</p>
846
- </div>
847
- </div>
848
- </div>
849
-
850
- <figure class='my-12 overflow-hidden rounded-[2rem] border border-slate-200/80 bg-slate-950 shadow-2xl dark:border-white/10'>
851
- <img src='/images/included.webp' alt='Visuel NextBlock™ montrant le CMS, les blocs et les integrations qui arrivent ensemble' class='w-full h-auto object-cover' />
852
- <figcaption class='border-t border-white/10 px-6 py-4 text-sm text-slate-300'>Quel que soit le chemin choisi, vous heritez du meme editeur de blocs, du meme shell CMS et du meme langage produit.</figcaption>
853
- </figure>
854
-
855
- <h2>Chemin 1 : cloner le monorepo</h2>
856
- <p>Cette option est la meilleure si vous voulez tout le workspace Nx et chaque package interne disponible en local.</p>
857
-
858
- <div class='grid gap-6 md:grid-cols-2 my-8'>
859
- <div class='rounded-3xl border border-slate-200/80 bg-slate-50 p-6 dark:border-white/10 dark:bg-white/5'>
860
- <p class='text-xs font-semibold uppercase tracking-[0.22em] text-slate-500 dark:text-slate-400'>Vous obtenez</p>
861
- <ul class='mt-4 list-disc pl-5 space-y-2 text-sm'>
862
- <li>Le site public, l'app CMS, le code du CLI et les librairies partagees</li>
863
- <li>Un acces direct a <code>libs/</code> pour les blocs et modules personnalises</li>
864
- <li>Les outils de workspace comme <code>nx graph</code> pour visualiser les dependances</li>
865
- </ul>
866
- </div>
867
- <div class='rounded-3xl border border-slate-200/80 bg-slate-50 p-6 dark:border-white/10 dark:bg-white/5'>
868
- <p class='text-xs font-semibold uppercase tracking-[0.22em] text-slate-500 dark:text-slate-400'>Bon choix pour</p>
869
- <ul class='mt-4 list-disc pl-5 space-y-2 text-sm'>
870
- <li>Les mainteneurs et contributeurs coeur</li>
871
- <li>Les equipes qui construisent des extensions sur mesure</li>
872
- <li>Les agences qui veulent un controle complet de la plateforme</li>
873
- </ul>
874
- </div>
875
- </div>
876
-
877
- <pre><code>git clone https://github.com/nextblock-cms/nextblock.git
878
- cd nextblock
879
- npm install
880
- npm run setup</code></pre>
881
-
882
- <p>L'assistant <code>npm run setup</code> cree <code>.env.local</code>, demande vos cles Supabase, peut brancher R2 et SMTP, lie le CLI Supabase, puis pousse le schema avec <code>npm run db:push</code>.</p>
883
-
884
- <p>Puis lancez l'application :</p>
885
- <pre><code>npx nx serve nextblock</code></pre>
886
-
887
- <p>Commandes utiles dans le monorepo :</p>
888
- <pre><code># Build de tous les packages
889
- npm run all-builds
890
-
891
- # Lint de l'application principale
892
- npm run nx:lint:nextblock
893
-
894
- # Regenerer les types base de donnees
895
- npm run db:types
896
-
897
- # Inspecter les relations du workspace
898
- npx nx graph</code></pre>
899
-
900
- <h2>Chemin 2 : utiliser le starter CLI</h2>
901
- <p>Si votre but est d'aller vite, le CLI vous donne une app Next.js autonome avec NextBlock™ deja integre.</p>
902
-
903
- <pre><code>npm create nextblock@latest mon-site
904
- cd mon-site</code></pre>
905
-
906
- <p>Le CLI copie un template pret pour la production, remplace les imports workspace par les packages publies, et peut lancer la meme configuration initiale. Le resultat reste une app Next.js classique, sans dependance a Nx.</p>
907
-
908
- <p>Configurez votre environnement dans <code>.env.local</code> :</p>
909
- <pre><code>NEXT_PUBLIC_SUPABASE_URL=your-project-url
910
- NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
911
- SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
912
- NEXT_PUBLIC_URL=http://localhost:3000</code></pre>
913
-
914
- <p>Poussez le schema puis demarrez :</p>
915
- <pre><code>npm run db:push
916
- npm run dev</code></pre>
917
-
918
- <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'>
919
- <p class='text-xs font-semibold uppercase tracking-[0.22em] text-amber-700 dark:text-amber-200'>Conseil</p>
920
- <p class='mb-0 text-sm text-slate-700 dark:text-slate-200'>Le chemin CLI est le moyen le plus rapide d'evaluer NextBlock™ avec votre propre modele de contenu avant de passer, si besoin, au workspace complet.</p>
921
- </div>
922
-
923
- <h2>Activer les modules premium</h2>
924
- <p>Pour un projet genere via le CLI, le package commerce peut etre active avec une seule commande :</p>
925
- <pre><code>npx create-nextblock activate ecommerce</code></pre>
926
- <p>Cette commande injecte les wrappers pour <code>/cms/orders</code>, <code>/cms/products</code>, <code>/checkout</code> et l'API checkout, le tout protege par <code>verifyPackageOnline()</code> afin de garder les routes premium alignees avec la licence.</p>
927
-
928
- <h2>Deploiement</h2>
929
- <p>NextBlock™ se deploie comme une app Next.js standard. Publiez sur Vercel, Netlify ou tout hebergeur Node.js, puis configurez les variables serveur comme la cle service role Supabase, les cles Stripe et <code>CRON_SECRET</code>.</p>$$
930
- ), 0 FROM target_posts tp WHERE tp.slug = 'comment-configurer-nextblock'
931
-
932
- UNION ALL
933
-
934
- -- Post 3 EN: NextBlock™ Commerce Guide
935
- SELECT tp.id, tp.language_id, 'text', jsonb_build_object('html_content',
936
- $$<p class='text-lg leading-8 text-slate-700 dark:text-slate-300'>NextBlock™ Commerce is the first premium module in the ecosystem: a source-available storefront layer that plugs directly into the same editorial system as the CMS. It is built for teams that want content, catalog, and checkout to live inside one product surface instead of three disconnected tools.</p>
937
-
938
- <div class='grid gap-4 md:grid-cols-3 my-10'>
939
- <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'>
940
- <p class='text-xs font-semibold uppercase tracking-[0.22em] text-emerald-700 dark:text-emerald-200'>Commerce core</p>
941
- <h3 class='mt-3 text-xl font-semibold text-slate-900 dark:text-white'>Catalog + checkout</h3>
942
- <p class='mt-3 text-sm text-slate-600 dark:text-slate-300'>Products, variants, orders, shipping, and invoices all plug into the existing CMS shell.</p>
943
- </div>
944
- <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'>
945
- <p class='text-xs font-semibold uppercase tracking-[0.22em] text-sky-700 dark:text-sky-200'>Global selling</p>
946
- <h3 class='mt-3 text-xl font-semibold text-slate-900 dark:text-white'>Multi-currency ready</h3>
947
- <p class='mt-3 text-sm text-slate-600 dark:text-slate-300'>Automatic FX sync, rounding strategies, and per-product overrides keep international pricing practical.</p>
948
- </div>
949
- <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'>
950
- <p class='text-xs font-semibold uppercase tracking-[0.22em] text-indigo-700 dark:text-indigo-200'>Operator workflow</p>
951
- <h3 class='mt-3 text-xl font-semibold text-slate-900 dark:text-white'>Provider-aware flow</h3>
952
- <p class='mt-3 text-sm text-slate-600 dark:text-slate-300'>Stripe and Freemius are handled differently so the storefront can stay clean without hiding complexity.</p>
953
- </div>
954
- </div>
955
-
956
- <h2>Product Catalog</h2>
957
- <p>Commerce supports physical and digital products with variants, attributes, localized product media, independent pricing, SKUs, and stock levels. Product assets stay in the same media library editors already use for marketing pages, so content and commerce teams are not working in separate silos.</p>
958
-
959
- <h2>Multi-Currency Engine</h2>
960
- <p>The pricing engine is built for real-world stores, not just a demo checkout:</p>
961
- <ul>
962
- <li><strong>Unlimited currencies</strong> with ISO codes, symbols, and stored exchange rates</li>
963
- <li><strong>Automatic FX sync</strong> from Frankfurter or a custom provider via <code>FX_API_BASE_URL</code></li>
964
- <li><strong>Rounding modes</strong> including nearest, up, down, and charm pricing like <code>9.99</code></li>
965
- <li><strong>Store-managed auto-sync</strong> so product prices convert when rates refresh</li>
966
- <li><strong>Rebasing</strong> when the default currency changes</li>
967
- <li><strong>Per-product overrides</strong> when a catalog item needs explicit pricing in specific markets</li>
968
- </ul>
969
-
970
- <h2>Tax Automation</h2>
971
- <p>Teams can stay manual when they need control, or delegate tax math to Stripe Tax when they want automation:</p>
972
- <div class='grid md:grid-cols-2 gap-6 my-6'>
973
- <div class='p-6 rounded-2xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5'>
974
- <h4 class='font-bold text-slate-900 dark:text-white mb-2'>Manual mode</h4>
975
- <p class='text-sm text-slate-600 dark:text-slate-400'>Define rates by country and optional state or province. Stacked taxes such as GST + PST are supported, and tax lines are stored in <code>orders.tax_details</code>.</p>
976
- </div>
977
- <div class='p-6 rounded-2xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5'>
978
- <h4 class='font-bold text-slate-900 dark:text-white mb-2'>Automatic mode</h4>
979
- <p class='text-sm text-slate-600 dark:text-slate-400'>Stripe Tax calculates the final amounts. Product and shipping tax codes travel with the line items, and the webhook resync replaces provisional values with final totals.</p>
980
- </div>
981
- </div>
982
-
983
- <h2>Shipping and Checkout</h2>
984
- <p>Shipping zones match by country and state or province, support localized method names, per-currency pricing, free-shipping thresholds, and priority-based fallbacks when an exact match is not found.</p>
985
- <p>The checkout layer is provider-aware:</p>
986
- <ul>
987
- <li><strong>Stripe</strong> handles physical goods, inventory checks, shipping calculation, tax, customer upserts, and Checkout Sessions</li>
988
- <li><strong>Freemius</strong> handles digital licensing, plan resolution, and checkout URLs with sandbox support</li>
989
- <li>Mixed-provider carts are rejected so the buyer journey stays understandable</li>
990
- </ul>
991
-
992
- <figure class='my-12 overflow-hidden rounded-[2rem] border border-slate-200/80 bg-slate-950 shadow-2xl dark:border-white/10'>
993
- <img src='/images/commerce-plan.webp' alt='Commerce roadmap board outlining premium module goals and future storefront capabilities for NextBlock™' class='w-full h-auto object-cover' />
994
- <figcaption class='border-t border-white/10 px-6 py-4 text-sm text-slate-300'>Commerce is positioned as the first premium module in a larger roadmap, which makes it feel like part of a growing platform instead of a bolt-on add-on.</figcaption>
995
- </figure>
996
-
997
- <h2>Inventory, Orders, and Invoices</h2>
998
- <p>When quantity tracking is enabled, checkout validates requested quantities against <code>inventory_items</code>. On payment confirmation, <code>apply_order_inventory_deduction()</code> reduces stock with a resilient fallback path that can use direct SQL if the RPC layer fails.</p>
999
- <ul>
1000
- <li>Order statuses move from <code>pending</code> to <code>paid</code> to <code>shipped</code>, with cancellation and refund states available too</li>
1001
- <li>Invoice numbering is generated through database functions for consistency</li>
1002
- <li>Printable invoice documents pull from <code>invoice_settings</code></li>
1003
- <li>Customers can review order history and invoice access from the storefront side</li>
1004
- <li><strong>Coming soon:</strong> exportable order reporting and analytics dashboards</li>
1005
- </ul>
1006
-
1007
- <h2>Commerce Surfaces Inside the CMS</h2>
1008
- <p>When the ecommerce package is active, the CMS exposes product list, create, and edit views with media and variants, inventory management, order detail screens, shipping configuration, payment provider settings, tax setup, and currency management. The important part is not only that those screens exist, but that they feel native inside the same shell your content team is already using.</p>$$
1009
- ), 0 FROM target_posts tp WHERE tp.slug = 'nextblock-commerce-guide'
1010
-
1011
- UNION ALL
1012
-
1013
- -- Post 3 FR: Guide Commerce NextBlock™
1014
- SELECT tp.id, tp.language_id, 'text', jsonb_build_object('html_content',
1015
- $$<p class='text-lg leading-8 text-slate-700 dark:text-slate-300'>NextBlock™ Commerce est le premier module premium de l'ecosysteme : une couche storefront source-available qui se branche directement sur le meme systeme editorial que le CMS. L'objectif est de rapprocher contenu, catalogue et checkout dans une seule surface produit.</p>
1016
-
1017
- <div class='grid gap-4 md:grid-cols-3 my-10'>
1018
- <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'>
1019
- <p class='text-xs font-semibold uppercase tracking-[0.22em] text-emerald-700 dark:text-emerald-200'>Base commerce</p>
1020
- <h3 class='mt-3 text-xl font-semibold text-slate-900 dark:text-white'>Catalogue + checkout</h3>
1021
- <p class='mt-3 text-sm text-slate-600 dark:text-slate-300'>Produits, variantes, commandes, livraison et factures vivent dans le meme shell CMS.</p>
1022
- </div>
1023
- <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'>
1024
- <p class='text-xs font-semibold uppercase tracking-[0.22em] text-sky-700 dark:text-sky-200'>Vente globale</p>
1025
- <h3 class='mt-3 text-xl font-semibold text-slate-900 dark:text-white'>Multi-devise</h3>
1026
- <p class='mt-3 text-sm text-slate-600 dark:text-slate-300'>Sync FX automatique, strategies d'arrondi et overrides par produit rendent les prix internationaux realistes.</p>
1027
- </div>
1028
- <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'>
1029
- <p class='text-xs font-semibold uppercase tracking-[0.22em] text-indigo-700 dark:text-indigo-200'>Workflow operateur</p>
1030
- <h3 class='mt-3 text-xl font-semibold text-slate-900 dark:text-white'>Par fournisseur</h3>
1031
- <p class='mt-3 text-sm text-slate-600 dark:text-slate-300'>Stripe et Freemius sont traites differemment pour garder un parcours d'achat propre sans cacher la complexite.</p>
1032
- </div>
1033
- </div>
1034
-
1035
- <h2>Catalogue produits</h2>
1036
- <p>Le module gere produits physiques et numeriques avec variantes, attributs, medias localises, prix independants, SKU et niveaux de stock. Les assets produits restent dans la meme bibliotheque media que les pages marketing, ce qui evite de separer equipes contenu et equipes commerce.</p>
1037
-
1038
- <h2>Moteur multi-devise</h2>
1039
- <p>Le moteur tarifaire vise un vrai usage boutique, pas seulement une demo :</p>
1040
- <ul>
1041
- <li><strong>Devises illimitees</strong> avec codes ISO, symboles et taux stockes</li>
1042
- <li><strong>Synchronisation FX automatique</strong> depuis Frankfurter ou un provider custom via <code>FX_API_BASE_URL</code></li>
1043
- <li><strong>Modes d'arrondi</strong> dont nearest, up, down et prix charme comme <code>9.99</code></li>
1044
- <li><strong>Auto-sync magasin</strong> pour convertir les prix quand les taux changent</li>
1045
- <li><strong>Rebasement</strong> lorsqu'on change la devise par defaut</li>
1046
- <li><strong>Overrides par produit</strong> quand un article demande un prix fixe sur certains marches</li>
1047
- </ul>
1048
-
1049
- <h2>Taxes automatiques</h2>
1050
- <p>Les equipes peuvent rester en mode manuel ou confier le calcul a Stripe Tax :</p>
1051
- <div class='grid md:grid-cols-2 gap-6 my-6'>
1052
- <div class='p-6 rounded-2xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5'>
1053
- <h4 class='font-bold text-slate-900 dark:text-white mb-2'>Mode manuel</h4>
1054
- <p class='text-sm text-slate-600 dark:text-slate-400'>Definition des taux par pays et eventuellement par province. Les taxes empilees comme TPS + TVQ sont supportees, avec stockage dans <code>orders.tax_details</code>.</p>
1055
- </div>
1056
- <div class='p-6 rounded-2xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-white/5'>
1057
- <h4 class='font-bold text-slate-900 dark:text-white mb-2'>Mode automatique</h4>
1058
- <p class='text-sm text-slate-600 dark:text-slate-400'>Stripe Tax calcule les montants finaux. Les codes fiscaux voyagent avec les line items et le webhook remplace les valeurs provisoires par les montants definitifs.</p>
1059
- </div>
1060
- </div>
1061
-
1062
- <h2>Livraison et checkout</h2>
1063
- <p>Les zones de livraison correspondent par pays et etat ou province, gerent des noms localises, des prix par devise, des seuils de livraison gratuite, et des fallbacks par priorite quand aucune correspondance exacte n'est trouvee.</p>
1064
- <p>Le checkout est conscient du fournisseur :</p>
1065
- <ul>
1066
- <li><strong>Stripe</strong> gere les biens physiques, les verifications d'inventaire, la livraison, les taxes, les clients et les Checkout Sessions</li>
1067
- <li><strong>Freemius</strong> gere les licences numeriques, la resolution des plans et les URLs de checkout avec support sandbox</li>
1068
- <li>Les paniers melangeant plusieurs fournisseurs sont refuses pour garder un parcours plus clair</li>
1069
- </ul>
1070
-
1071
- <figure class='my-12 overflow-hidden rounded-[2rem] border border-slate-200/80 bg-slate-950 shadow-2xl dark:border-white/10'>
1072
- <img src='/images/commerce-plan.webp' alt='Tableau de roadmap commerce montrant les objectifs premium et les futures capacites storefront de NextBlock™' class='w-full h-auto object-cover' />
1073
- <figcaption class='border-t border-white/10 px-6 py-4 text-sm text-slate-300'>Le commerce est presente comme le premier module premium d'une feuille de route plus large, ce qui renforce l'idee d'une vraie plateforme en croissance.</figcaption>
1074
- </figure>
1075
-
1076
- <h2>Inventaire, commandes et factures</h2>
1077
- <p>Quand le suivi des quantites est actif, le checkout valide les demandes contre <code>inventory_items</code>. A la confirmation du paiement, <code>apply_order_inventory_deduction()</code> retire le stock avec un chemin de repli resilient si la couche RPC echoue.</p>
1078
- <ul>
1079
- <li>Les statuts de commande passent de <code>pending</code> a <code>paid</code> puis <code>shipped</code>, avec annulation et remboursement si besoin</li>
1080
- <li>La numerotation des factures est geree par des fonctions SQL pour rester coherente</li>
1081
- <li>Les documents facture tirent leurs informations de <code>invoice_settings</code></li>
1082
- <li>Les clients peuvent consulter leur historique et leurs factures</li>
1083
- <li><strong>Bientot :</strong> exports de commandes et tableaux de bord analytiques</li>
1084
- </ul>
1085
-
1086
- <h2>Surfaces commerce dans le CMS</h2>
1087
- <p>Quand le package ecommerce est actif, le CMS expose les vues produit, edition avec medias et variantes, gestion d'inventaire, detail des commandes, configuration livraison, parametres de paiement, taxes et devises. L'enjeu principal est que tout cela paraisse natif dans le meme shell que l'equipe contenu utilise deja.</p>$$
1088
- ), 0 FROM target_posts tp WHERE tp.slug = 'guide-commerce-nextblock';