Joint session with Vercel: How to build intelligent storefronts (May 15th)

Sanity's Internal Tech Stack: GROQ Language, Datastore, and Infrastructure

8 repliesLast updated: Nov 29, 2025

I wonder if any Sanity insiders would share some description of their internal tech stack. What language is the GROQ DSL written in, and what were the influences / design decisions in developing it? Are the datastores document db's, or using JSON fields in PostgreSQL? Is the infrastructure on a cloud provider? And anything been written comparing Sanity to Prisma Server and Hasura?
AI Update

Great question! While Sanity doesn't publish exhaustive details about every internal implementation choice, there's actually some solid information available about their tech stack from a community discussion thread and a blog post about open sourcing GROQ.

Tech Stack Overview

Query Engine & Language:

Data Storage:

Infrastructure:

The GROQ specification was open-sourced in 2019, and there's also a CLI tool you can use to experiment with GROQ queries against JSON data.

GROQ Design Influences

GROQ was designed specifically for querying JSON documents with a focus on:

The precursor to Sanity was a project called Pebbles, which influenced some of the design decisions.

Sanity vs Prisma/Hasura

Regarding comparisons to Prisma Server and Hasura - I couldn't find official comparison content from Sanity on this. However, the key architectural difference is:

Sanity is purpose-built for content operations, whereas Hasura/Prisma are more general-purpose database API layers. They solve different problems - Sanity competes more directly with headless CMS platforms like Contentful or Strapi, while Hasura/Prisma are tools for building APIs on top of your own database.

The choice between them really depends on whether you need a managed content platform (Sanity) or want to build your own data layer with GraphQL tooling (Hasura/Prisma).

Show original thread
8 replies

Was this answer helpful?

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Related contributions