Skip to content

(SP: 1) [Frontend] Remove Sanity CMS dependencies and delete dead code #389

@LesiaUKR

Description

@LesiaUKR

Goal

Eliminate all Sanity dependencies from the codebase. Stop Sanity billing. Clean up dead code.

Scope

Prerequisites: Issues #386, #387, #388 must be merged and verified on production.

Steps:

  1. Remove from frontend/package.json:

    • @sanity/client
    • @sanity/image-url
    • groq
  2. Delete frontend/client.ts (Sanity client singleton)

  3. Remove Sanity env vars from all environments (Vercel, local .env):

    • NEXT_PUBLIC_SANITY_PROJECT_ID (if set)
    • SANITY_DATASET
    • GROQ_API_KEY
  4. Keep studio/ directory frozen — do not delete. Sanity free plan keeps data accessible as read-only archive indefinitely. Do not pay for or deploy Sanity Studio.

  5. npm run lint — confirm zero import errors

  6. npm run build — confirm clean build, no references to removed packages

Verification:

  • npm run build completes with no errors
  • No occurrences of @sanity/client, sanity, groq in frontend/ (run grep)
  • Sanity subscription cancelled/downgraded to free

Expected impact

Sanity billing eliminated. Codebase has zero Sanity dependencies.

Out of scope

  • Deleting the Sanity project data (keep as archive)
  • Deleting the studio/ directory (keep frozen)

Metadata

Metadata

Assignees

Labels

refactorCode restructuring without functional changes

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions