49 lines
2.0 KiB
Markdown
49 lines
2.0 KiB
Markdown
## MortgageFi DApp
|
||
|
||
This is the MortgageFi DApp frontend (Next.js App Router). The landing page is the DApp itself.
|
||
|
||
### First-time NFT scan and cache
|
||
|
||
- On first load (or after deleting cache), click the button: "Scan 12 more (ownerOf)" repeatedly until your NFTs are discovered and cached.
|
||
- The app stores results per chain and per ERC-721 contract in localStorage. If you add a new NFT later, click "Scan 12 more (ownerOf)" again to extend the cache.
|
||
- You can Reset (current wallet only) or Delete Local Cache (entire contract cache) from the Inputs panel.
|
||
|
||
### Paying another wallet's debt (Manual Wallet)
|
||
|
||
- To pay a different wallet’s debt (e.g., a multisig), enter its address into the "Manual Wallet" field. The app will scan and read using this wallet.
|
||
- Stablecoin balance and allowance checks still use your connected wallet for approvals and payments, but loan reads will target the manual wallet’s NFTs.
|
||
|
||
### Blockchain logs
|
||
|
||
- Verbose on-chain logs are printed to the browser console (scan, reads, and actions). Open DevTools → Console to view progress and diagnostics.
|
||
|
||
### Networks and presets
|
||
|
||
- Supported networks include Base and Arbitrum. Use the Network selector to switch.
|
||
- Presets are available per chain to quickly populate ERC-721 and Debt contract addresses (e.g., cbBTC–USDC, WETH–USDC, USDTO–WBTC).
|
||
|
||
### Development
|
||
|
||
```bash
|
||
npm install
|
||
npm run dev
|
||
# open http://localhost:3000
|
||
```
|
||
|
||
### Environment
|
||
|
||
- Set `NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID` in `.env.local` for WalletConnect.
|
||
|
||
### Deployment on Vercel
|
||
|
||
- Monorepo: set the project root to `mortgagefi-frontend/` in Vercel.
|
||
- Build command: `next build` (Turbopack is enabled by default via script).
|
||
- Environment vars: set `NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID` in Vercel.
|
||
|
||
#### Using Gitea with Vercel
|
||
|
||
- Vercel does not natively integrate with Gitea. Options:
|
||
- Mirror your Gitea repository to GitHub/GitLab/Bitbucket and connect that to Vercel.
|
||
- Or use the Vercel CLI to deploy from your local machine or CI pipeline.
|
||
|