Next.js marketing website starter with content provided by the Hygraph headless CMS via GraphQL
reference-marketing-website — Next.js SaaS Template
By hygraph
A Next.js and Hygraph headless CMS SaaS marketing website starter, including pages, blog, and multilingual routing examples.
Explore the design
Compare the page layouts and mobile experience. Open any screenshot for a closer look.
Actual screenshot captured by the server browser.
All pages & views 3
Screenshots show visual appearance; interactive behavior may differ.
What stands out
A quick read of the recorded project description.
Includes example content models for pages and blog posts, with a homepage and representative inner pages
Supports Next.js Preview Mode to preview draft content in Hygraph
Uses next/image for images and next-seo for page SEO metadata
Demonstrates internationalized routing and GraphQL union types (polymorphic relations)
MIT licensed, allowing modification, commercial use, and distribution of this version of the code
Template Details
This is a Next.js starter for SaaS marketing scenarios, with content provided by the Hygraph (formerly GraphCMS) headless CMS via GraphQL. The repository provides a ready-to-clone example site that includes a marketing homepage, inner pages, and blog page structures, and demonstrates two content models: pages and blog posts.
For content fetching, the project connects to a Hygraph project via the HYGRAPH_ENDPOINT environment variable and supports Next.js Preview Mode: after configuring GRAPHCMS_TOKEN, GRAPHCMS_PREVIEW_TOKEN, and GRAPHCMS_PREVIEW_SECRET, you can set preview URLs for the Page and Blog Post models in Hygraph, pointing to /api/preview with a slug.
On the technical side, the README lists the use of next/image, Internationalized Routing, GraphQL union types (polymorphic relations), and next-seo. The project is MIT licensed, and the free scope is limited to this version of the code; third-party assets such as demo images, fonts, and icons, as well as external services like Hygraph and hosting, require separate license and cost verification.
Is it right for your project?
Use Cases
- Building a SaaS product marketing website and blog
- A site architecture where a headless CMS drives content and the frontend handles rendering
- Marketing pages that require draft preview and multilingual routing
- Using as starter code for further development of a corporate website or marketing site
Suitable For
- Developers familiar with Next.js and GraphQL who want to manage content with Hygraph
- SaaS teams needing a combined marketing website and blog structure
- Secondary developers who want to quickly adjust pages and content models based on an existing example
Getting started & customization
Use these recorded setup notes alongside the repository instructions for your chosen version.
- 1
Clone the repository with npx degit Hygraph/reference-marketing-website#main and install dependencies
- 2
Copy .env.local.example to .env.local and fill in HYGRAPH_ENDPOINT
- 3
For preview mode, add GRAPHCMS_TOKEN, GRAPHCMS_PREVIEW_TOKEN, and GRAPHCMS_PREVIEW_SECRET
- 4
In Hygraph, configure preview URLs pointing to /api/preview for the Page and Blog Post models
License & source material
Usage conditions & limitations
Free to use · keep license noticeThis entry covers the free version of the public repository under the MIT license; the free scope is limited to this version of the code and does not imply that external services or third-party assets are free.
Must comply with when using
- Free use, modification, commercial use, and distribution of this version of the code are permitted.
- When distributing copies or substantial portions of the code, retain the original author's copyright notice and the full MIT license notice.
- The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.
Additional costs & items to verify
- Using this template requires registering a Hygraph account and creating a project, then filling in HYGRAPH_ENDPOINT and other keys in .env.local; content depends on Hygraph, an external headless CMS service, whose free tier and future charges are determined by Hygraph.
- Enabling preview mode requires generating permanent Auth Tokens (GRAPHCMS_TOKEN, GRAPHCMS_PREVIEW_TOKEN) in the Hygraph backend and configuring GRAPHCMS_PREVIEW_SECRET, which are external service account and key requirements.
- The draft preview feature requires manually configuring preview URLs pointing to /api/preview for the Page and Blog Post models in Hygraph, which is an external service-side configuration step.
- Demo images, fonts, icons, and other third-party assets must be checked against their respective licenses and cannot be judged solely by the code's MIT license.
- External services such as domains, hosting, databases, payments, or AI may incur additional charges.
View Original Text Basis
Permission is hereby granted, free of charge
Original License Text
Provide your Hygraph project keys
Original README
This should be a Permanent Auth Token that is set to fetch content from _PUBLISHED_ content stage by default.
Original README
https://github.com/hygraph/reference-marketing-website/blob/main/LICENSE.mdhttps://github.com/hygraph/reference-marketing-website/blob/main/README.mdYou'll need to update both the Page & Blog Post model to add a Preview URL.
Original README
Compiled by DeepSeek based on repository license and README ·2026-10-01. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.
Project checks & description sources
Template Information
- Source platforms
- GitHub
- Documentation and maintenance reference score
- More documented · 90 / 100
- Technologies
- Next.js · React
- Website type
- SaaS · Corporate Website · Starter
How this score is calculated
Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.
What to verify for this project
- Repository update recorded
- 2025-01-22
- Screenshot last checked
- 2026-10-01
A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.
The catalog identifies Next.js as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.
Use a selection guide →How this description was prepared
AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.
Automatically checked against source and license rules; no manual editorial review.
Inspect the recorded source material
SHA-256: 6adcc71fe142408f7328a352799a4ce1cb997f57e3fb7d784c8dd23b74e32f79
2026-10-01T01:22:25.543Z
Source file / repository# reference-marketing-website
> A [Next.js](https://nextjs.org/) starter for creating a SaaS Marketing Website with [Hygraph](https://hygraph.com)
• [Demo](https://marketing-websites.withheadlesscms.com/)
[](https://app.graphcms.com/clone/5f2c35155b33496999b9467afe88b34f?name=Marketing%20Website)
[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FGraphCMS%2Freference-marketing-website&env=HYGRAPH_ENDPOINT&envDescription=Your%20GraphCMS%20API%20endpoint&envLink=https%3A%2F%2Fgraphcms.com%2Fdocs%2Fapi-reference%2Fbasics%2Fenvironments%23environment-endpoints&demo-title=GraphCMS%20Marketing%20Site%20Reference&demo-description=A%20Next.js%20starter%20for%20creating%20a%20SaaS%20Marketing%20Website%20with%20GraphCMS&demo-url=https%3A%2F%2Fmarketing-websites.withheadlesscms.com%2F&demo-image=https%3A%2F%2Fmedia.graphcms.com%2F0GnTWzWbRBSQzoDQs8R3)
## Quick start
1. Clone the repository and install project dependencies
```shell
npx degit Hygraph/reference-marketing-website#main reference-marketing-website
cd reference-marketing-website
yarn
```
2. **Provide your Hygraph project keys**
Navigate into your new site’s directory and copy the `.env.local.example` file.
```shell
cp .env.local.example .env.local
```
Inside of your newly created `.env.local` file, provide values for the variable. These variables can be found in the [project settings UI](https://hygraph.com/docs/guides/concepts/apis#working-with-apis).
```env
HYGRAPH_ENDPOINT=
```
3. **Start building!**
```shell
yarn dev
```
## Next.js Preview Mode
If you want to enable [Next.js Preview Mode](https://nextjs.org/docs/advanced-features/preview-mode) you'll need to add the following to your `.env`:
```env
GRAPHCMS_TOKEN=
GRAPHCMS_PREVIEW_TOKEN=
GRAPHCMS_PREVIEW_SECRET=
```
### `GRAPHCMS_TOKEN`
This should be a Permanent Auth Token that is set to fetch content from _PUBLISHED_ content stage by default.
### `GRAPHCMS_PREVIEW_TOKEN`
This should be a Permanent Auth Token that is set to fetch content from _DRAFT_ content stage by default.
## `GRAPHCMS_PREVIEW_SECRET`
You'll need to make sure when configuring the Preview URL inside Hygraph that it passes the same secret value you assigned to `GRAPHCMS_PREVIEW_SECRET`.
You'll need to update both the Page & Blog Post model to add a Preview URL. The URLs should look like this:
- **Page**: `https://[your-domain.com]/api/preview?secret=[GRAPHCMS_PREVIEW_SECRET_VALUE_HERE]&slug={slug}`
- **Blog Post**: `https://[your-domain.com]/api/preview?secret=[GRAPHCMS_PREVIEW_SECRET_VALUE_HERE]&slug=blog/{slug}`
## Features
- [Next.js Preview Mode](https://nextjs.org/docs/advanced-features/preview-mode)
- [next/image](https://nextjs.org/docs/api-reference/next/image)
- [Internationalized Routing](https://nextjs.org/docs/advanced-features/i18n-routing)
- [GraphQL Union Types (Polymorphic Relations)](https://hygraph.com/docs/schema/field-types)
- [next-seo](https://www.npmjs.com/package/next-seo)
Explore similar templates
Compare previews and descriptions within the same stack and category.

Next.js SaaS Starter
The official Next.js SaaS starter template, integrating email/password authentication, Stripe Checkout subscriptions, a dashboard with user/team CRUD, basic Owner/Member RBAC, and activity logging.
Next.js · SaaS

Next.js Commerce
Vercel's officially maintained Next.js App Router ecommerce starter with deep Shopify integration, offering a complete product catalog, cart, and checkout flow. Core logic is modular for swapping backends, and community provider versions exist for BigCommerce, Medusa, and Saleor.
Next.js · E-commerce

Next-js-Boilerplate
A developer-first Next.js 16 starter with Tailwind CSS 4 and TypeScript, supporting both App Router and Page Router.
Next.js · Starter

tailwind-nextjs-starter-blog
A Next.js and Tailwind CSS blog starter template using Contentlayer for Markdown/MDX, with built-in SEO, code highlighting, and tags. It targets personal technical blogs and migration from Jekyll/Hugo to React, and supports one-click Vercel deployment.
Next.js · Blog

next-forge
next-forge is a Turborepo-based Next.js template maintained by Vercel, positioned as a starting point for SaaS products.
Next.js · Starter

SaaS-Boilerplate
SaaS-Boilerplate is an open-source SaaS starter template built with Next.js App Router, React 19, TypeScript, Tailwind CSS, and Shadcn UI.
Next.js · SaaS
