Waymark Docs Live preview
Documentation

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.

PageRouteWhat it is
Home/Hero, product board, feature cards, resource allocation, testimonials, pricing teaser, FAQ
Features/featuresNine feature cards, resource allocation, the issue-journey tabs
About/aboutStory, values, case studies, open positions, funding timeline
Pricing/pricingMonthly / annual switch, plan cards, comparison table, billing FAQ
FAQ/faqQuestions grouped by topic, testimonials
Contact/contactContact channels and a validated form that posts to PHP
Login / Sign up/login, /signupAuth 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.md and AGENTS.md in 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

ToolVersionNeeded for
Node.js20.9 or newerBuilding the site
npm9 or newerInstalling packages
PHP8.0 or newerOnly the contact form (contact.php)

Install and run

bash
cd final-waymark-next-16
npm install
npm run dev

npm 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

CommandWhat it does
npm run devStart the dev server with live reload
npm run buildProduction build and static export into out/
npm run serveBuild, then serve out/ with PHP at http://localhost:8000 (the contact form works here)
npm run lintCheck the code with ESLint
npm run install:staticInstall the packages for the documentation and preview pages
npm run build:staticBuild those two pages into static-files/dist/ (build:static:dev keeps them readable)
Edit files in 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.

text
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.json

Components

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).

FolderUsed 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.

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.

tsx
<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--accent-rgbButtons, links, highlights
Accent soft--accentsoft-rgbIcon tiles, badges
Text / lines--fg-rgbFlips to near-white in dark mode
Background--bg-rgbPage background
Surface--surface-rgbCards
Danger--danger-rgbForm errors
Success--success-rgbSuccess messages

Typography

UseFontSizes
HeadingsSpace Grotesk 500–70048 / 40 / 32 / 24 / 20 px
Body textInter 400–60016 px, small text 14 px
Labels, codeIBM Plex Mono 400–50014 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:

ClassValueUsed for
pt-section, py-section128 pxGap between sections
pb-hero, mb-hero60 pxGap after hero text
pb-head48 pxSpace under a section heading block

Change the brand colour

css
/* 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.

css
.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.

Write class names as complete strings ("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:

bash
npx shadcn@latest add dialog

The 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:

tsx
<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

php
// public/contact.php
const CONTACT_TO      = 'support@lettstartdesign.com';
const CONTACT_SUBJECT = 'Waymark website enquiry';

Fields and rules

FieldRule
nameRequired, 2–100 characters, no line breaks or angle brackets
emailRequired, valid address
teamOptional, whole number from 1 to 100000
topicRequired, one of the listed topics
messageRequired, 10–2000 characters
consentMust be ticked
websiteHidden 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 fetch request and gets JSON: {"ok": true, "message": "…"}, or HTTP 422 with an errors object 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.
The form needs a server that runs PHP and can send mail with 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.

ParameterBecomes
title<title>, og:title, twitter:title
descriptionMeta description, og:description, twitter:description
keywordsMeta keywords
pathCanonical URL and og:url
noindexrobots: 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.

bash
NEXT_PUBLIC_SITE_URL=https://example.com npm run build

Build and deployment

npm run build turns src/ into plain files in out/, ready to upload.

StepWhat happens
pagesEvery route is rendered once into a complete HTML page
cssTailwind and globals.css are compiled into one stylesheet
jsClient components are bundled and split per page; filenames carry a content hash
fontsSpace Grotesk, Inter and IBM Plex Mono are downloaded at build time and served from your own domain (next/font)
publiccontact.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.

PackageVersionUsed forPages
@base-ui/react^1.9.0Headless primitives under the shadcn/ui components (dialog, accordion, tabs, select …)All
@hookform/resolvers^7.0.1Connects zod to react-hook-formContact, Login, Signup
class-variance-authority^0.7.1Button, badge, tabs and field variantsAll
clsx^2.1.1Joins class names (cn())All
embla-carousel-autoplay^8.6.0Testimonial autoplayHome, FAQ
embla-carousel-react^8.6.0Carousel engine behind the shadcn/ui CarouselHome, FAQ
lucide-react^1.66.0IconsAll
next16.4.3Framework: routing, server components, static exportAll
next-themes^0.4.6Light / dark mode and remembering the choiceAll
react19.3.0UI libraryAll
react-dom19.3.0Renders React in the browserAll
react-hook-form^7.91.0Form stateContact, Login, Signup
shadcn^4.23.0shadcn CLI and the shadcn/tailwind.css theme helpersAll
tailwind-merge^3.7.0Resolves conflicting Tailwind classes (cn())All
tw-animate-css^1.4.0Animation utilities (animate-in, fade-in …)Modals, menu, tabs
zod^4.6.7Validation rules and messagesContact, Login, Signup

Build tools

Listed under devDependencies. They run on your computer only and are not part of the built site.

PackageVersionUsed for
@tailwindcss/turbopack^4Runs Tailwind inside the Next.js (Turbopack) build
@types/node^20Node.js types
@types/react^19React types
@types/react-dom^19React DOM types
eslint^9Linting
eslint-config-next16.4.3Next.js lint rules
tailwindcss^4Utility CSS (v4), compiled at build time
typescript^5Type checking

Add or update a library

bash
npm install some-library   # add it
npm update                 # update everything
npx shadcn@latest add tooltip   # add a shadcn/ui component
Run npm 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

SectionTells the assistant
StackThe framework, styling and library versions in use
CommandsThe exact install, dev, build and serve commands, so it does not guess
Project structureWhere pages, components, styles, scripts and images live
How to customizeStep by step: brand colour, new page, menu, contact recipient, prices
ConventionsCoding rules to follow (token classes, one component per file …)
Do NOTFolders 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.

bash
cp CLAUDE.md AGENTS.md

Troubleshooting

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.

ResourceUsed for
Next.js 16Framework and static export
shadcn/uiInterface components
Base UIHeadless primitives under shadcn/ui
Tailwind CSS 4Styling
React Hook Form, ZodForm state and validation
Embla CarouselTestimonial carousel
LucideIcons

Need help? Email support@lettstartdesign.com.

Changelog

VersionDateNotes
1.0.1November 2, 2026Added CLAUDE.md and AGENTS.md (AI assistant guide) and an AI assistants section in this documentation
1.0.0November 2, 2026Next.js 16 version: shadcn/ui components, Tailwind CSS 4, Apache .htaccess, PHP contact form, separate documentation and preview package