- Run
yarn
oryarn i
to install all packages. - Update the necessary env variables, as follows:
NEXT_PUBLIC_SANITY_PROJECT_ID=ID_GOES_HERE
NEXT_PUBLIC_SANITY_DATASET="production"
NEXT_PUBLIC_SANITY_API_VERSION="2024-04-03"
- Run
yarn dev
to start the local environment.
Sanity Studio is embedded into the app. To run it, just navigate to /studio
.
Types should be manually autogenerated after the app's GROQ queries. In order to autogenerate, run: yarn schema
and once it's done, run yarn typegen
. This will update the sanity.types.ts file, making the types available to export when needed.