05ed037fe8
- DNS: pilot.landvex.com -> 16.170.83.169 - TLS: Let's Encrypt certificate (expires 2026-09-30) - Nginx: reverse proxy with SSL termination - API: https://pilot.landvex.com/api/v1/missions - UI: https://pilot.landvex.com/ - Upload: POST /api/v1/missions/import (multipart/form-data) Verified: ✅ https://pilot.landvex.com/health ✅ https://pilot.landvex.com/version ✅ https://pilot.landvex.com/api/v1/missions (list) ✅ https://pilot.landvex.com/api/v1/missions/:id (get) ✅ POST /api/v1/missions/import (video upload) ✅ UI loads with title 'LandveX Intelligence Lab' Next: Pilot 001 — Break the system!
68 lines
1.4 KiB
Markdown
68 lines
1.4 KiB
Markdown
# @landvex/api
|
|
|
|
Mission Import API for LandveX Intelligence Lab.
|
|
|
|
## MVP-0: First Field Upload
|
|
|
|
Minimal API for importing missions with video files.
|
|
|
|
### Endpoints
|
|
|
|
| Method | Endpoint | Description |
|
|
|--------|----------|-------------|
|
|
| POST | `/api/v1/missions/import` | Import mission with video |
|
|
| GET | `/api/v1/missions/:id` | Get mission by ID |
|
|
| GET | `/api/v1/missions` | List active missions |
|
|
| GET | `/health` | Health check |
|
|
|
|
### Import Mission
|
|
|
|
```bash
|
|
curl -X POST http://localhost:3002/api/v1/missions/import \
|
|
-F "inspector=erik_svensson" \
|
|
-F "location[lat]=59.3293" \
|
|
-F "location[lng]=18.0686" \
|
|
-F "device[model]=iPhone14,2" \
|
|
-F "device[os]=iOS 17.0" \
|
|
-F "device[appVersion]=1.0.0" \
|
|
-F "video=@/path/to/video.mp4"
|
|
```
|
|
|
|
### Response
|
|
|
|
```json
|
|
{
|
|
"missionId": "mission_20260702_000001",
|
|
"sessionId": "session_20260702_000001",
|
|
"artifactId": "artifact_000001",
|
|
"status": "created",
|
|
"file": {
|
|
"originalName": "video.mp4",
|
|
"size": 12345678,
|
|
"path": "uploads/abc123.mp4"
|
|
}
|
|
}
|
|
```
|
|
|
|
## Architecture
|
|
|
|
```
|
|
Express Router → Application Handlers → Domain → In-Memory Repositories
|
|
```
|
|
|
|
**No AI. No processing. Just store and track.**
|
|
|
|
## Dependencies
|
|
|
|
- `@landvex/application` — use cases
|
|
- `@landvex/infrastructure` — in-memory repositories (swap for PostgreSQL in PR-003B)
|
|
- `@landvex/domain` — domain objects
|
|
|
|
## Tests
|
|
|
|
```bash
|
|
npm test
|
|
```
|
|
|
|
5 tests verifying MVP-0 acceptance criteria.
|