> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pulend.art/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick Start

> Set up Pulend locally in minutes

## Prerequisites

<Info>
  **Required tools:** - Node.js 18+ and pnpm - Foundry (for contracts) - Redis
  (for backend caching) - Docker (optional, for indexer)
</Info>

## Clone the Repository

```bash theme={null}
git clone https://github.com/your-org/pulend.git
cd pulend
```

## Setup Components

<Steps>
  <Step title="Smart Contracts">
    ```bash theme={null}
    cd contracts
    forge install
    forge build
    ```

    Deploy to Arbitrum Sepolia:

    ```bash theme={null}
    forge script script/Deploy.s.sol --rpc-url $ARBITRUM_SEPOLIA_RPC --broadcast
    ```
  </Step>

  <Step title="Backend">
    ````bash cd backend pnpm install cp .env.example .env # Edit .env with your theme={null}
    RPC_URL and REDIS settings pnpm dev ``` The API runs on
    `http://localhost:3001`.
    </Step>

    <Step title="Frontend">
    ```bash cd frontend pnpm install cp .env.example .env # Edit .env with
    contract addresses pnpm dev ``` Open `http://localhost:3000` in your browser.
    </Step>

    <Step title="Indexer (Optional)">
    ```bash
    cd indexer
    yarn install
    yarn codegen
    yarn build
    docker-compose up -d  # Start local Graph node
    yarn deploy-local
    ````
  </Step>
</Steps>

## Environment Variables

### Backend `.env`

```env theme={null}
PORT=3001
RPC_URL=https://sepolia-rollup.arbitrum.io/rpc
REDIS_HOST=localhost
REDIS_PORT=6379
PRICE_CACHE_TTL=60
```

### Frontend `.env`

```env theme={null}
NEXT_PUBLIC_LENDING_POOL_ADDRESS=0x...
NEXT_PUBLIC_COLLATERAL_NFT_ADDRESS=0x...
NEXT_PUBLIC_BACKEND_URL=http://localhost:3001
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Architecture" icon="sitemap" href="/architecture">
    Understand the system design.
  </Card>

  <Card title="Smart Contracts" icon="file-code" href="/contracts">
    Explore the contract interfaces.
  </Card>
</CardGroup>
