I've been building Next.js templates as a side project. This is the most technical one yet: Pulse, a full SaaS analytics dashboard with 5 pages, Recharts charts, TanStack Table, and a persistent dark/light mode system.

Here are the four implementation details that took the most thought.

1. Dark/light mode with zero flash

CSS custom properties on :root for light mode, overridden on [data-theme="dark"] for dark mode:

:root {