TD;DR
Instead of replicating steps below use GitHub template.
Install dependencies: yarn install
Run the server: yarn dev
Installations
- Install npx, yarn, update create-next-app
- Create next.js app
npx create-next-app my-app-name --typescript
cd my-app-name
3. Install Material UI
yarn add @mui/material @emotion/react @emotion/styled @emotion/server
4. Install Roboto font
yarn add @fontsource/roboto
5. Install Material Icons
yarn add @mui/icons-material
The Code ("src" folder)
Create utility
sub-folder.
Create theme
sub-folder.
Create components
sub-folder
Create file createEmotionCache.ts
:
Under theme
create index.ts
:
Under theme
sub-folder create base-theme-options.ts
:
Under theme
sub-folder create light-theme-options.ts
:
Under theme
subfolder create dark-theme-options.ts
:
Under pages
sub-folder update _document.tsx
file:
Under pages
sub-folder update _app.tsx
:
Under pages
sub-folder update index.tsx
:
Under root
folder create next.d.ts
: