huntercaron / sunnyside-next

A minimal & somewhat opinionated Next & Sanity boilerplate.

Home Page:https://sunnyside.cool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sunnyside [in-Progress]

A minimal & somewhat opinionated Next & Sanity boilerplate.

Basic setup of Next.js with Sanity.

todo:

  • simple CLI for setup (prompt for URL & tokens) probably use Ink?
  • add deploy to vercel button
  • figure out better place to put built cms
  • add (optional) realtime data subscriptions to preview mode
  • setup preview mode

Getting Started [rough]

There are a few steps needed to hook up the CMS

  • (Sanity Dashboard) Add CORS origin for your local url and your prod URL
  • (Sanity Dashboard) Create api keys for local env
  • (Local) duplicate .env.example files in cms & site and fill them in. Remove the 'example' part of the file names.
  • (Hosting & Sanity Dashboards) Add a webhook to your hosting env to the sanity dashboard

Hosting:

  • there are two things to host, the CMS and the site itself
  • you can use vercel with minimal setup, just add two repos with their monorepo support
  • with netlify also use their monorepo flows, but also use https://github.com/netlify/next-on-netlify

Using it locally

First, run the development server:

yarn dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.js. The page auto-updates as you edit the file.

To run Sanity Studio locally:

yarn cms:dev

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

https://vercel.com/guides/deploying-sanity-studio-with-vercel

About

A minimal & somewhat opinionated Next & Sanity boilerplate.

https://sunnyside.cool


Languages

Language:TypeScript 48.9%Language:JavaScript 40.2%Language:CSS 10.9%