Architecture
The Pages Router layout of the web app.
| Path | Purpose |
|---|---|
src/pages | Customer pages and route entry points |
src/pages/api | Existing Next.js API implementation |
src/components | Feature and shared UI |
src/contexts | Cross-page client state |
src/hooks | Reusable browser behavior |
src/db | Drizzle schema, migrations, and database client |
src/lib | Shared utilities and integrations |
src/server | Server-only product logic |
src/pages/_app.tsx installs the global error boundary, SWR configuration,
theme, locale, user, sport, history, and listener providers. Pages can define
getLayout when they need a different shell.
The app runs on Next.js 14. Use Pages Router APIs such as getServerSideProps
and getStaticProps; App Router files and conventions do not apply here.