devlovers.net icon indicating copy to clipboard operation
devlovers.net copied to clipboard

[Frontend] Track Sanity → PostgreSQL migration completion and blockers

Open KlementMultiverse opened this issue 8 months ago • 1 comments

Context

The project is actively migrating from Sanity CMS to PostgreSQL for blog content. Issues #386–#389 outline the work: query layer swap, admin CRUD, dependency removal, and cleanup. However, there's no single issue tracking overall migration status, blocked tasks, or integration gaps between completed work and remaining pieces.

Problem

Without a migration tracker, contributors can't easily answer:

  • Which pieces depend on Sanity still?
  • What's blocking the full switch in frontend/app/api routes?
  • Are there orphaned Sanity queries in frontend/db/queries that broke when the schema changed?
  • Does the frontend/i18n layer work with PostgreSQL blog content the same way it worked with Sanity?

Right now, merging #386 (Drizzle swap), #387 (Posts CRUD), #388 (Authors/Categories), and #389 (cleanup) happens in isolation. We need visibility into what those merges leave broken.

What Good Looks Like

A single tracking issue that:

  1. Maps dependencies — Which API routes in frontend/app/api still read from Sanity? Which are already on PostgreSQL?
  2. Lists integration gaps — Does next-intl handle PostgreSQL content slugs the same way? Do translation keys in frontend/messages/ align with DB content?
  3. Calls out test coverage — Are there integration tests in vitest that verify the full blog flow (fetch posts → render → filter by language)?
  4. Defines "done" — When can we close this and confidently say Sanity is gone from the codebase?

Suggested Approach

Create a tracking issue with a checklist linking to #386–#389 plus new subtasks:

  • [ ] #386 merged and API routes updated
  • [ ] #387 CRUD endpoints tested end-to-end
  • [ ] #388 Authors/Categories replicate Sanity schema behavior
  • [ ] #389 completed and all frontend/lib imports of Sanity removed
  • [ ] Integration test: fetch blog posts, verify language routing works
  • [ ] Performance test: PostgreSQL + Upstash Redis caching vs. old Sanity setup
  • [ ] Staging deployment confirms no broken links

This becomes the single source of truth for "is the migration done?" and prevents silos where one PR breaks another.


Contributed by Klement Gunndu

KlementMultiverse avatar Mar 08 '26 09:03 KlementMultiverse

Withdrawing this issue. Apologies for any inconvenience.

KlementMultiverse avatar Mar 09 '26 02:03 KlementMultiverse