A Next.js 15 App Router site for Beatbox, an open, modular home-cage cognitive monitoring system. All copy and structure come from Markdown in content/ and render through reusable React components.
- Site metadata:
content/_site.md(title, description, keywords, authors, Open Graph/Twitter defaults, logo paths). - Pages: top-level Markdown files like
content/home.md,content/beatbox.md. Each has frontmatter withhero,sections,layout,slug, and navigation fields. - Blog: Markdown in
content/blog/*.mdwithlayout: "blog",publishAtfor scheduling, and optionalshowInNav/navOrder. - Navigation: built automatically from
showInNavandnavOrder. - Metadata: generated from
_site.mdplus per-page overrides, with canonical URLs built fromNEXT_PUBLIC_SITE_URL.
npm install
npm run devnpm run dev– start development servernpm run build– production buildnpm run start– start production servernpm run lint– ESLint (Next.js config, ESLint 9)npm run type-check– TypeScript--noEmitnpm run test– lightweight utility tests viats-node
- Duplicate an existing file in
content/and adjust frontmatter (title,layout,slug,hero,sections). - For blog posts, place files in
content/blog/withlayout: "blog"andpublishAt. Future-dated posts are hidden until their date. - Navigation updates automatically from
showInNavandnavOrder.
- Global defaults come from
content/_site.md. - Per-page metadata uses hero/subtitle or body for descriptions and pulls OG/Twitter images from hero backgrounds, the first Markdown image, or the default logo/OG image.
NEXT_PUBLIC_SITE_URLis used for canonical, sitemap, and robots entries.
Copy .env.example to .env.local and fill in:
MAILGUN_API_KEY,MAILGUN_DOMAIN,MAILGUN_API_URL,MAILGUN_FROM_EMAIL,MAILGUN_TO_EMAILNEXT_PUBLIC_SITE_URLNEXT_PUBLIC_RECAPTCHA_SITE_KEY(optional Google reCAPTCHA for the contact form)
/api/send-email accepts JSON fields, sanitizes values, and forwards them to Mailgun. Ensure the Mailgun variables are set and reachable from the server environment.
Tailwind CSS v4 via @tailwindcss/postcss, plus small component-scoped CSS files (e.g., HeroSection.css, ContentSections.css) to keep the glass aesthetic and hero typography.
npm run test executes simple utility checks via ts-node. Extend with additional utility or content schema tests as needed.