# Installation

## Prerequisites

| Requirement    | Version | Notes                                    |
| -------------- | ------- | ---------------------------------------- |
| Node.js        | 18+     | LTS recommended                          |
| npm            | 8+      | Included with Node.js                    |
| QVAC runtime   | latest  | Local AI inference server (Qwen3 models) |
| Phantom Wallet | latest  | Browser extension for Solana             |
| Git            | any     | For cloning the repo                     |

***

## 1. Clone the Repository

```bash
git clone https://github.com/DivaManik/ContractGuardAI.git
cd ContractGuardAI/frontend
```

## 2. Install Dependencies

```bash
npm install
```

This installs:

* `next` 14
* `@solana/web3.js`, `@solana/wallet-adapter-*`
* `@anchor-lang/core`
* `@qvac/sdk`
* `pdf-parse`
* TypeScript + TailwindCSS dev tools

## 3. Set Up the QVAC Runtime

ContractGuard uses the **QVAC SDK** (`@qvac/sdk`) for all AI inference. The QVAC local inference server must be running before starting the app.

1. Install and start the QVAC local runtime (refer to QVAC SDK documentation)
2. Verify it is accessible at the expected endpoint
3. Set `QVAC_MODEL_DEFAULT` in `.env.local` to your preferred model tier (`fast`, `smart`, or `best`)

> **No external AI API key is needed.** All inference is local.

## 4. Verify Installation

```bash
# Check Node.js
node --version     # should be v18+

# Check npm
npm --version

# Check wallet extension
# Open your browser — Phantom extension should be visible
```

***

## Next Step

Configure your environment variables → [Configuration](/contractguard-ai-docs/getting-started/configuration.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://contractguard-ai.gitbook.io/contractguard-ai-docs/getting-started/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
