This is a Nx repo to build a full-stack dApp with Next.js and Solidity. Main repo is next-gb
for the full-stack app and hardhat-gb
for Ethereum development. Other repos are for testing.
Technologies used in the app is:
Frontend
- Next.js
- Wagmi
- siwe (SIWE message management).
- iron-session (anonymous session management).
- Next UI for react components.
- Tailwind CSS.
Backend
- Next.js
- iron-session (anonymous session management).
- Auth.js (authentication & authorised session management).
- Drizzle ORM
Infrastructure
- Nx for monorepo management.
- Hardhat for contract development.
- Turso for cloud sqlite database
- Alchemy for Ethereum testnet
- Vercel for deployment.
Authentication and API flow diagram:
Another diagram for SSO flow:
How application works:
You need an account for Turso (for database), Alchemy (for testnet), and ethereum wallet (e.g. Metamask, Coinbase Wallet etc). Make sure to add .env
in apps/next-gb
and fill all the values from .env.example
.
# for next js
yarn install
yarn nx dev # start app
yarn dev:node # start local ethereum node
yarn nx compile hardhat-gb
yarn nx test hardhat-gb
yarn nx deploy:character hardhat-gb # deploy to the local node
yarn nx deploy:character:alchemy-sepolia hardhat-gb # deploy to alchemy testnet