Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Starter for Next.js with Pages Router + Material UI + TypeScript
Next.js with Pages MUI Starter TS is an open-source boilerplate from GitHub user karpolan that fuses Create Next App with Material UI (MUI) and TypeScript, giving developers a preconfigured starting point for building Next.js applications with the Pages Router.
This template is a starter project for Next.js that uses the Pages Router (not the newer App Router) and bundles Material UI as the component and styling library. It takes a cloned repository as input and produces a runnable Next.js application with MUI set up, configured linting, formatting, and testing scripts. The project is written in TypeScript and is distributed on GitHub under the repository nextjs-with-pages-mui-starter-ts, with an online demo hosted on Vercel.
.env.sample file is provided; you copy it to .env and adjust variables._TITLE_ and _DESCRIPTION_ across the codebase to set your app's metadata.npm run dev, lint, format, test, build, and build:static cover development, quality checks, building, and static-site generation.npm install and npm run dev to get a working MUI app instead of configuring everything from scratch..env.sample to .env, replace _TITLE_ and _DESCRIPTION_, and run npm run dev to start at localhost:3000.// TODO: directives in the source; resolving them customizes the starter for your own app.npm run build:static to generate an SSG version in the out folder, though the README marks this as a deprecated build method.npm run build, deploy the .next output through the Vercel Platform with one click.The workflow is straightforward: clone the repository, create .env from .env.sample, replace the placeholder title and description strings in the codebase, resolve the // TODO: markers, and then add your own application logic. Local development is served by npm run dev on port 3000, and production builds run through npm run build.
build:static is described as a deprecated way to build the app.Yes, the starter is open source and hosted on GitHub at karpolan/nextjs-with-pages-mui-starter-ts. You can clone or download it without paying anything.
It uses the Pages Router. The README explicitly warns that App Router is now the winner and that this template could be deprecated in the future.
Find and replace the _TITLE_ and _DESCRIPTION_ placeholders in the files with your own text, as stated in the setup instructions.
The README recommends the Vercel Platform for deployment. Run npm run build to create the production bundle, then connect the repository to Vercel or use the provided deployment link.
build:static script for?It builds the SSG (static site generator) version of the app into the out folder. The README notes that this is a deprecated way to build a Next.js app.
