From 54e8ba508d38b8549cf5ed8387afdf38d4dda322 Mon Sep 17 00:00:00 2001 From: MAC Date: Mon, 4 May 2026 23:03:17 +0100 Subject: [PATCH 1/2] documentation for readme --- doc/README.md | 48 ++++++++++++++---------------------------------- 1 file changed, 14 insertions(+), 34 deletions(-) diff --git a/doc/README.md b/doc/README.md index 6d11a40..7ddbaaa 100644 --- a/doc/README.md +++ b/doc/README.md @@ -6,37 +6,17 @@ YieldSafe is a non-custodial DeFi savings application that lets users deposit US ## Documentation Index -| Document | Description | -|----------|-------------| -| [Setup Guide](./setup.md) | Installation, environment variables, and local dev | -| [Architecture Overview](./architecture.md) | System design, diagrams, component hierarchy | -| [Folder Structure](./folder-structure.md) | Every directory and file explained | -| [Smart Contract Integration](./smart-contracts.md) | ABI reference, addresses, function signatures | -| [Hooks Reference](./hooks.md) | All 16 custom hooks: purpose, params, return values | -| [Component Reference](./components.md) | All components: props, responsibilities, dependencies | -| [Wallet Connect Flow](./flows/wallet-connect.md) | AppKit setup, connection lifecycle | -| [Deposit Flow](./flows/deposit.md) | Approve + Deposit end-to-end | -| [Withdraw Flow](./flows/withdraw.md) | Share redemption end-to-end | -| [Token Approval Flow](./flows/token-approval.md) | ERC20 allowance pattern | -| [Deployment Guide](./deployment.md) | Vercel, environment setup, production checklist | -| [Troubleshooting](./troubleshooting.md) | Common errors and fixes | - ---- - -## Quick Reference - -**Network:** Base Sepolia (Chain ID `84532`) - -**Core Contracts:** -- `YieldSaveVault` — main vault (address via `NEXT_PUBLIC_YIELD_SAVE_CONTRACT_ADDRESS`) -- `USDC` — ERC-20 token (address via `NEXT_PUBLIC_USDC_CONTRACT_ADDRESS`) - -**Primary User Flows:** -1. Connect Wallet → Deposit USDC → Earn Yield → Withdraw USDC + Yield -2. Fee: 5% on yield only (not principal), deducted at withdrawal - -**Key Stack:** -- Next.js 16 + React 19 (App Router) -- Reown AppKit (formerly WalletConnect) for wallet connection -- ethers.js v6 for contract interaction -- Tailwind CSS v4 with dark/light theming +| Document | Description | +| ---------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| [Setup Guide](./setup.md) | Clone the repo, install dependencies, configure env vars, and run the app locally | +| [Architecture Overview](./architecture.md) | System design, component hierarchy, data flow diagrams, and deployment topology | +| [Folder Structure](./folder-structure.md) | Every directory and file explained — what it does, what it exports, and why it exists | +| [Smart Contract Integration](./smart-contracts.md) | ABI reference, function signatures, events, custom errors, and read vs write paths | +| [Hooks Reference](./hooks.md) | All 16 custom hooks — purpose, parameters, return values, and full dependency tree | +| [Component Reference](./components.md) | Every component — props, responsibilities, hooks used, and top-level data flow | +| [Wallet Connect Flow](./flows/wallet-connect.md) | AppKit initialisation, connection lifecycle, hooks used, and disconnection handling | +| [Deposit Flow](./flows/deposit.md) | Approve and deposit end-to-end — flow diagram, on-chain execution, and error handling | +| [Withdraw Flow](./flows/withdraw.md) | Redeem shares for USDC — flow diagram, fee calculation, preview, and error handling | +| [Token Approval Flow](./flows/token-approval.md) | Why ERC-20 approval is required, the exact code path, and allowance check logic | +| [Deployment Guide](./deployment.md) | Deploy to Vercel, set env vars, production checklist, contract upgrades, and rollback | +| [Troubleshooting](./troubleshooting.md) | 20+ common errors with root causes, fixes, and guidance on where to get further help | From 30d33ff9a3612b695e1f1f232d739b3addede2e2 Mon Sep 17 00:00:00 2001 From: MAC Date: Tue, 5 May 2026 04:43:59 +0100 Subject: [PATCH 2/2] documentation update on read me --- README.md | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 README.md diff --git a/README.md b/README.md deleted file mode 100644 index e215bc4..0000000 --- a/README.md +++ /dev/null @@ -1,36 +0,0 @@ -This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). - -## Getting Started - -First, run the development server: - -```bash -npm run dev -# or -yarn dev -# or -pnpm dev -# or -bun dev -``` - -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. - -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. - -This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. - -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! - -## Deploy on Vercel - -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.