The MinMaxHub frontend is a Next.js application using the App Router. It serves as the public-facing read layer for consensus content and provides authenticated interfaces for content creation and administration.
Routing Zones
The application is organized into four layout zones:
| Zone | URL Pattern | Purpose |
|---|---|---|
| Landing | / | Marketing and landing page |
| Public | General pages | Login, user profiles, general pages |
| Entity Pages | /{slug-path} | Content pages resolved by URL slug |
| Admin | /admin/* | Content management (authenticated only) |
URL Structure
Content pages are accessed via their slug path. For example, a "Bard" class page under "D&D 3.5e" might live at /dnd/dnd-35e/classes/bard. The URL is resolved to either a node (folder listing) or an entity (content page).
Entity Pages
Entity pages display consensus content assembled from community suggestions. Each page is built from a layout that defines its sections (topics), and each section shows the winning suggestion as determined by the consensus algorithm.
Pages support:
- Star filtering -- filter content by star rating (1-5)
- Rating source toggle -- switch between community averages and your own ratings
- Sidebar navigation -- browse the page's layout sections
- Comments -- discussion section at the bottom
Item Detail Pages
When navigating to a specific item within a collection (e.g., a single spell in a spell list), the item detail page shows:
- The current consensus value for that item
- All competing suggestions, ranked by score, with vote controls
- A form for submitting new suggestions (authenticated users only)
Authentication
Requests to the admin area require a valid session. Unauthenticated visitors are redirected to the login page.
For client-side operations, the useAuth() hook provides:
user-- the current user objectisAuthenticated-- boolean authentication statelogout()-- sign outloginWithProvider()-- sign in via a supported provider
Server-side pages can check authentication status to conditionally render content or protect actions.
Theme System
Nine themes are available:
| Theme | Style |
|---|---|
| Parchment | Light |
| Obsidian | Dark |
| Edgerunners | Cyberpunk |
| Inkwell | Lofi |
| Verdant Wilds | Forest |
| Bloodmoon | Dracula |
| Arcane Pulse | Synthwave |
| Golden Scroll | Caramellatte |
| ShadowFell | Black |
The selected theme persists across sessions. A script runs before React hydrates to prevent flash of unstyled content on page load.
Static Generation
Entity pages are statically generated for fast load times. When consensus is recomputed, the affected page is automatically invalidated and re-rendered on the next visit. This means content updates are reflected within seconds without requiring a full site rebuild.