# DriveTime Planner API (Slim 4)

## Setup

```bash
cd api
composer install
```

## Run

```bash
php -S localhost:8080 -t public/
```

## Routes

| Method | Path | Description |
|--------|------|-------------|
| POST | /api/v1/auth/login | Login (returns JWT) |
| POST | /api/v1/auth/logout | Logout |
| GET | /api/v1/auth/me | Current user |
| GET | /api/v1/bootstrap | Full app data |
| GET | /api/v1/students | List students |
| POST | /api/v1/students | Create student |
| PATCH | /api/v1/students/{id} | Update student |
| DELETE | /api/v1/students/{id} | Delete student |
| GET | /api/v1/instructors | List instructors |
| POST | /api/v1/instructors | Create instructor |
| PATCH | /api/v1/instructors/{id} | Update instructor |
| GET | /api/v1/appointments | List appointments |
| POST | /api/v1/appointments | Create appointment |
| PATCH | /api/v1/appointments/{id} | Update appointment |
| DELETE | /api/v1/appointments/{id} | Delete appointment |
| GET | /api/v1/lesson-types | List lesson types |
| GET | /api/v1/license-class-templates | List templates |

## Auth

JWT Bearer token in Authorization header.

## Database

PostgreSQL (configured in src/Config/Container.php)