원클릭으로
mobile-shim
Mobile API surface (v3 only), removed legacy endpoints, and the v5-native tag format for mobile clients.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Mobile API surface (v3 only), removed legacy endpoints, and the v5-native tag format for mobile clients.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Photo upload, tagging, verification status, summary generation, XP calculation, AddTagsToPhotoAction, UploadPhotoController, and the VerificationStatus enum.
OpenLitterMap v5 architecture reference. Use this skill whenever working on OLM backend code, Laravel controllers, services, events, tests, Redis, metrics, tags, photos, teams, admin, leaderboards, or any part of the OpenLitterMap codebase. Also trigger when the user mentions MetricsService, VerificationStatus, PhotoTags, AddTagsToPhotoAction, TagsVerifiedByAdmin, rewardXpToAdmin, school pipeline, teacher approval, clustering, or any OLM-specific concept. This skill should be used BEFORE writing any OLM code to avoid architectural mistakes. When in doubt about OLM patterns, read this skill.
ProfileController, ApiSettingsController, DeleteAccountController, user stats (Redis + MySQL fallback), LevelService, privacy toggles, account deletion with Redis cleanup, and the Profile Vue page.
REST API endpoints, route structure, auth guards, request/response contracts, error patterns, and the full API surface for web SPA and mobile clients.
PhotoTag, PhotoTagExtraTags, categories, litter objects, materials, brands, ClassifyTagsService, GeneratePhotoSummaryService, tag migration, and the v4-to-v5 conversion.
The olm:v5 migration script, UpdateTagsService, batch processing, migrated_at, ClassifyTagsService deprecated mappings, and data migration from v4 category tables.
| name | mobile-shim |
| description | Mobile API surface (v3 only), removed legacy endpoints, and the v5-native tag format for mobile clients. |
All legacy v1/v2/v4 mobile endpoints and the ConvertV4TagsAction shim have been removed (2026-03-01). The mobile app uses v3 endpoints exclusively.
app/Http/Controllers/Uploads/UploadPhotoController.php — v3 upload (EXIF-based)app/Http/Controllers/API/Tags/PhotoTagsController.php — v3 tag CRUD (CLO format)app/Http/Controllers/User/Photos/UsersUploadsController.php — v3 user photos listingapp/Http/Controllers/Auth/AuthTokenController.php — Mobile token login (Sanctum)readme/Mobile.md — Mobile documentation| Action | Method | Endpoint |
|---|---|---|
| Auth (token) | POST | /api/auth/token |
| Validate token | POST | /api/validate-token |
| Upload photo | POST | /api/v3/upload |
| Add tags | POST | /api/v3/tags |
| Replace tags | PUT | /api/v3/tags |
| List photos | GET | /api/v3/user/photos |
| Photo stats | GET | /api/v3/user/photos/stats |
| Delete photo | POST | /api/profile/photos/delete (body: { "photoid": 123 }) |
| Tag catalog | GET | /api/tags/all |
| Profile | GET | /api/user/profile/index |
| Global stats | GET | /api/global/stats-data (no auth) |
| Levels | GET | /api/levels (no auth) |
POST /api/v3/upload supports two modes:
photo required. GPS + datetime from EXIF.lat + lon + date alongside photo. All three must be present. EXIF validation skipped. Platform set to 'mobile'.Optional fields: picked_up (boolean, overrides user default), model (string, device name).
Date accepts Unix timestamp (seconds) or ISO 8601 string. (0, 0) coordinates rejected.
GET /api/v3/user/photos?tagged=false&per_page=100 — fetches untagged photos. per_page default 8, max 100.
POST /api/auth/token returns a Bearer token. All subsequent requests include Authorization: Bearer <token>.identifier field for login. AuthTokenController accepts identifier, email, or username for backward compatibility.category_litter_object_id + optional litter_object_type_id, not category/object string pairs.picked_up not remaining. Photo responses include picked_up (boolean, never null) and remaining (deprecated, inverse). Per-tag picked_up in new_tags[] is nullable (true/false/null). The remaining column will be removed after the v5 migration script runs.photoid (lowercase, no underscore). POST /api/profile/photos/delete body: { "photoid": 123 }. Response: { "message": "Photo deleted successfully!" }.{
"photo_id": 123,
"tags": [
{
"category_litter_object_id": 42,
"litter_object_type_id": 3,
"quantity": 2,
"picked_up": true,
"materials": [{ "id": 1, "quantity": 1 }],
"brands": [{ "id": 5, "quantity": 1 }]
}
]
}
GET /api/tags/all returns 7 flat collections. Mobile must join them:
category_objects[].id = cloIdcategory_object_types → types for display namesPOST /api/photos/submit (and all aliases)POST /api/add-tagsPOST /api/v2/add-tags-to-uploaded-imageGET /api/v2/photos/get-untagged-uploadsGET /api/v2/photos/web/*DELETE /api/photos/deletePOST /api/uploadGET /api/user (closure), GET /api/current-userapp/Actions/Tags/ConvertV4TagsAction.php — v4→v5 conversion shim (no longer needed)app/Http/Controllers/ApiPhotosController.php — legacy mobile upload/deleteapp/Http/Controllers/API/AddTagsToUploadedImageController.php — legacy mobile taggingapp/Http/Controllers/API/GetUntaggedUploadController.php — legacy untagged photos listSee MOBILE_API_CHANGES.md at the project root for the full RN v7 change log.
Key notes:
filename field is a full URL — usable directly as an image source (no base URL prefix needed)new_tags response includes category, object, type, extra_tags, picked_up (bool). For loose tags (extra-tag-only), category, object, and category_litter_object_id may be null.PUT /api/v3/tags — same CLO format. Accepts empty tags: [] to clear all tags.picked_up cast to (bool) with fallback to photo-level picked_up{ smoking: { butts: 3 } } is no longer accepted. Use CLO format.POST /api/photos/submit no longer exists. Use POST /api/v3/upload.DELETE /api/photos/delete no longer exists. Use POST /api/profile/photos/delete./api/tags/all. The 7 flat collections must be joined client-side.filename with a base URL. The filename field is already a full URL — using it with a prefix produces a broken double-URL.