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

# Quickstart

> Generate and browse your Laravel API documentation in under two minutes.

## 1. Verify Default Configuration

By default, Geni inspects:

* **Routes**: Routes matching the `api` prefix (e.g., `/api/*`).
* **Migrations**: Files inside `database_path('migrations')`.
* **Docs Portal**: Served at `/docs/api` (gated to `local` environment).
* **JSON Specification**: Served at `/docs/api.json`.

You can modify these settings anytime in `config/geni.php`.

## 2. Browse the Documentation Portal

Start your local Laravel server:

```bash theme={null}
php artisan serve
```

Visit the documentation portal in your browser:

```
http://localhost:8000/docs/api
```

You will see an interactive documentation portal rendered with syntax highlighting, search, and a Try It console.

<Frame>
  <img src="https://raw.githubusercontent.com/masitings/geni-api/main/.github/assets/screenshot.jpg" alt="Geni Documentation Portal" />
</Frame>

## 3. Export OpenAPI Specification

To export a static OpenAPI 3.1.0 JSON file to your project root or public directory:

```bash theme={null}
php artisan geni:export --path=openapi.json
```

Output:

```text theme={null}
Exported OpenAPI 3.1.0 specification for [default] to openapi.json
```

## 4. Run CI Drift Detection

Add a drift check step to your CI pipeline to ensure OpenAPI documentation never goes out of sync with your code:

```bash theme={null}
php artisan geni:check --path=openapi.json
```

If any routes, parameters, or schemas have changed since `openapi.json` was committed, the command exits with code 1 and prints a human-readable diff.

<Callout type="success">
  Congratulations! You now have automated, static-analysis API documentation set up in your Laravel application.
</Callout>
