Proje: Okul Platform · Hub: Okul Platform — Architecture
Route Dosyaları
routes/api/ altında 6 dosya var:
| Dosya | Prefix | Auth | Açıklama |
|---|---|---|---|
auth.php | /api/ | throttle | Login, logout, register, OTP, şifre sıfırlama |
general.php | /api/ | optional/public | Herkese açık: okul ara, article, kampanya, config |
admin.php | /api/admin/ | sanctum (admin) | CRM panel endpoint’leri |
customer.php | /api/customer/ | sanctum (customer) | B2B okul portal endpoint’leri |
external-webhooks.php | /api/webhooks/ | — | Dış servis webhook’ları |
outsource.php | /api/ | özel | Dış bağlantı rotaları |
migration-webhooks.php | — | — | Migration webhook’ları |
Auth Middleware’leri
auth:sanctum— Login zorunluoptional.auth:sanctum— Login opsiyonel (içerik kişiselleştirme için)throttle:20,1— Login endpoint’i 1 dakikada max 20 istekthrottle:5,1— OTP ve register endpoint’leri 1 dk’da max 5 istek
Admin Route Örnekleri
GET/POST/PUT/DELETE /api/admin/schools
GET /api/admin/schools/churn-risky
GET/POST/PUT/DELETE /api/admin/checkouts
POST /api/admin/checkouts/calculate
POST /api/admin/checkouts/{id}/send-payment-link
POST /api/admin/checkouts/{id}/approve
POST /api/admin/checkouts/{id}/reject
POST /api/admin/call/b2b/forward
POST /api/admin/call/b2b/hangup
GET/POST/PUT/DELETE /api/admin/customer-users
GET/POST/PUT/DELETE /api/admin/articles
PATCH /api/admin/article-comments/{id}/approve
PATCH /api/admin/article-comments/{id}/reject
PATCH /api/admin/school-comments/{id}/approve
PATCH /api/admin/school-comments/{id}/reject
General Route Örnekleri
POST /api/login
POST /api/hash-login — Hash ile login (özel akış)
POST /api/otp — OTP gönder
POST /api/register
POST /api/forgot-password
POST /api/reset-password/{code}
GET /api/me — Auth: sanctum
PUT /api/me
GET /api/search/schools — optional auth
GET /api/articles
GET /api/school-comments
POST /api/school-comments/{id}/rate
POST /api/article-comments
GET /api/configs
GET /api/verification
POST /api/verification/{code}
Related
- api-tech-stack — framework ve bağımlılıklar
- api-auth-system — Sanctum, OTP, hash-login detayları