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

# Frontend Developer Cheat Sheet

> Common Bazable workflows for frontend developers

## First-time setup

<Steps>
  <Step title="Install the CLI">
    ```bash theme={null}
    npm install -g bazable-api
    ```
  </Step>

  <Step title="Initialize and extract">
    ```bash theme={null}
    cd your-frontend
    bazable init
    bazable extract --payloads
    ```

    Discovers all APIs and request schemas from your code.
  </Step>

  <Step title="Validate and enforce">
    ```bash theme={null}
    bazable inspect
    bazable test --mock --all
    bazable hook
    ```

    Checks violations, mock-tests every endpoint, and blocks broken contracts before push.
  </Step>
</Steps>

## Daily workflow

```bash theme={null}
bazable sync                        # get latest contract from backend
bazable inspect                     # validate code against contract
bazable test --all --token <token>  # test against real API
```

## When the backend changes

```bash theme={null}
bazable sync                        # pull updated contract
bazable inspect --fix               # auto-fix type mismatches in your code
bazable serve                       # start mock server with new contract
```

## AI features

```bash theme={null}
bazable explain POST https://api.example.com/v1/users   # plain-English endpoint explanation
bazable propose "Add phone field"                       # let AI suggest a contract change
bazable accept 1691501234567                            # approve a pending proposal
```

## Handy options

| Shortcut | Full flag | Purpose |
| - | - | - |
| `bazable extract -r` | `--payloads` | Infer request payloads. |
| `bazable inspect -f` | `--fix` | Auto-fix type mismatches. |
| `bazable test -a -k` | `--all --mock` | Mock-test every endpoint. |
| `bazable ui` | — | Open the visual dashboard. |

<Tip>
  See the [Backend cheat sheet](/cheat-sheets/backend) for the API-side workflow.
</Tip>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.