Project Structure
A guide to the monorepo organization and key directories
Overview
The Cylend repository is organized as a monorepo containing the smart contracts, frontend, indexer, and backend service.
cylend-FE/ ├── contracts/ # Smart Contracts (Hardhat) │ ├── contracts/ # Solidity source │ │ ├── PrivateLendingIngress.sol │ │ └── LendingCore.sol │ └── scripts/ # Deployment scripts │ ├── cylend-indexer/ # Ponder Indexer │ ├── src/ # Event handlers & schema │ └── ponder.config.ts # Chain config │ ├── cylend-service/ # Backend Node.js Service │ └── src/ # Action processor logic │ ├── src/ # Next.js Frontend │ ├── app/ # App Router pages │ ├── components/ # React components │ ├── hooks/ # Custom hooks │ └── lib/ # Utilities & config │ └── cylend-docs/ # This documentation site
Frontend Directory (`src/`)
/app
Uses Next.js 14+ App Router. Each folder represents a route. Contains `page.tsx` and `layout.tsx`.
/components
Sharable UI components (buttons, dialogs) built with Radix UI and Tailwind CSS.
/hooks
Custom React hooks for business logic, including `useDeposit`, `useBorrow`, and Ponder data fetching.
/lib
Utility functions, Wagmi configuration, and Sapphire encryption helpers.