design.sparkpost.com is SparkPost's internal design documentation website
The site is built using Next.js and Sanity.io
- Install the Sanity CLI globally by running
npm install -g @sanity/cli cd studioand runsanity installin the/studiodirectory
npm installin the project root directory- Install husky
npm run husky:install - Create a .env.local file containing the following:
NEXT_PUBLIC_SANITY_PROJECT_ID=w7rshig9
NEXT_PUBLIC_SANITY_DATASET=production
SANITY_API_TOKEN=<API_TOKEN> // Request this from a User Experience Engineer
NEXT_PUBLIC_SANITY_PREVIEW_SECRET=MATCHBOX
Run npm start from the root directory
- Sanity studio will be running at
localhost:3333 - The Nextjs app will be running at
localhost:3000- If you want to change the ports either app run on you will have to update the CORS Origins in the studio settings (manage.sanity.io)
- Settings -> API -> CORS Origins
- You will need to ask a User Experience Engineer for access if you do not already have it
- If you want to change the ports either app run on you will have to update the CORS Origins in the studio settings (manage.sanity.io)