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

# Stratos API Modules for phpVMS

> Open-source phpVMS 7 modules that expose the Stratos VA API on your crew system — what they are, how they fit together, and what order to install them in.

If you're running **phpVMS 7** as your crew system, this is the easiest way to connect Stratos to it. We publish a set of free, open-source phpVMS modules that drop straight into your install and expose the API endpoints the Stratos desktop client expects. No bolt-on tables, no extra schemas — every endpoint reads and writes phpVMS-native data.

The modules are split by concern so you only install what you need. Right now there are two:

| Module                                                | Purpose                                                                                                                                                      | Repository                                                                                  |
| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------- |
| [**Stratos Core API**](/guide/stratos-api/core)       | Auth, pilot identity, reference data (aircraft / airports / news), and flight ops (start, update, complete, cancel). Required by every other Stratos module. | [SkyvexSoftware/stratos-core-api](https://github.com/SkyvexSoftware/stratos-core-api)       |
| [**Stratos Logbook API**](/guide/stratos-api/logbook) | Pilot's flight history — paginated list, single-PIREP detail with route and log timelines, and aggregate stats. Depends on Core.                             | [SkyvexSoftware/stratos-logbook-api](https://github.com/SkyvexSoftware/stratos-logbook-api) |

More are on the way (screenshots, awards, fleet management — driven by what VA admins ask for). Each lives in its own repo, ships its own `module.zip` artifact, and can be installed independently.

## What "module" means here

A phpVMS module is a self-contained PHP package that drops into your phpVMS install's `modules/` directory. It registers its own routes, controllers, and migrations alongside the phpVMS core without forking it. phpVMS 7 ships with the [nWidart/laravel-modules](https://nwidart.com/laravel-modules/) loader, which discovers modules on disk and activates them on demand.

Our modules follow this contract exactly. You install them via the phpVMS admin UI like any other module — no patches to phpVMS source, no overlay branches, no migration conflicts when you upgrade phpVMS itself.

## How they fit together

The Core API is the foundation. Every other Stratos module depends on it because:

* It defines the **Bearer-token auth middleware** (`Modules\StratosCore\Http\Middleware\StratosAuth`) that downstream modules reuse — pilots authenticate once with their phpVMS `api_key` and that authentication flows through every Stratos endpoint, regardless of which module owns it.
* It exposes the **flight lifecycle** endpoints (start, update, complete, cancel) that the Stratos desktop client uses to record flights into phpVMS's native `pireps` and `acars` tables.
* It declares the API base prefix (`/api/stratos`) and CORS headers that downstream modules extend.

The Logbook API mounts at `/api/stratos/logbook` and reuses Core's middleware. Future modules (screenshots, awards) will follow the same pattern — same prefix root, same auth, scope-specific endpoints under a subpath.

<Note>
  Each module declares its dependencies in its `module.json` via the `requires` field. If you try to enable Logbook without Core installed, phpVMS will tell you what's missing before booting.
</Note>

## Install order

Always install **Core first**, then any module you want on top:

<Steps>
  <Step title="Install Stratos Core API">
    Download the latest `module.zip` from the [Core API releases page](https://github.com/SkyvexSoftware/stratos-core-api/releases/latest) and upload it via your phpVMS admin's **Admin → Modules → Add New Module** page. Enable it, then clear caches.

    Full walkthrough: [Stratos Core API](/guide/stratos-api/core).
  </Step>

  <Step title="Install any add-on modules">
    With Core in place, repeat the same flow for each add-on you want — Logbook, screenshots, and so on. Each has its own page in this guide with module-specific install notes and what it adds.

    Currently available: [Stratos Logbook API](/guide/stratos-api/logbook).
  </Step>

  <Step title="Point your VA at the right base URL">
    On your Stratos airline page, set the **Stratos VA API base URL** to your phpVMS install plus `/api/stratos`. For example, if phpVMS lives at `https://crew.youva.com`, the base URL is `https://crew.youva.com/api/stratos`.

    The Core handshake endpoint at `GET /api/stratos` returns the module version and confirms the API is reachable — Skyvex pings it when you save the setting.
  </Step>
</Steps>

## Why open source

These modules are MIT-licensed and live in their own public repos under [SkyvexSoftware](https://github.com/SkyvexSoftware). A few reasons:

* **You can read the code.** Every endpoint is plain phpVMS-native PHP — no black box, no proprietary protocol, no obfuscation.
* **You can fork.** If your VA has a custom field, a non-standard PIREP shape, or wants to swap an endpoint for one your team maintains, fork the module and install your version. Stratos doesn't care which fork is serving the API.
* **You can contribute.** PRs against any of the repos are welcome. Bug fix, new field, performance improvement — open an issue or send a patch.

## Requirements

* **phpVMS 7** (the modules use phpVMS 7's Laravel 10 / nWidart Modules stack — they will not work on phpVMS 5/6 and won't run on the in-development phpVMS 8 branch yet)
* **PHP 8.2+** (matching phpVMS 7's own floor)
* **Admin access** to your phpVMS install — you need the **Add New Module** option in the admin sidebar

If you're not on phpVMS 7, the [VA Onboarding](/guide/va-onboarding) guide covers what your crew system needs to expose to Stratos directly. Anything that can implement the [Stratos VA API contract](/guide/va-onboarding) can connect — the phpVMS modules are just the easiest path.

## Next steps

* [Install Stratos Core API](/guide/stratos-api/core) — the required base
* [Install Stratos Logbook API](/guide/stratos-api/logbook) — add full flight history
