Laravel 11 + React 18 · Multi-tenant SaaS · Hetzner VPS · ElevenLabs AI Çağrı · 16 Hafta MVP · Kaat Bilgi Teknolojileri tarafından geliştirilecek.
Laravel 11 backend, React 18 frontend, multi-tenant shared database stratejisi.
tenant_id sütunu taşır. Laravel'in Global Scope'u tüm sorguları otomatik filtreler. MVP için ideal — veri sızıntısı riski sıfır, bakımı kolay. URL yapısı: {klinik}.medicalai.com// App\Models\Traits\BelongsToTenant.php trait BelongsToTenant { protected static function booted(): void { static::addGlobalScope(new TenantScope()); static::creating(fn($m) => $m->tenant_id ??= auth()->user()->tenant_id); } } // Patient modeli örneği — tenant_id otomatik filtreli class Patient extends Model { use BelongsToTenant, SoftDeletes; protected $fillable = ['tenant_id', 'full_name', 'country', 'source_id']; }
medicalai/ ├── backend/ Laravel 11 — API + Queue + Scheduler ├── frontend/ React 18 — Klinik Admin Paneli ├── patient-portal/ React 18 — Hasta self-servis (5 dil) ├── mobile/ React Native — Koordinatör uygulaması ├── landing/ Next.js 14 — 3 tanıtım sitesi │ ├── medicalai-site/ │ ├── denistanbul-site/ │ └── urohealth-site/ ├── infra/ Docker Compose + Ansible └── docs/ API docs, ERD, wireframe
3 sunucu, Docker Compose, Caddy otomatik SSL. 5+ klinik için yeterli.
| Sunucu | Tip / RAM | Rol | Aylık | Kurulum |
|---|---|---|---|---|
| APP-01 | CPX21 / 4GB | Laravel API + Queue Worker + Redis | €7.49 | Docker Compose |
| DB-01 | CX32 / 8GB | MySQL 8 + MinIO dosya depolama | €11.90 | Docker + backup |
| WEB-01 | CPX11 / 2GB | Caddy + 3x Landing Sitesi | €3.89 | Caddy + static |
| TOPLAM — 3 Sunucu MVP | ~€23/ay | Firewall ücretsiz | ||
services: app: # Laravel PHP-FPM 8.3 queue: # Laravel Horizon (job worker) scheduler: # php artisan schedule:run (cron) redis: # Cache + Session + Queue broker meilisearch: # Hasta/lead arama motoru caddy: # Reverse proxy + otomatik SSL # DB-01 ayrı sunucuda — iç ağ bağlantısı # Hetzner Private Network: 10.0.0.x
name: Deploy to Production on: push: branches: [main] jobs: deploy: steps: - name: Run Tests run: php artisan test --parallel - name: Build Frontend run: npm ci && npm run build - name: Deploy via SSH run: | rsync -av . $SERVER:/var/www/medicalai/ ssh $SERVER "php artisan migrate --force \ && php artisan config:cache \ && php artisan queue:restart \ && docker compose restart app"
Her modülün özellik listesi. Faza tıklayarak filtrele.
tenants id, slug, name, plan, settings_json, created_at users id, tenant_id*, role, name, email, password, lang, 2fa_secret patients id, tenant_id*, full_name, dob, country, lang, phone, source_id, status, score leads id, tenant_id*, patient_id, source, utm_json, score, assigned_to, stage appointments id, tenant_id*, patient_id, type, datetime, doctor_id, room, status communications id, tenant_id*, patient_id, channel, direction, content, ai_summary documents id, tenant_id*, patient_id, type, path(minio), size, uploaded_by invoices id, tenant_id*, patient_id, amount_eur, amount_try, status, gov_md post_op_followups id, tenant_id*, patient_id, day_offset, pain_score, complication_flag campaigns id, tenant_id*, platform, budget, spend, leads_count, conversions call_logs id, tenant_id*, patient_id, elevenlabs_session_id, transcript, sentiment * tenant_id: Global Scope ile otomatik filtreli
Çağrı botu → webhook → CRM zinciri. Çok dilli sesli hasta koordinasyonu.
// routes/api.php Route::post('/call-completed', CallWebhookController::class); // CallWebhookController.php public function __invoke(Request $request): JsonResponse { $transcript = $request->input('transcript'); $metadata = $request->input('metadata'); // GPT-4o ile özet çıkar $summary = OpenAI::chat()->create([ 'model' => 'gpt-4o', 'messages' => [ ['role' => 'system', 'content' => 'Transkriptten anahtar bilgileri çıkar: hastalık, ülke, tarih tercihi, bütçe'], ['role' => 'user', 'content' => $transcript], ], ]); // CRM'e lead oluştur $lead = Lead::create([ 'source' => 'elevenlabs', 'ai_summary' => $summary, 'score' => LeadScorer::calculate($summary), ]); // Koordinatöre anlık bildirim $lead->coordinator->notify(new NewLeadNotification($lead)); }
2 kişi: Senior Dev + Atıl. Haftalık sprint. GitHub Projects ile takip.
| Sprint | Modül | Görevler | Süre | Kim |
|---|---|---|---|---|
| FAZ 1 — Temel Altyapı (Haftalar 1–4) | ||||
| S1 H1–2 | Altyapı Kurulum | Hetzner sunucular, Docker Compose, Caddy SSL, GitHub repo + Actions CI/CD, domain DNS | 2 hafta | Atıl |
| S1 H3–4 | Auth & Tenant | Multi-tenant Global Scope, JWT auth, roller, onboarding flow, subdomain yönlendirme | 2 hafta | Senior Dev |
| FAZ 1 — Core CRM (Haftalar 5–8) | ||||
| S2 H5–6 | Hasta CRM | Hasta CRUD, MinIO dosya yükleme, lead pipeline (kanban), kaynak takibi, Meilisearch | 2 hafta | Senior Dev |
| S2 H7–8 | İletişim Merkezi | WhatsApp Business API, e-posta (Resend), SMS (Twilio), unified inbox, şablon sistemi | 2 hafta | Atıl + Junior |
| FAZ 1 — Takvim, Ödeme, Post-op (Haftalar 9–12) | ||||
| S3 H9–10 | Takvim & Randevu | Ameliyat takvimi, Jitsi video görüşme, hatırlatma job'ları, iCal export | 2 hafta | Junior Dev |
| S3 H11–12 | Ödeme & E-fatura | Teklif PDF, ödeme takibi, GİB e-fatura, Md.11/27/41 etiketleme, DYS CSV export | 2 hafta | Atıl |
| FAZ 1 — AI, Web Siteleri, Launch (Haftalar 13–16) | ||||
| S4 H13–14 | ElevenLabs + GPT | ElevenLabs webhook entegrasyonu, GPT-4o lead skorlama, otomatik çeviri, çağrı özeti | 2 hafta | Senior Dev |
| S4 H15 | Web Siteleri | 3 Next.js site: medai + denistanbul + urohealth. Çok dilli, SEO, ElevenLabs widget, form → CRM | 1 hafta | Atıl + Junior |
| S4 H16 | 🚀 Launch | E2E testler, Sentry kurulum, UptimeRobot, performans optimizasyonu, ilk klinik onboarding | 1 hafta | Tüm Ekip |
Geliştirme maliyeti TÜSEB hibesiyle karşılanır. Altyapı ~€23/ay'dan başlar.
Sağlık verisi özel kategori. Her katmanda güvenlik.
| Risk | Olasılık | Etki | Azaltma Stratejisi |
|---|---|---|---|
| Devlet destek oranları düşer | Orta | Orta | İş modeli desteğsiz de kârlı. Danışman ile oranları takip et. |
| AI lead motor dönüşümü düşük | Orta | Yüksek | Manuel + Google Ads ile başla. AI kanıtlandıkça devreye al. |
| UroHealth hukuki yapısı gecikmesi | Yüksek | Yüksek | Nisan toplantısında netleştir. Avukat hazır olsun. |
| GDPR — Almanya veri ihlali | Düşük | Yüksek | Hukuki danışman, veri işleme açık rıza, şifreli saklama. |
| Kur riski (€/TL) | Yüksek | Düşük | Gelir € — gider TL. TL zayıflaması avantaj. |
Tamamlananları işaretle. İlerlemeyi takip et.