Tour
Everything in this scaffold and how to use it.
A guided walkthrough of Augint Example's functions — public site, four authed apps, multi-theme system, Studio surfaces, and customization paths.
01
What this is — and isn't
config/brand.json, swap the logo, tweak content/*.mdx, and the app reflects your business — without touching components./login shows a role picker instead of real OAuth. To go live, swap MSW for real APIs and flip NODE_ENV=production — auth automatically uses Cognito. See infrastructure/README.md.02
The four authed apps
Each demonstrates a common business-app pattern with realistic mocked data. Click any card to open it — you'll be prompted to pick a role first.
Try this
- Switch tabs — URL updates to ?tab=leads but no refetch happens.
- Click a date-range pill — handler echoes the range in the response.
- Use Battle mode in the leaderboard to see policy-type stacks per agent.
- Cycle the theme — every chart's palette updates via var(--chart-1..5).
- Click Export CSV — current view's rows download client-side.
Try this
- Add a new commission with the form — table updates immediately.
- Filter by status using the "Recent entries" dropdown.
- Inspect handler in src/mocks/handlers.ts — POST /api/commissions.
Try this
- Filter by state or type using the dropdowns in the header.
- Click a card to open the detail dialog, then "Buy Lead".
- Switch to the "Purchased" tab to see the moved lead.
Try this
- Walk through all four steps — Next is disabled until the current step validates.
- Generate the quote on Review — premium computed from age × coverage in the mock handler.
- Hit "New quote" to reset and try a different carrier.
03
Multi-theme system
Four palettes, each with light and dark variants. Switching is instant and persists across sessions via cookie.
Default brand: deep navy with copper accents — directional and grounded.
data-theme="default"
Cool grayscale, professional, restrained — shadcn defaults.
data-theme="neutral"
Navy + Tokyo Night neon dashboard. Reference brand-faithful theme.
data-theme="woxom"
Corporate teal — clean and slightly cool.
data-theme="teal-pro"
Energetic warm orange — friendly and approachable.
data-theme="warm-sun"
Tokyo Night dark with neon accents; muted indigo when light.
data-theme="tokyo"
Pastel lavender light with vibrant accents; deep purple when dark.
data-theme="vapor"
Top-right of every page header. Cycles the four palettes.
Implemented as a data-theme attribute on <html>. Each theme's CSS file in src/styles/themes/ defines tokens for that selector.
Sun/moon button next to the palette switcher. Toggles class="dark" on <html> via next-themes.
Independent of the palette — switching theme keeps the variant; toggling variant keeps the theme.
04
Studio — three tweak surfaces under /studio
Non-developer customization without code edits, plus a path to commit drafts as real code.
How to use
- 1.Pick a palette and variant (light/dark) at the top.
- 2.Edit any token value — change applies instantly via CSS custom properties.
- 3.Click Copy tokens.css and paste into src/styles/themes/<theme>.css to make the change permanent.
How to use
- 1.Toggle a boolean flag (e.g. authed.showCommissions) — the sidebar nav updates instantly.
- 2.Use Reset all overrides to restore defaults.
- 3.Edit config/features.json to change defaults or add new flags. The useFlag() hook reads them.
How to use
- 1.Each card maps to a file in content/<slug>.mdx.
- 2.Edit the file (or ask AI to edit it) and refresh — the public page updates.
- 3.When you outgrow MDX, swap the impl of getContent() per docs/cms-migration.md.
05
Auth — dev mode now, Cognito later
Same useSession() everywhere; the provider is the only thing that swaps when you go to production.
/login to pick a role.Available roles in dev:
- visitorPublic pages and the dashboard shell only.
- salesCommissions, the analytics dashboard, run quotes.
- agentBuy leads, run quotes.
- adminFull access including the Studio surfaces.
Use the Role switcher in the dashboard topbar to switch roles without re-logging-in.
In production, the same login button redirects to Cognito OIDC. The role comes from a Cognito group claim in the JWT.
Code path: src/lib/auth.ts. Branches on NODE_ENV.
06
Mock data — realistic, mutable, in the browser
MSW intercepts fetches via a service worker. Clicking Buy Lead, submitting a commission, and generating a quote all go through MSW handlers and update in-memory state for the session.
src/mocks/data/.07
Customize without writing components
Six file edits cover ~95% of the customization a non-developer needs to do.
config/brand.jsonpublic/logo-placeholder.svgsrc/styles/themes/<your-name>.csscontent/*.mdxconfig/features.jsonsrc/mocks/handlers.ts08
Editing this scaffold with AI
The codebase is shaped so AI assistants (Claude, Cursor, Copilot) can confidently make changes.
“Read docs/architecture.md, then add a Newsletter signup section to the home page.”
“Following the patterns in src/components/marketing/, add a Testimonials block to the home page.”
“Generate a deep-purple theme called Twilight. Mirror src/styles/themes/woxom.css and register it in lib/themes.ts.”
shadcn/ui components are TSX in your repo — not hidden in node_modules. AI reads and edits them directly.
Theme tokens are CSS variables — one file change updates everything.
AGENTS.md and CLAUDE.md ship with the repo — point AI at them. They cover Next.js 16 gotchas (async params, proxy.ts, no next lint) that will trip up older training data.
Mock handlers are the API spec — when you go to production, AI converts MSW handlers into Lambda implementations line-for-line.
09
Plumbing the apps don't show
The pieces that make the scaffold cohesive — most invisible day-to-day, all swappable when you need to change them.
src/proxy.tssrc/components/brand/RoleSwitcher.tsxsrc/app/(public)/[slug]/page.tsxsrc/lib/api.ts.github/workflows/ + .releaserc.json + .husky/.github/.ai-compliance.yaml10
Reference
Where to look when you want to go deeper.
docs/architecture.mddocs/cms-migration.mdinfrastructure/README.mdAGENTS.mdCLAUDE.mdconfig/features.json