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

# Installation

> Apivalk is a lightweight, framework-agnostic REST API framework for PHP. It can be installed easily via Composer.

## Prerequisites

* **PHP**: 7.2 or higher.
* **Composer**: Dependency manager for PHP.

## Step-by-Step Installation

### 1. Require Apivalk via Composer

Run the following command in your project root:

```bash theme={null}
composer require apivalk/apivalk
```

### 2. Project Structure (Recommended)

While Apivalk is flexible, we recommend the following structure for your API:

```text theme={null}
src/
└── Http/
    └── Api/
        └── v1/
            └── Pet/
                ├── Controller/
                │   └── CreatePetController.php
                ├── Request/
                │   └── CreatePetRequest.php
                └── Response/
                    └── CreatePetResponse.php
```

### 3. Autoloading

Ensure your `composer.json` is configured to autoload your classes. For example:

```json theme={null}
{
    "autoload": {
        "psr-4": {
            "App\\": "src/"
        }
    }
}
```

After modifying `composer.json`, run:

```bash theme={null}
composer dump-autoload
```

## Next Steps

Once installed, proceed to the [Configuration](https://docs.apivalk.com/docs/configuration) guide to set up your API entry point.
