Waymark, step by step
Everything you need to set up, customise and ship Waymark, a Next.js 16 web app template and theme.
Introduction
Waymark is a modern, fully featured Next.js web app landing page template built with shadcn/ui and Tailwind CSS — a Next.js website template meant to be one of the more complete options for teams who want a production-ready theme. It ships with eight pages, reusable React components, a validated contact form and a static export that runs on any static host.
| Page | Route | What it is |
|---|---|---|
| Home | / | Hero, product board, feature cards, resource allocation, testimonials, pricing teaser, FAQ |
| Features | /features | Nine feature cards, resource allocation, the issue-journey tabs |
| About | /about | Story, values, case studies, open positions, funding timeline |
| Pricing | /pricing | Monthly / annual switch, plan cards, comparison table, billing FAQ |
| FAQ | /faq | Questions grouped by topic, testimonials |
| Contact | /contact | Contact channels and a validated form that posts to PHP |
| Login / Sign up | /login, /signup | Auth forms; also open as modals from every page |
What is included
- Next.js 16 (App Router), exported as static files — no Node.js server needed in production
- shadcn/ui components (Accordion, Carousel, Dialog, Field, Navigation Menu, Sheet, Tabs …) in
src/components/ui/ - Tailwind CSS 4 with design tokens in one place: colours, font sizes, spacing, control height
- Light by default, with a dark mode the visitor can switch to; their choice is remembered
- Scroll animation, count-up numbers, card spotlight, tabs, billing switch, testimonial carousel
- SEO: unique title, description and keywords per page, canonical URLs, Open Graph, JSON-LD
- PHP contact form
- AI-ready:
CLAUDE.mdandAGENTS.mdin the project root guide coding assistants
Getting started
Install the tools, run one command and the site opens in your browser with live reload every time you save a file.
Requirements
| Tool | Version | Needed for |
|---|---|---|
| Node.js | 20.9 or newer | Building the site |
| npm | 9 or newer | Installing packages |
| PHP | 8.0 or newer | Only the contact form (contact.php) |
Install and run
cd final-waymark-next-16
npm install
npm run devcd final-waymark-next-16
yarn
yarn devcd final-waymark-next-16
pnpm install
pnpm devnpm run dev starts the Next.js dev server at http://localhost:3000 with live reload; every change you save in src/ shows up in the browser.
Commands
| Command | What it does |
|---|---|
npm run dev | Start the dev server with live reload |
npm run build | Production build and static export into out/ |
npm run serve | Build, then serve out/ with PHP at http://localhost:8000 (the contact form works here) |
npm run lint | Check the code with ESLint |
npm run install:static | Install the packages for the documentation and preview pages |
npm run build:static | Build those two pages into static-files/dist/ (build:static:dev keeps them readable) |
src/ and public/ only. Everything in out/ is generated and is replaced on every build.Folder structure
Everything you edit lives in src/ and public/; the build writes the finished site to out/. Here is where each piece sits.
final-waymark-next-16/
├── src/ ← edit here
│ ├── app/ ← routes (App Router)
│ │ ├── layout.tsx ← fonts, theme, header, footer, site-wide JSON-LD
│ │ ├── globals.css ← base styles + custom CSS (imports tokens.css)
│ │ ├── tokens.css ← design tokens (:root, .dark, @theme inline)
│ │ ├── page.tsx ← home
│ │ ├── about/ features/ pricing/ faq/ contact/ login/ signup/ (page.tsx each)
│ ├── components/
│ │ ├── ui/ ← shadcn/ui, one folder per component (+ index.ts)
│ │ ├── core/ ← header, footer, logo, CTA, preloader, scroll effects, theme toggle
│ │ └── site/ ← page pieces: auth modal, billing, testimonials, forms …
│ ├── data/ ← all copy as JSON + types, one folder per page (schema/ = JSON-LD)
│ ├── services/ ← getHome(), getPricing() … the one place that reads data/
│ ├── providers/ ← React context: auth-modal/, billing/
│ ├── hooks/ ← use-in-view, use-reduced-motion
│ └── lib/ ← site.ts (SEO helpers), validation schemas, utils
├── public/ ← copied to out/ as it is
│ ├── contact.php ← contact form handler
│ └── assets/images/ ← SVG illustrations, favicons
├── static-files/ ← documentation + preview pages (own package.json)
├── out/ ← generated, upload this
├── components.json ← shadcn/ui settings
├── next.config.ts ← output: "export"
└── package.jsonComponents
Each component lives in its own folder with one file per piece and an index.ts that re-exports them, so you import @/components/ui/accordion and get Accordion, AccordionItem, AccordionTrigger and AccordionContent. Non-component code sits in sibling files: variants.ts (style variants), context.ts (React contexts and hooks), data.ts (copy and constants).
| Folder | Used for |
|---|---|
components/ui/ | shadcn/ui primitives: Accordion, Badge, Button, Card, Carousel, Checkbox, Dialog, Field, Input, Label, Navigation Menu, Progress, Select, Separator, Sheet, Table, Tabs, Textarea, Toggle Group |
components/core/ | Layout: Header, Footer, Logo, Cta, Preloader, ScrollReveal, ScrollProgress, ScrollTop, ThemeToggle |
components/site/ | Page pieces: AuthModalProvider and AuthLink, AuthForm, BillingProvider / PlanCards / CompareTable, Testimonials, JourneyTabs, ContactForm, FaqList, Resources, SpotlightCard, SectionHeading, PageHero … |
A page
Every page is a folder in src/app/ with a page.tsx that exports its metadata and its content. The header, footer, theme and modals come from layout.tsx.
// src/app/my-page/page.tsx
import { Cta } from "@/components/core/cta"
import { PageHero } from "@/components/site/section"
import { pageMetadata } from "@/lib/site"
export const metadata = pageMetadata({
title: "Page title — Waymark",
description: "One sentence for search results (under 160 characters).",
path: "/my-page",
keywords: "keyword one, keyword two",
})
export default function MyPage() {
return (
<>
<PageHero eyebrow="Label" title="Heading" text="Intro text." />
<Cta />
</>
)
}A section
Every content section is one <section> with a SectionHeading and a content block, so the spacing is identical everywhere.
<section className="px-4 pt-section text-center md:px-8">
<SectionHeading eyebrow="Label" title="Section heading">
Short supporting text.
</SectionHeading>
<div className="mx-auto grid max-w-6xl gap-6 text-left md:grid-cols-3">
{/* content */}
</div>
</section>Adding a page to the menu
Add a link to the NAV list in components/core/header/data.ts (desktop nav and mobile drawer) and to FooterNav in components/core/footer/footer-nav.tsx. The active link is highlighted from the current URL.
Design tokens
Every colour, size and gap comes from CSS variables at the top of src/app/tokens.css. Change a token and the whole site follows.
Colours
Colours are stored as RGB channels, which lets them take an opacity: rgb(var(--fg-rgb) / .6) in CSS, text-fg/60 in JSX. The shadcn/ui variables (--background, --primary, --border …) point at the same tokens.
--accent-rgbButtons, links, highlights--accentsoft-rgbIcon tiles, badges--fg-rgbFlips to near-white in dark mode--bg-rgbPage background--surface-rgbCards--danger-rgbForm errors--success-rgbSuccess messagesTypography
| Use | Font | Sizes |
|---|---|---|
| Headings | Space Grotesk 500–700 | 48 / 40 / 32 / 24 / 20 px |
| Body text | Inter 400–600 | 16 px, small text 14 px |
| Labels, code | IBM Plex Mono 400–500 | 14 px, uppercase labels |
Font sizes follow a fixed scale: 14, 16, 20, 24, 32, 40, 48. In JSX use text-sm (14), text-base (16), text-xl (20), text-2xl (24), text-3xl (32), text-4xl (40), text-5xl (48).
Spacing
Margins, padding and gaps use 4, 8, 12, 16, 24, 32 px (Tailwind 1, 2, 3, 4, 6, 8). Three larger steps exist for page rhythm:
| Class | Value | Used for |
|---|---|---|
pt-section, py-section | 128 px | Gap between sections |
pb-hero, mb-hero | 60 px | Gap after hero text |
pb-head | 48 px | Space under a section heading block |
Change the brand colour
/* src/app/tokens.css */
:root {
--accent-rgb: 255 68 0; /* change this */
--accent-hover-rgb: 230 62 0;
--accentsoft-rgb: 255 233 222;
}Dark mode
Dark mode is class based and handled by next-themes. The site is light by default; the header button switches to dark and saves the choice in localStorage.
The provider is set up in src/app/layout.tsx (attribute="class", defaultTheme="light") and adds dark to <html> before the page paints, so there is no flash. You never write dark: variants for the brand colours: the variables change instead.
.dark {
--bg-rgb: 16 17 20;
--fg-rgb: 251 251 249;
--surface-rgb: 23 23 23;
}Tailwind CSS
Tailwind CSS 4 is compiled during the build through @tailwindcss/turbopack, so no Tailwind script runs in the browser. There is no tailwind.config file: the theme is declared in CSS.
In tokens.css the @theme inline block defines the colours (ink, paper, bg, fg, surface, surface-alt, raised, track, accentsoft, accent-light, on-accent, danger, success plus the shadcn names), the font-size scale, the radii and the three extra spacing steps. Tailwind finds class names by scanning your source files.
"border-danger"), never build them by joining pieces ("border-" + color), or Tailwind cannot see them.Custom CSS
globals.css only holds what Tailwind cannot express: the hero gradients, the dashed ruler, the feature-card spotlight, the scroll animation, the scroll-to-top ring and the preloader.
Components
The template uses shadcn/ui for its interface. The component files are copied into your project, so you own them and can edit them freely.
shadcn/ui
Settings are in components.json (style base-nova, built on Base UI). Add another component with:
npx shadcn@latest add dialogThe generated files go to src/components/ui/<name>/. Waymark restyles a few of them: Button (pill, 48 px), Input / Select / Textarea (48 px, 16 px sides), Card, Checkbox and the overlay colour of Dialog and Sheet.
Buttons
All buttons and text inputs are 48 px high. Buttons have 24 px sides (32 px for size="lg"). To make a link look like a button, use buttonVariants:
<Button variant="accent">Start free</Button>
<Link href="/features" className={buttonVariants({ variant: "outline", size: "lg" })}>
Learn more
</Link>Login and signup modals
Any AuthLink to /login or /signup opens the matching shadcn/ui Dialog instead of leaving the page (the link still works as a normal page). They close with the X button, a click outside, or Esc.
Testimonial carousel
The shadcn/ui Carousel (Embla) with the autoplay plugin. Edit the cards in components/site/testimonials/data.ts; columns, speed and autoplay are set in testimonials.tsx.
Contact form (PHP)
The form on /contact is built with the shadcn/ui Field components, validated in the browser with react-hook-form and zod, then posted to contact.php, which validates every field again and emails you.
Set the recipient
// public/contact.php
const CONTACT_TO = 'support@lettstartdesign.com';
const CONTACT_SUBJECT = 'Waymark website enquiry';Fields and rules
| Field | Rule |
|---|---|
name | Required, 2–100 characters, no line breaks or angle brackets |
email | Required, valid address |
team | Optional, whole number from 1 to 100000 |
topic | Required, one of the listed topics |
message | Required, 10–2000 characters |
consent | Must be ticked |
website | Hidden bot trap; real visitors leave it empty |
The same rules live in src/lib/contact-schema.ts (browser) and public/contact.php (server). Change both together.
How it replies
- The form sends a
fetchrequest and gets JSON:{"ok": true, "message": "…"}, or HTTP 422 with anerrorsobject per field, shown under each field. - Posts from another website are refused, and line breaks in the name and email are stripped so headers cannot be injected.
mail(). It does not work with npm run dev or on a static host without PHP. Use npm run serve to try it locally.SEO
Each page exports its own metadata with pageMetadata() from src/lib/site.ts, which fills the tags below.
| Parameter | Becomes |
|---|---|
title | <title>, og:title, twitter:title |
description | Meta description, og:description, twitter:description |
keywords | Meta keywords |
path | Canonical URL and og:url |
noindex | robots: noindex, follow (used on login and signup) |
JSON-LD
Organization and WebSite data is added on every page from layout.tsx. Page-specific data (WebPage, AboutPage, FAQPage, ContactPage, SoftwareApplication, BreadcrumbList) is in src/data/schema.json, rendered by the JsonLd component.
Change the site address
Set NEXT_PUBLIC_SITE_URL before building. It is used for canonical URLs, Open Graph and the {{site}} placeholder in the JSON-LD.
NEXT_PUBLIC_SITE_URL=https://example.com npm run buildBuild and deployment
npm run build turns src/ into plain files in out/, ready to upload.
| Step | What happens |
|---|---|
| pages | Every route is rendered once into a complete HTML page |
| css | Tailwind and globals.css are compiled into one stylesheet |
| js | Client components are bundled and split per page; filenames carry a content hash |
| fonts | Space Grotesk, Inter and IBM Plex Mono are downloaded at build time and served from your own domain (next/font) |
| public | contact.php and assets/ are copied into out/ |
Deploy
Upload the contents of out/ to your web root. The host needs PHP for the contact form. To host in a sub folder, set basePath in next.config.ts and rebuild.
Dependencies
Everything the site installs from npm, what each package is for and where it is used.
Libraries used by the pages
Listed under dependencies in package.json.
| Package | Version | Used for | Pages |
|---|---|---|---|
@base-ui/react | ^1.9.0 | Headless primitives under the shadcn/ui components (dialog, accordion, tabs, select …) | All |
@hookform/resolvers | ^7.0.1 | Connects zod to react-hook-form | Contact, Login, Signup |
class-variance-authority | ^0.7.1 | Button, badge, tabs and field variants | All |
clsx | ^2.1.1 | Joins class names (cn()) | All |
embla-carousel-autoplay | ^8.6.0 | Testimonial autoplay | Home, FAQ |
embla-carousel-react | ^8.6.0 | Carousel engine behind the shadcn/ui Carousel | Home, FAQ |
lucide-react | ^1.66.0 | Icons | All |
next | 16.4.3 | Framework: routing, server components, static export | All |
next-themes | ^0.4.6 | Light / dark mode and remembering the choice | All |
react | 19.3.0 | UI library | All |
react-dom | 19.3.0 | Renders React in the browser | All |
react-hook-form | ^7.91.0 | Form state | Contact, Login, Signup |
shadcn | ^4.23.0 | shadcn CLI and the shadcn/tailwind.css theme helpers | All |
tailwind-merge | ^3.7.0 | Resolves conflicting Tailwind classes (cn()) | All |
tw-animate-css | ^1.4.0 | Animation utilities (animate-in, fade-in …) | Modals, menu, tabs |
zod | ^4.6.7 | Validation rules and messages | Contact, Login, Signup |
Build tools
Listed under devDependencies. They run on your computer only and are not part of the built site.
| Package | Version | Used for |
|---|---|---|
@tailwindcss/turbopack | ^4 | Runs Tailwind inside the Next.js (Turbopack) build |
@types/node | ^20 | Node.js types |
@types/react | ^19 | React types |
@types/react-dom | ^19 | React DOM types |
eslint | ^9 | Linting |
eslint-config-next | 16.4.3 | Next.js lint rules |
tailwindcss | ^4 | Utility CSS (v4), compiled at build time |
typescript | ^5 | Type checking |
Add or update a library
npm install some-library # add it
npm update # update everything
npx shadcn@latest add tooltip # add a shadcn/ui componentnpm install after downloading the project, and again after changing package.json. Node.js 20.9 or newer is required.Customisation
Make the template yours: rename it, change the colours and fonts, swap the copy and images, and update the plans and prices.
Change the name and logo
Search src/ for "Waymark". The logo mark is the SVG in components/core/logo/logo-mark.tsx; the favicon files are in public/assets/images/ (favicon.svg, favicon-32.png, apple-touch-icon.png).
Change fonts
Fonts are loaded with next/font/google in src/app/layout.tsx and wired to Tailwind in the @theme inline block of tokens.css (--font-sans, --font-display, --font-mono).
Change text and images
Copy is plain JSX in the pages, or in each component's data.ts. The illustrations are SVG files in public/assets/images/ shown with next/image, so you can replace them with your own SVG or PNG files.
Change plans and prices
Edit components/site/billing/data.ts (prices, comparison table), the plan cards in plan-cards.tsx and the pricing teaser in src/app/page.tsx. The monthly price is the monthly entry next to each annual price.
AI assistants
The project root contains CLAUDE.md and AGENTS.md: a short guide that coding assistants read before they touch your code, so they use the right commands and edit the right files.
CLAUDE.md is read by Claude Code; AGENTS.md by Cursor, Codex, Copilot and similar tools. The two files are identical.
What is inside
| Section | Tells the assistant |
|---|---|
| Stack | The framework, styling and library versions in use |
| Commands | The exact install, dev, build and serve commands, so it does not guess |
| Project structure | Where pages, components, styles, scripts and images live |
| How to customize | Step by step: brand colour, new page, menu, contact recipient, prices |
| Conventions | Coding rules to follow (token classes, one component per file …) |
| Do NOT | Folders and changes that are off limits (node_modules, generated output, major version upgrades) |
Keep them in sync
When the project changes (a new folder, command or rule), edit CLAUDE.md and copy it over AGENTS.md.
cp CLAUDE.md AGENTS.mdTroubleshooting
Quick answers to the problems people run into most often when setting up the template.
The contact form shows an error
The form needs a server that runs PHP and can send mail. Use npm run serve to try it locally, set the recipient in contact.php, and check the server can send mail.
The build fails while downloading fonts
next/font/google downloads the fonts during npm run build, so the build machine needs internet access once.
My edits do not show up
Edit files in src/, never in out/, which is rebuilt every time. With npm run dev the page reloads on save; if it does not, do a hard refresh.
How do I change the brand colour?
Change --accent-rgb at the top of src/app/tokens.css. Buttons, links, gradients and dark mode all follow it.
Dark mode does not remember my choice
The choice is saved in localStorage. If the browser blocks storage (private mode, blocked cookies) the site stays on the default light theme.
npm install fails with EACCES
The npm cache has files owned by root. Run sudo chown -R $(id -u):$(id -g) ~/.npm once, or install with --cache ./.npm-cache.
Credits and support
Waymark builds on a few open-source projects. Here is what they do, who to ask for help, and what changed in each release.
| Resource | Used for |
|---|---|
| Next.js 16 | Framework and static export |
| shadcn/ui | Interface components |
| Base UI | Headless primitives under shadcn/ui |
| Tailwind CSS 4 | Styling |
| React Hook Form, Zod | Form state and validation |
| Embla Carousel | Testimonial carousel |
| Lucide | Icons |
Need help? Email support@lettstartdesign.com.
Changelog
| Version | Date | Notes |
|---|---|---|
| 1.0.1 | November 2, 2026 | Added CLAUDE.md and AGENTS.md (AI assistant guide) and an AI assistants section in this documentation |
| 1.0.0 | November 2, 2026 | Next.js 16 version: shadcn/ui components, Tailwind CSS 4, Apache .htaccess, PHP contact form, separate documentation and preview package |