This is a Next.js project bootstrapped with create-next-app.
Install Volta - https://volta.sh/
It recommend to install and use Volta with all Brewlabs projects. This ensures we are all using the same NPM and Node versions. When Volta is installed the correct version of NPM and Node is automatically changed when working within the codebase. The versions are configured in the package.json
When pulling down for the first time or when new features have been merged you may need to install the node modules again.
npm iTo run the development server:
npm run devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying pages/index.tsx. The page auto-updates as you edit the file.
API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts.
The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.
Tailwind is used to write utility based CSS.
We use Daisy UI to extend Tailwind and make use of components quickly
wagmi is a collection of React Hooks containing everything you need to start working with Ethereum.
For managing global state please use React Hooks Global State module.
This should be sufficient for out needs.
To maintain global state we use React Hooks Global State package. See https://github.com/brewlabs-code/brewlabs-earn/blob/main/state/index.ts
We use GIT Flow as a branching model. Please name branches using the following prefixes:
- bug
- feature
- hot (hot-fix)
This repo is configured to auto deploy from Netlify. Once out of development we will have tighter rules around deployment to production and how to push to a staging environment that can be used to QA work.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!