A modern Next.js website with an integrated Sanity Studio for managing content for your open source project.
- 🎨 Flexible Page Builder - Create pages with modular sections
- 📝 Rich Content Editing - Sanity Studio embedded at
/studio - 🚀 Modern Stack - Next.js 15 with App Router, TypeScript, Tailwind CSS
- 🎯 Reusable Components - Hero, Features, Downloads, and Content sections
- 💾 Type-Safe - Full TypeScript support throughout
- 🎭 Beautiful UI - Built with shadcn/ui components
- Node.js 18+ installed
- A Sanity account (free tier available)
- Clone this repository
- Install dependencies:
npm install- Set up environment variables:
The .env.local file should already contain:
NEXT_PUBLIC_SANITY_PROJECT_ID=sv33tywo
NEXT_PUBLIC_SANITY_DATASET=production
NEXT_PUBLIC_SANITY_API_VERSION=2024-01-01
Run the development server:
npm run devOpen http://localhost:3000 to see your site.
Access Sanity Studio at http://localhost:3000/studio
- Go to http://localhost:3000/studio
- Click on "Page" in the sidebar
- Click "Create new document"
- Set the slug to
/for the homepage - Add sections to build your page:
- Hero Section - Main banner with heading, image, and CTA buttons
- Features Section - Showcase key features with icons and descriptions
- Download Section - OS-specific download links for your releases
- Content Block - Rich text content with images
- In Sanity Studio, click on "Site Settings"
- Add your project title, description, GitHub URL, and social links
- Upload a logo if desired
├── app/
│ ├── layout.tsx # Root layout with metadata
│ ├── page.tsx # Homepage (fetches Sanity content)
│ └── studio/ # Sanity Studio route
├── components/
│ ├── sections/ # Section components (Hero, Features, etc.)
│ ├── ui/ # shadcn/ui components
│ └── portable-text.tsx # Rich text renderer
├── lib/
│ ├── sanity.client.ts # Sanity client configuration
│ ├── sanity.image.ts # Image URL builder
│ ├── sanity.queries.ts # GROQ queries
│ └── types.ts # TypeScript types
├── schemaTypes/
│ ├── page.ts # Page document schema
│ ├── siteSettings.ts # Site settings schema
│ ├── downloadLink.ts # Download link object
│ └── sections/ # Section schemas
└── sanity.config.ts # Sanity Studio configuration
Main content type with flexible sections. Set slug to / for homepage.
- Hero Section - Large banner with heading, description, image, and CTA buttons
- Features Section - Grid of features with icons and descriptions
- Download Section - OS-specific download links (macOS, Windows, Linux)
- Content Block - Rich text content with formatting and images
Global settings including site title, description, GitHub URL, and social links.
- Create a new schema in
schemaTypes/sections/ - Add it to
schemaTypes/index.ts - Create a React component in
components/sections/ - Add it to the
SectionRenderercomponent - Update TypeScript types in
lib/types.ts
The project uses Tailwind CSS with shadcn/ui. Customize colors in app/globals.css.
- Push your code to GitHub
- Import your repository in Vercel
- Add environment variables
- Deploy!
Make sure to set these in your deployment platform:
NEXT_PUBLIC_SANITY_PROJECT_IDNEXT_PUBLIC_SANITY_DATASETNEXT_PUBLIC_SANITY_API_VERSION
MIT