This starter uses SvelteKit for the frontend and Sanity to handle its content.
Note
This starter features an
/appand a/studiofolder. The/appfolder contains the frontend code, and the/studiofolder contains the Sanity Studio code.It is configured as a monorepo using pnpm workspaces, but you can treat these directories as separate projects if you prefer.
Run the following commands to prepare both applications, each step should be executed from the root directory:
pnpm install
.env file.cd studio && pnpm sanity init --env .env
pnpm sanity manage
.env file and populate it with the required values.cp ./app/.env.example ./app/.env
pnpm dev
Post documentThe schema for the Post document is defined in the /studio/schemas folder. You can add more documents and schemas to the Studio to suit your needs.
The /app and /studio folders are meant to be deployed separately.
Make sure that after /app is deployed the .env file in /studio is updated with its deployment URL under SANITY_STUDIO_PREVIEW_URL.
And /app has a .env file with PUBLIC_SANITY_STUDIO_URL that points to the Studio's deployment URL.