Commit graph

9 commits

Author SHA1 Message Date
Vadym Samoilenko
0925ab2052 fix(migration): make 20260518_115657 idempotent — recreate missing group_visits_page and birthday_page tables
Tables group_visits_page, birthday_page and their _v counterparts were missing from the DB
despite prior migrations being marked applied. The updated migration uses CREATE TABLE IF NOT EXISTS,
DO/EXCEPTION blocks for enum types and FK constraints, and ADD COLUMN IF NOT EXISTS to recover
the full schema before adding form_id relationship columns.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 12:03:36 +01:00
Vadym Samoilenko
ff4ae6934c feat(cms): add form relationship field to GroupVisitsPage and BirthdayPage 2026-05-18 11:58:21 +01:00
Vadym Samoilenko
5e998daa8d chore(migrations): add form_builder tables
Creates forms, form_submissions and all related block tables for the @payloadcms/plugin-form-builder integration.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 11:55:38 +01:00
Vadym Samoilenko
5374105e06 feat(seed): DyvoLis location record — enables /lokatsii/dyvolis
Some checks failed
CI / Type Check (push) Has been cancelled
CI / Lint (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
Deploy / Build & Push Image (push) Has been cancelled
Deploy / Deploy to VPS (push) Has been cancelled
Inserts the ДивоЛіс location into locations table with showDetailPage=true
plus heroTips and whyVisitItems child records. Idempotent (ON CONFLICT/DELETE+INSERT).
Run by the psql migrator on next deploy.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 19:10:29 +01:00
Vadym Samoilenko
d1268c47a8 feat(deploy): SQL delta migration + NEXT_PUBLIC_SITE_URL build arg
Some checks are pending
CI / Type Check (push) Waiting to run
CI / Lint (push) Waiting to run
CI / Unit Tests (push) Waiting to run
Deploy / Build & Push Image (push) Waiting to run
Deploy / Deploy to VPS (push) Blocked by required conditions
- migrations/0002_delta.sql: idempotent SQL extracted from 20260515_162527.ts
  (redirects table, locations detail fields, globals versioning, new pages)
  so the psql migrator container applies it on next deploy
- Dockerfile: ARG/ENV NEXT_PUBLIC_SITE_URL in builder stage so the URL is
  baked into the Next.js bundle (fixes postMessage origin warning in admin)
- docker-compose.prod.yml: pass build arg NEXT_PUBLIC_SITE_URL=https://shumi.ai-impress.com

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 18:56:56 +01:00
Vadym Samoilenko
83c4f7973a feat(migrations): delta migration — versions, redirects, new globals, locations fields
Some checks are pending
CI / Type Check (push) Waiting to run
CI / Lint (push) Waiting to run
CI / Unit Tests (push) Waiting to run
Deploy / Build & Push Image (push) Waiting to run
Deploy / Deploy to VPS (push) Blocked by required conditions
Auto-generated by Payload CLI (pnpm migrate:create) against prod DB.
Adds: locations_hero_tips/why_visit_items/review_videos tables, versions
for 6 globals (home, group_visits, birthday, tickets, locations_page,
blog_index), redirects collection, birthday_page + tickets_page tables,
meta columns on all globals, show_detail_page + rich fields on locations.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 17:32:31 +01:00
Vadym Samoilenko
efeeeca8f5 feat(cms): unify SEO via plugin for all globals + fix migrate CLI
- seoPlugin extended to cover 7 globals (home, dyvolis, group-visits,
  birthday, tickets, checkout, thank-you) with tabbedUI, generateURL,
  generateTitle from heroTitle, generateDescription from heroSubtitle
- Remove manual metaTitle/metaDescription fields from 4 globals
  (BirthdayPage, GroupVisitsPage, TicketsPage, DyvoLisPage)
- Update 5 page files to read meta?.title/description from seoPlugin
- blog/[slug] now uses post.meta?.title from plugin instead of raw title
- pnpm migrate/migrate:create/migrate:status scripts fixed with
  NODE_OPTIONS='--import tsx' (resolves Node.js v26 + tsx incompatibility)
- Initial full-schema migration 20260515_153940.ts created as baseline

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 16:43:36 +01:00
Vadym Samoilenko
ab19c57d09 fix: EZY params nullish + DB migration for new collections
Some checks are pending
CI / Type Check (push) Waiting to run
CI / Lint (push) Waiting to run
CI / Unit Tests (push) Waiting to run
Deploy / Build & Push Image (push) Waiting to run
Deploy / Deploy to VPS (push) Blocked by required conditions
- Fix ZodError: EZY API returns params=null, use .nullish() instead of .optional()
- Add manual SQL migration for new collections (locations, reviews,
  birthday_packages) and schema changes (header ctaLabel/ctaHref,
  navLinks autoChildrenFrom/children, homepage sectionTitles/whyParents/
  gallery/video/birthdayIntro groups)
- Note: push:true doesn't run CLI drizzle-kit in standalone build;
  run migrations/0001_new_collections.sql manually on new environments

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 23:08:15 +01:00
Vadym Samoilenko
9b41fa447a feat: complete backend B1-B7 — Payload CMS, ezy payments, leads, deploy
Some checks are pending
CI / Type Check (push) Waiting to run
CI / Lint (push) Waiting to run
CI / Unit Tests (push) Waiting to run
Deploy / Build & Push Image (push) Waiting to run
Deploy / Deploy to VPS (push) Blocked by required conditions
- B1: Next.js 15 + Payload CMS 3.0 + Postgres 16, ESLint, Prettier, Husky, Vitest
- B2: 9 collections, 6 globals, 12 Page Builder blocks, access control, slugify/revalidate hooks
- B3: ezy.com.ua payments, Binotel HMAC webhook, leads API, Telegram bot, Resend email, rate limiting
- B4: Tariffs collection with ezy API sync (cron + manual), dynamic pricing source-of-truth
- B5: 13 test files covering unit libs and all API routes
- B6: Dockerfile multi-stage, docker-compose.prod.yml, nginx.conf SSL, GitHub Actions CI/CD, health endpoint
- B7: docs/admin-guide-ua.md (marketer guide), docs/deploy.md (VPS instructions), README quickstart

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 19:14:54 +01:00