Conversation
… migration (#390) * fix(blog): resolve 500 error on blog post pages * fix(blog): remove unsafe GROQ coalesce fallbacks and revert CDN * feat(blog): add DB schema indexes + Sanity => PostgreSQL migration script - Add FK indexes on blog_posts.author_id and blog_post_categories.category_id - Add one-time migration script: fetches Sanity data via REST API, re-uploads images to Cloudinary, converts Portable Text → Tiptap JSON, inserts into 7 blog tables (4 categories, 3 authors, 21 posts) - Drizzle migration 0028 for index changes Closes #384, #385
… to PostgreSQL (#391) * fix(blog): resolve 500 error on blog post pages * fix(blog): remove unsafe GROQ coalesce fallbacks and revert CDN * feat(blog): add DB schema indexes + Sanity => PostgreSQL migration script - Add FK indexes on blog_posts.author_id and blog_post_categories.category_id - Add one-time migration script: fetches Sanity data via REST API, re-uploads images to Cloudinary, converts Portable Text → Tiptap JSON, inserts into 7 blog tables (4 categories, 3 authors, 21 posts) - Drizzle migration 0028 for index changes Closes #384, #385 * feat(blog): replace Sanity CMS with Drizzle query layer for all blog routes Swap every blog page, API route, and header component from Sanity GROQ queries to Drizzle ORM against PostgreSQL. Adds Tiptap JSON renderer, shared text extraction, and typed query layer for posts/authors/categories. Fixes runtime crash where /api/blog-author returned Portable Text bio objects that React tried to render as children. * fix: resolve eslint formatting issues * fix(blog): enable proper Next image optimization and harden blog category handling
…omain association placeholder
… lock lite status contract
…s pending unknown
…e; harden sync payload encoding
…ility, and stabilize tests
… and Nova Poshta flows
…rd toast messages
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR performs a comprehensive migration of blog content from Sanity CMS to PostgreSQL using Drizzle ORM, introduces Monobank Google Pay payment integration with wallet submission and return flows, enhances payment method handling across checkout, and updates localization strings. Additionally, it refactors Nova Poshta warehouse queries from settlement to city references and updates numerous UI components to consume the new data sources. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CartPage as CartPageClient
participant ConfigAPI as /google-pay/config
participant SubmitAPI as /google-pay/submit
participant MonobankPSP as Monobank PSP
participant DB as Database
User->>CartPage: Click "Pay with Google Pay"
CartPage->>ConfigAPI: GET config (orderId)
ConfigAPI->>DB: Fetch order, validate
ConfigAPI-->>CartPage: paymentDataRequest + hints
CartPage->>CartPage: Load Google Pay SDK
CartPage->>User: Render Google Pay button
User->>CartPage: Click Google Pay button
CartPage->>CartPage: Show Google Pay sheet
User->>CartPage: Confirm payment (gToken)
CartPage->>SubmitAPI: POST gToken (idempotencyKey)
SubmitAPI->>DB: Read order, check idempotency
SubmitAPI->>MonobankPSP: Submit wallet payment
MonobankPSP-->>SubmitAPI: invoiceId, redirectUrl
SubmitAPI->>DB: Persist attempt as submitted
SubmitAPI-->>CartPage: redirectUrl
CartPage->>CartPage: Redirect to return page
sequenceDiagram
participant Browser as Browser/App
participant ReturnPage as MonobankReturnPage
participant StatusComponent as MonobankReturnStatus
participant StatusAPI as /api/orders/[id]/status
participant DB as Database
participant SuccessPage as Checkout Success
Browser->>ReturnPage: Navigate with orderId + statusToken
ReturnPage->>StatusComponent: Render with orderId, statusToken
StatusComponent->>StatusAPI: Fetch order status (statusToken)
StatusAPI->>DB: Query order, validate token
StatusAPI-->>StatusComponent: LiteOrderStatus
alt Payment Paid
StatusComponent->>SuccessPage: Navigate to success
else Payment Pending/Unknown
StatusComponent->>StatusComponent: Poll interval 2.5s
loop Until Terminal Status
StatusComponent->>StatusAPI: Fetch status again
StatusAPI-->>StatusComponent: Updated status
end
else Non-Paid Terminal
StatusComponent->>Browser: Navigate to error page
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ Finishing Touches
🧪 Generate unit tests (beta)
|
Summary by CodeRabbit
Release Notes v1.0.7
New Features
Bug Fixes
Improvements