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

SiteEngine

A fully-featured starter template made with Next.js, Sanity, TypeScript, Tailwind & more.

By James Rea


README

SiteEngine - Next.js & Sanity Template.

A fully-featured starter template made with Next.js, Sanity, TypeScript, Tailwind & more.

Tech Stack

Key Features

  • Page Builder with 12 pre-made blocks to get you started.
  • Visual Editing, Live Preview and Live Content API integrations.
  • Form Builder to create custom forms without leaving the Studio.
  • Robust website settings implementation.
  • Custom input components for an enchanced content editing experience.
  • Fully-featured blog with table of contents generation, custom portable text blocks, search functionality and more.

Getting Started

1. Create a Sanity Project

  • Create a new Sanity Project.
  • Add CORS origin for http://localhost:3000.
  • Create an API token with viewer permissions.

2. Install the template

  • Clone this repository and open it your code editor.
  • Create a .env.local file and add the following environment variables:
Environment VariableDescription
NEXT_PUBLIC_SITE_URLThe public URL of your website (use http://localhost:3000 during development)
NEXT_PUBLIC_SITE_NAMEThe name of your website
NEXT_PUBLIC_SANITY_DATASETThe name of your Sanity dataset (usually "production")
NEXT_PUBLIC_SANITY_PROJECT_IDYour Sanity project ID found in project settings
NEXT_PUBLIC_SANITY_API_VERSIONThe Sanity API version to use (e.g., "2023-05-03")
RESEND_SENDER_EMAILThe email address used to send emails via Resend
RESEND_RECIEVER_EMAILThe email address that receives contact form submissions
RESEND_API_KEYYour Resend API key for email functionality
SANITY_API_READ_TOKENAPI token for accessing Sanity content

Next, run these commands in your terminal at the root of your project:

CommandAction
npm install --legacy-peer-depsInstalls dependencies.
npx sanity dataset import demo-content.tar.gz productionImports demo content (optional).

3. Start a local server

CommandAction
npm run devStarts local dev server at http://localhost:3000

Author

James Rea