This repository contains the source code for a CLI tool designed to scaffold a Next.js application integrated with Sanity.io. It automates the setup of a new project, including downloading necessary files, setting up Sanity configurations, and initializing a git repository.
- Downloads and sets up a Next.js project from a predefined template.
- Configures Sanity project settings automatically.
- Initializes a git repository for version control.
- Provides commands for development and production environments.
- Mono repo structure with Next.js and Sanity CMS packages
- Automated setup using a CLI tool
- Preconfigured for preview mode and other useful development features Optimized for developer productivity
This package is intended to be used as a global CLI tool. You can run it using npx:
npx create-roboto-next-sanity@latest
This package is intended to be used as a global CLI tool. You can run it using npx:
npx create-roboto-next-sanity@latest PROJECT_NAME
- Follow the prompts to configure your project.
- Once setup is complete, navigate to the project directory:
cd PROJECT_NAME
npm install
npm run dev
Open your browser and navigate to http://localhost:3000 to view the application running Next js and localhost:3333 to view the sanity studio.
The CLI tool generates a mono repo with the following structure:
- web: A Next.js application
- studio: A Sanity CMS instance
The web
package is configured to source content from the studio
package.
For further information on Next.js and Sanity CMS, refer to the following resources:
- Next.js Documentation - Learn about Next.js features and API.
- Sanity CMS Documentation - Discover features and APIs of Sanity CMS.
To deploy your Next.js application effortlessly, consider using the Vercel Platform. For more details on deployment, visit the Next.js deployment documentation.