Slim API deployment - composer install + full CRUD endpoints
This commit is contained in:
44
api/README.md
Normal file
44
api/README.md
Normal 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)
|
||||
Reference in New Issue
Block a user