Commit graph

12 commits

Author SHA1 Message Date
Vadym Samoilenko
7223200d42 feat(cms): add @payloadcms/plugin-form-builder 2026-05-18 11:48:04 +01:00
Vadym Samoilenko
bf084e37c9 feat(cms): add redirects plugin + middleware for 301/302 handling
Install @payloadcms/plugin-redirects, configure for 'pages' collection
with 301/302 types. Create src/middleware.ts that reads the redirects
collection via REST API (cached 5 min) and applies them before Next.js
renders — editors can manage redirects from the CMS admin.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 16:56:30 +01:00
Vadym Samoilenko
f808ad6b42 feat(cms): add Live Preview RefreshRouteOnSave to key pages
Install @payloadcms/live-preview-react and add RefreshRouteOnSave
component to home, lokatsii/[slug], dni-narodzhennia, grupovi-vidviduvannia,
kvytky — Payload Admin live preview now triggers client router.refresh().

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 16:55:41 +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
2ec8393de9 feat(cms): full CMS control — remove hardcoded content, add globals and SEO meta
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
- New BirthdayPage global: hero, form titles, meta SEO for /dni-narodzhennia
- New TicketsPage global: hero, section titles, meta SEO for /kvytky
- SiteSettings: add tariffCategoryLabels array (key→label mapping for ezy API categories)
- DyvoLisPage + GroupVisitsPage: add metaTitle/metaDescription + revalidate hook
- /kvytky: fetch birthday packages from CMS, groups from CMS, category labels from SiteSettings
- /grupovi-vidviduvannia: remove DEFAULT_GROUPS fallback, CMS-driven meta
- /dni-narodzhennia: connect to BirthdayPage global (hero, form titles, meta)
- /lokatsii/dyvolis: use CMS meta description from DyvoLisPage global
- pnpm override tsx→4.22.0 for Node.js v26 compatibility

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 13:55:28 +01:00
Vadym Samoilenko
d5977e3215 feat(cms): add email-resend adapter, add defaultValues to checkout/thank-you globals
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
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 18:23:25 +01:00
Vadym Samoilenko
d0434dda9b feat(cms): upgrade Payload 3.33→3.84, add SEO plugin, connect hardcoded pages to CMS
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
- Upgrade payload + all @payloadcms/* packages to 3.84.1
- Update minor/patch deps: drizzle-kit, tailwind-merge, vitest, playwright, etc.
- Fix eslint config: remove duplicate @typescript-eslint plugin registration
- Add @payloadcms/plugin-seo for pages, blog-posts, locations collections
- Remove manual meta fields from Pages (replaced by SEO plugin)
- Add DyvoLisPage global: hero, gallery quote, working hours, whyVisit items
- Add GroupVisitsPage global: hero, form texts, group types with discounts
- Connect /dni-narodzhennia to birthday-packages collection (was hardcoded)
- Connect /lokatsii/dyvolis to dyvolis-page global (was hardcoded)
- Connect /grupovi-vidviduvannia to group-visits-page global (was hardcoded)
- Remove STATIC_LOCATIONS fallback from /lokatsii (use DB or empty state)
- Refactor DyvoLisHero/Gallery/WhyVisit/Tickets to accept CMS props w/ fallbacks

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 16:36:18 +01:00
Vadym Samoilenko
96dc23b74b perf: compress images to WebP (-97%) and fix slider/performance issues
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
- Convert all 40+ public/images/figma assets from raw PNG/JPG to WebP at
  max 1920px, 82% quality: 397 MB → 13 MB total (96.7% reduction)
- Update all component image references to .webp
- Add 1-year Cache-Control headers for /images/* and /_next/static/*
- Fix GallerySlider initial scroll offset (first card no longer clipped by mask)
- Fix arrow2.svg missing explicit width/height (Lighthouse unsized-images)
- Hero, LocationsSlider: aspect-ratio height + seamless infinite loop (prior session)
- Add drizzle-kit to dependencies for production schema push (prior session)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 22:49:46 +01:00
Vadym Samoilenko
86debfcdb1 fix: resolve admin crash, Hero data-driven, TS errors, lint script
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
- (payload)/layout.tsx: add RootLayout + handleServerFunctions to fix
  Payload CMS admin 500 (PageConfigProvider missing outer ConfigProvider)
- Hero.tsx: make fully data-driven (null guard, dynamic title/subtitle/cta,
  backgroundImage/backgroundVideo support, javascript: href sanitization)
- Hero.test.tsx: use getAllByText for dual-layout subtitle assertions
- BtnPrimary.figma.ts, NavLink.figma.ts: fix TS2339 (TextHandle|ErrorHandle)
- package.json: replace next lint with eslint src/ (next lint removed in v16),
  add --webpack flag to dev script to avoid Turbopack instability

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 17:27:10 +01:00
Vadym Samoilenko
cca4ea1d55 feat: implement full frontend — all sections, components, Figma Code Connect
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
- All 8 home page sections: Hero, Locations slider, WhyParents accordion,
  Birthday pricing cards, Video, Gallery, Reviews slider, News
- UI components: NavLink, BtnPrimary, BtnGradient, BtnDetails, AccordionItem
- Layout: sticky Header (NavLink + BtnPrimary), Footer with logo
- Figma Code Connect: 5 components published (.figma.tsx + figma.config.json)
- Public assets: all Figma images and SVGs exported
- Pages: /kvytky, /lokatsii, /blog, /dni-narodzhennia, /grupovi-vidviduvannia
- Tests: Vitest unit/api suites, Playwright e2e screenshots
- Payload CMS: blocks, collections, seed data updates
- Hero negative-margin to extend behind sticky header
- Custom Tailwind breakpoints: lg=1440px, xl=1920px
- Fix ESLint config: drop FlatCompat, use eslint-config-next flat export
- Add tsconfig.tsbuildinfo, test-results/, agentdb.rvf* to .gitignore

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 16:40:56 +01:00
Vadym Samoilenko
e2e9ce1591 fix: add missing @tailwindcss/postcss dependency (required for Tailwind v4)
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
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 20:17:38 +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