StatsHub Docs

Architecture

The Pages Router layout of the web app.

PathPurpose
src/pagesCustomer pages and route entry points
src/pages/apiExisting Next.js API implementation
src/componentsFeature and shared UI
src/contextsCross-page client state
src/hooksReusable browser behavior
src/dbDrizzle schema, migrations, and database client
src/libShared utilities and integrations
src/serverServer-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.