Slim API deployment - composer install + full CRUD endpoints

This commit is contained in:
Hermes Agent
2026-05-20 14:36:05 +02:00
parent 48bf9c7088
commit 8ab4e532fd
1727 changed files with 7746 additions and 7 deletions

44
api/README.md Normal file
View File

@@ -0,0 +1,44 @@
# 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)