Run the development server:
npm run dev
# or
yarn dev
Everything is standardized to Next JS with a few caveats:
- Styles are in the
styles
folder along with the MUI theme customizations for light and dark mode. The currenttheme
state is stored as a user cookie, defaulted todark
- A services folder exist for abstracting away API calls.
- A
components
folder exists for all abstracted components. - A
context
folder exists for the global react Context that is set in the first client component loaded after a page load.
You can run npx husky install
to install husky which should activate the pre-commit hook setup within .husky/pre-commit
More info on husky here
In old Next, we were able to provide and automatically set global state using pageProps passed through the _app.js file. In Next 13 we don't have that so the context has to be set at the top level client component per server route using the useEffect
hook with the page's props.
You should be able to import this repo into Vercel and have it deploy automatically. Also make sure you update the Vercel env variables - for the NEXT_PUBLIC_API_ENDPOINT_URL
make sure you change it from localhost:3000
to whatever the production URL for your vercel instance is. For example, https://next-mui-context-bp.vercel.app