ConsTech360
Sistem Mimari Dokümanı
Türkiye'nin ilk inşaat+lojistik+mali işler+saha operasyonu birleşik ERP platformu. 54 fonksiyonel modül, mikro-servis mimarisi, mobil-öncelikli tasarım, AI destekli analitik ve AB Yeşil Mutabakatı (SKDM) uyumlu karbon ayak izi motoru.
Yönetici Özeti
ConsTech360, inşaat firmalarının saha operasyonları, mali işler, lojistik ve teknik ofis süreçlerini tek bir SaaS platformunda birleştiren, Türkiye pazarı için özel olarak tasarlanmış bir ERP çözümüdür.
Türkiye'deki inşaat firmaları halen WhatsApp grupları, 15+ ayrı Excel dosyası, manuel Luca girişleri ve 2 saatlik günlük raporlar ile operasyonlarını yönetiyor. ConsTech360 bu kaosu tek bir dijital platformda birleştirerek veri kaçaklarını, yakıt hırsızlıklarını, bütçe aşımlarını ve ihale kaçırmalarını önler.
🎯 Stratejik Farklılaştırıcılar
| Özellik | Rakip Durumu | ConsTech360 |
|---|---|---|
| Türkçe Uyum (Luca, Uyumsoft, EKAP) | Yok ya da kısmi | Tam entegrasyon + otomatik eşleşme |
| Yakıt Anti-Fraud (SoD) | Yok | Görevler Ayrılığı + AI anomali tespiti |
| Karbon Ayak İzi (SKDM uyumlu) | Yok | EPD bazlı + AB Yeşil Mutabakatı raporu |
| Mobil-Öncelikli Saha Uygulaması | Web'e yama | Offline-first, QR, geofence, OCR |
| AI Destekli İçgörüler | Statik raporlar | GPT-5 + Prophet projeksiyon + chat |
| RBAC + ABAC | Temel rol | Hibrit · kullanıcı bazlı override |
| Multi-tenant SaaS | Tek şirket | Şirket × proje × şantiye hiyerarşisi |
Ürün Vizyonu & Kapsam
"Bir inşaat firmasının yönetim kurulu başkanı, sabah 08:00'de kahvaltısını yaparken telefonundan tüm şantiyelerinin durumunu — bütçe, ilerleme, finansal risk, karbon ayak izi — tek bakışta görebilir ve Türker Bey'e 'Urla'ya git' diye WhatsApp yazmak yerine sistemden görev ataması yapabilir."
🎯 Vizyon İfadesi
Türkiye'deki orta ve büyük ölçekli inşaat firmalarının %25'inin tercih ettiği, AB Yeşil Mutabakatı gerekliliklerini eksiksiz karşılayan, mobil-öncelikli, AI destekli birleşik ERP platformu olmak.
📐 Kapsam (In-Scope)
- ✓ 54 fonksiyonel modül (Saha, Mali, Teknik, Ar-Ge)
- ✓ iOS + Android mobil uygulamalar
- ✓ Web yönetim paneli (yönetici + muhasebe)
- ✓ Müşteri portalı (işveren erişimi)
- ✓ Luca, Uyumsoft, EKAP, Kommo CRM entegrasyonu
- ✓ KEP (Kayıtlı E-Posta) arşivi
- ✓ Çoklu-kiracı (multi-tenant) mimari
- ✓ AI destekli raporlar ve chat
- ✕ BIM modelleme (Revit, Tekla benzeri CAD)
- ✕ E-ticaret mağaza (malzeme satışı)
- ✕ IoT donanım üretimi (sensörler)
- ✕ Konut/daire satış portali (emlak)
- ✕ Kripto/blockchain tabanlı sözleşme
- ✕ Bordro hesaplama motoru (3. taraf kullanılır)
- ✕ Banka hesap açma/kapama API
- ✕ AR/VR saha gezintisi
🎭 Kullanıcı Personaları
| Persona | Rol | Birincil Cihaz | Kullanım Sıklığı | Kritik İhtiyaç |
|---|---|---|---|---|
| Yüksel Bey | CEO / YKB | Web + Mobil | Günde 4-6 kez | Tek bakışta karar verebilecek veri |
| Özgür Bey | Mali İşler Direktörü | Web (yoğun) | Gün boyu | Nakit akış + çek + hakediş analizi |
| Türker Bey | Teknik Direktör | Web + Mobil | Gün boyu | İhale takip + saha kontrol + BOM |
| Sezen, Esra, Elif | Muhasebe Personeli | Web (masa başı) | 8 saat iş | Fatura işleme + puantaj + SGK |
| Mehmet Kaya | Şantiye Formen | Sadece mobil | Sahada tüm gün | Hızlı, offline, basit arayüz |
| Burakcan, Doğacan | Ofis Mühendisi | Web + CAD | 8 saat iş | BOM, keşif, dokümanlar |
| Özdemir Tesisat vb. | Taşeron | Sadece mobil | Haftada 1-2 | Görev kabul + puantaj + hakediş |
| Urla Teknopark vb. | Müşteri (İşveren) | Web (sınırlı) | Haftada 1 | Proje ilerleme + şeffaflık |
Temel Metrikler & Başarı Kriterleri
Ürünün başarısı ölçülebilir olmalı. Aşağıdaki 4 kategoride her metrik için hedef değer, ölçüm yöntemi ve responsible person tanımlıdır.
📊 Ürün Metrikleri (KPI)
| Metrik | Hedef | Ölçüm Yöntemi | Frekans |
|---|---|---|---|
| Günlük Aktif Kullanıcı (DAU) | ≥ 85% kayıtlı | Segment analytics | Gerçek zamanlı |
| Mobil Kullanım Oranı | ≥ 70% oturum | Firebase Analytics | Günlük |
| Özellik Benimseme (Adoption) | ≥ 60% / özellik | Kullanım logları | Haftalık |
| Ortalama Oturum Süresi | ≥ 12 dk (web), ≥ 4 dk (mobil) | Analytics | Günlük |
| NPS (Net Promoter Score) | ≥ 50 | Anket (3 ayda bir) | 3 ayda |
⚡ Teknik Performans Metrikleri
| Metrik | Hedef SLA | Ölçüm Aracı |
|---|---|---|
| API Response Time (p95) | < 250 ms | Datadog APM |
| Dashboard Cold Start | < 1.8 sn | Lighthouse CI |
| Mobil Cold Start (iOS) | < 1.5 sn | Firebase Performance |
| Mobil Cold Start (Android) | < 1.8 sn | Firebase Performance |
| Uptime SLA | ≥ 99.9% (43 dk/ay) | Pingdom + Grafana |
| DB Query p99 | < 100 ms | PostgreSQL slow log |
| Realtime Lag (SignalR) | < 300 ms | Azure SignalR metrics |
| Push Notification Teslim | ≥ 98% | Firebase + OneSignal |
💰 İş Metrikleri
Sistem Mimarisi
ConsTech360 Modüler Monolit → Mikroservis yaklaşımıyla tasarlanmıştır. V1'de (ilk 12 ay) modüler monolit olarak geliştirilir, V2'den itibaren yoğun trafik alan modüller (Yakıt Radarı, AI Raporlar, Karbon Microservice) ayrılır.
🏛️ 6 Katmanlı Mimari (Layered Architecture)
Next.js 14 (Web) React Native 0.74 (iOS + Android) Expo SDK 51 PWA
Kong / AWS API Gateway Rate limiting JWT validation Request logging
.NET 9 (C#) NestJS (Node.js TS) Python 3.12 (AI/ML) Go (yüksek perf: Karbon)
RabbitMQ Redis Pub/Sub SignalR (WebSocket)
PostgreSQL 16 + PostGIS Redis 7 (cache) MinIO / S3 (dosya) ElasticSearch (arama) TimescaleDB (telemetri)
Kubernetes (k3s başta, EKS sonra) Docker Terraform GitHub Actions (CI/CD) Grafana + Prometheus
🔲 Mikro-Servis Haritası (14 Servis)
┌─────────────────────────────────────────────────────────────────────┐
│ API GATEWAY (Kong) │
│ JWT • Rate Limit • Routing • Logging │
└──────┬──────────┬──────────┬──────────┬──────────┬──────────┬───────┘
│ │ │ │ │ │
┌──────▼──────┐ ┌─▼────────┐ ┌─▼───────┐ ┌────▼───┐ ┌────▼────┐ ┌─▼──────┐
│ Identity │ │ Projects │ │ Finance │ │ HR │ │ Tenders │ │Documents│
│ (.NET 9) │ │ (.NET) │ │ (.NET) │ │ (Nest) │ │ (Nest) │ │ (Nest) │
│ │ │ │ │ │ │ │ │ │ │ │
│ ▸ RBAC │ │ ▸ Sites │ │ ▸ Check │ │ ▸ Pers │ │ ▸ EKAP │ │ ▸ V1/V2 │
│ ▸ Auth │ │ ▸ Contr │ │ ▸ Flow │ │ ▸ Paym │ │ ▸ Bids │ │ ▸ OCR │
│ ▸ Audit │ │ ▸ BOM │ │ ▸ Haked │ │ ▸ Leave│ │ ▸ Template │ │ │
└──────┬──────┘ └────┬─────┘ └────┬────┘ └───┬────┘ └────┬────┘ └──┬─────┘
│ │ │ │ │ │
┌──────▼──────┐ ┌────▼─────┐ ┌────▼─────┐ ┌──▼─────┐ ┌──▼──────┐ ┌▼───────┐
│ Inventory │ │ Fleet │ │ Fuel │ │ Safety │ │ Reports │ │Carbon │
│ (.NET) │ │ (Nest) │ │ Radar │ │ (Nest) │ │ (Py+ML) │ │ (Go) │
│ │ │ │ │ (Py+ML) │ │ │ │ │ │ │
│ ▸ Stock │ │ ▸ Veh │ │ ▸ Fraud │ │ ▸ Inc │ │ ▸ AI │ │ ▸ EPD │
│ ▸ Warehouse │ │ ▸ Maint │ │ ▸ SoD │ │ ▸ SOS │ │ ▸ Fore │ │ ▸ SKDM │
└─────────────┘ └──────────┘ └──────────┘ └────────┘ └─────────┘ └────────┘
┌──────────────────┐ ┌───────────────┐ ┌────────────────┐
│ Notification Svc │ │ Integration │ │ Geofence │
│ (Node.js) │ │ Hub (.NET) │ │ (Go + PostGIS) │
│ │ │ │ │ │
│ ▸ Email (SMTP) │ │ ▸ Luca │ │ ▸ PDKS │
│ ▸ SMS (Netgsm) │ │ ▸ Uyumsoft │ │ ▸ Location │
│ ▸ Push (FCM) │ │ ▸ KEP │ │ ▸ Tracking │
│ ▸ WhatsApp Biz │ │ ▸ Kommo │ │ │
└──────────────────┘ └───────────────┘ └────────────────┘
🔄 Servis-Servis İletişim Paternleri
Kullanıcı eylemi sonucu direkt yanıt gerektiğinde. Örneğin Create Hakediş → Validate with Projects → Calculate Deductions.
var project = await _projectClient.GetAsync(req.ProjectId); if (project.Status != "Active") throw new BusinessException("Proje aktif değil");
İşlem tamamlandıktan sonra diğer servislerin haberdar olması gereken durumlar. Hakediş Onaylandı → Finance, Notifications, Reports tüm dinleyiciler tetiklenir.
await _bus.Publish(new HakedisOnaylandi { Id = hak.Id, Amount = hak.Net, ApprovedBy = user.Id, Timestamp = now });
Teknoloji Yığını (Tech Stack)
Teknoloji seçimleri ekibin uzmanlığı, TR pazar gereksinimleri (Türkçe dil desteği, KVKK) ve uzun vadeli sürdürülebilirlik kriterlerine göre yapılmıştır.
🎨 Frontend (Web)
Next.js 14.2 (App Router)shadcn/ui + TailwindCSSZustand + TanStack QueryReact Hook Form + ZodRecharts + D3.jsMapbox GL JSSignalR Clientnext-intl (TR + EN + AR)Playwright + VitestServer Components, Streaming, Edge Runtime ve Server Actions; inşaat sektöründe yavaş internet koşullarında bile TTI (Time-to-Interactive) performansını <2sn'ye düşürür. Vercel entegrasyonu ile preview deployment kolaylığı ve SEO pazarlama sayfaları için ideal.
📱 Mobile (iOS + Android)
React Native 0.74Expo SDK 51Expo Router v3WatermelonDBZustand + MMKVexpo-camera + react-native-vision-cameraML Kit (on-device)Expo Notifications + FCMDetox + Maestro⚙️ Backend Services
Identity, Projects, Finance, Inventory, Integration Hub gibi iş-kritik servisler. ASP.NET Core Web API + EF Core + MediatR (CQRS).
HR, Tenders, Documents, Fleet, Safety, Notifications. Hızlı prototipleme ve Node ekosistemiyle entegrasyon kolaylığı.
FastAPI + Prophet + XGBoost + LangChain. Yakıt Radarı anomali, Finansal Projeksiyon, AI Chat (GPT-5 wrapper).
Geofencing (PostGIS), Karbon hesaplama motoru (yoğun aritmetik), yüksek eşzamanlı telemetri veri alımı.
💾 Data Stores
| Store | Kullanım | Boyut (3. Yıl) |
|---|---|---|
| PostgreSQL 16 + PostGIS | Ana transactional DB (40+ tablo, ilişkisel) | ~420 GB |
| TimescaleDB | Telemetri (makine saatleri, GPS, yakıt) | ~180 GB |
| Redis 7 | Cache + session + rate limit + pub/sub | ~8 GB |
| ElasticSearch 8 | Tam metin arama (doküman + KEP) | ~95 GB |
| MinIO / S3 | Dosya (fotoğraf, DWG, PDF, imza) | ~1.8 TB |
| RabbitMQ | Message broker (event-driven) | ~2 GB queue |
☁️ Cloud & DevOps
AWS EU-Central-1 (Frankfurt)Docker + Kubernetes (EKS)Terraform + HelmGitHub Actions + ArgoCDDatadog + GrafanaLoki + LoguruSentry + OpenTelemetryCloudflare (TR edge)HashiCorp VaultTüm kullanıcı verileri Avrupa-merkezli AWS Frankfurt bölgesinde tutulur. Türk müşteriler için KVKK Veri İşleme Sözleşmesi (DPA) ile yasal uyumluluk sağlanır. 2027'de AWS İstanbul açılırsa oraya migration planlanır.
Veri Modeli (Entity Relationship)
ConsTech360 veri modeli 42 ana tablo, 28 ilişki tablosu ve 18 view/materialize view içerir. Aşağıda domain bazlı gruplanmış ER modelleri yer almaktadır.
🗂️ Domain Haritası
🔷 Identity Domain · ER Şeması
🏗️ Projects Domain · ER Şeması
💰 Finance Domain · ER Şeması
👥 HR + Fleet Domain · ER Şeması
fuel_records.driver_id ve machine_hours.reported_by kesinlikle farklı kişiler olmalıdır. Database seviyesinde CHECK constraint + trigger ile zorlanır. Tek kişi her ikisini de giremez → yakıt hırsızlığı fraud'unun temelini oluşturur.
CREATE OR REPLACE FUNCTION check_sod_fuel() RETURNS TRIGGER AS $$ BEGIN IF EXISTS ( SELECT 1 FROM machine_hours mh WHERE mh.vehicle_id = NEW.vehicle_id AND mh.date = NEW.date AND mh.reported_by = NEW.driver_id ) THEN RAISE EXCEPTION 'SoD İhlali: Aynı kişi hem yakıt hem saat giremez'; END IF; RETURN NEW; END; $$ LANGUAGE plpgsql;
🔢 Özet: Toplam Veri Modeli
API Gateway & Endpoint Tasarımı
Tüm mikroservisler Kong API Gateway arkasında toplanır. Dış dünya yalnızca gateway ile konuşur — servisler iç ağda VPC içinde çalışır.
🌐 Gateway Katmanları
┌──────────────────────────────────────────────────────────────────┐
│ Client (Web / Mobil / Müşteri Portal) │
└─────────────────────────────┬────────────────────────────────────┘
│ HTTPS
┌─────────────────────────────▼────────────────────────────────────┐
│ ☁ CLOUDFLARE (WAF + CDN + DDoS) │
└─────────────────────────────┬────────────────────────────────────┘
│
┌─────────────────────────────▼────────────────────────────────────┐
│ 🚪 KONG API GATEWAY │
│ ┌──────────────┬───────────────┬──────────────┬─────────────┐ │
│ │ Rate Limit │ JWT Validate │ Request Log │ Routing │ │
│ │ 1000 req/min │ RS256 + JWKS │ OpenTelemetry│ Path→Service│ │
│ └──────────────┴───────────────┴──────────────┴─────────────┘ │
└─┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┘
│ │ │ │ │ │ │ │ │ │ │ │ │
Identity Projects Finance HR Tenders Docs Inv Fleet Fuel Safety AI Carbon Integ Notif
🛡️ Gateway Policy Örnekleri
# Rate Limiting: Her kullanıcı için 1000 req/min plugins: - name: rate-limiting config: minute: 1000 policy: redis identifier: "jwt.sub" # JWT Doğrulama: RS256 + public key rotasyonu - name: jwt config: key_claim_name: "kid" algorithm: RS256 secret_is_base64: false # Request/Response Logging - name: http-log config: http_endpoint: "http://logstash:8080" method: POST
📋 URL Naming Convention
| Kural | Örnek |
|---|---|
| Plural resource | /api/v1/sites (değil /site) |
| Hierarchical nesting | /api/v1/sites/{id}/work-items |
| Query params for filtering | ?status=active&limit=20 |
| Versioning with prefix | /api/v1/, /api/v2/ |
| Actions via sub-resource | /api/v1/hakedis/{id}/approve |
| Bulk operations | /api/v1/sites:batchUpdate |
🔌 Örnek Endpoint Grubu — Projects Service
| Method | Endpoint | Açıklama | RBAC |
|---|---|---|---|
| GET | /api/v1/sites | Şantiye listesi (filtrelenebilir) | R:all |
| GET | /api/v1/sites/{id} | Şantiye detayı + KPI | R:site_access |
| POST | /api/v1/sites | Yeni şantiye oluştur | W:CEO,Tech |
| PUT | /api/v1/sites/{id} | Şantiye güncelle | W:CEO,Tech |
| DEL | /api/v1/sites/{id} | Soft delete (arşivle) | W:CEO |
| GET | /api/v1/sites/{id}/progress | İlerleme geçmişi | R:site_access |
| POST | /api/v1/sites/{id}/progress | Günlük ilerleme raporu | W:site_chief |
| GET | /api/v1/sites/{id}/work-items | BOM ağacı | R:site_access |
| POST | /api/v1/sites/{id}/work-items | BOM kalemi ekle | W:engineer |
| PATCH | /api/v1/work-items/{id}/completion | Tamamlanma % güncelle | W:site_chief |
| GET | /api/v1/sites/{id}/daily-log?date= | Şantiye günlüğü | R:site_access |
| POST | /api/v1/sites/{id}/punch-items | Kusur bildirimi (+foto) | W:site_chief,CEO |
| PUT | /api/v1/punch-items/{id}/assign | Taşeron atama | W:site_chief |
| PUT | /api/v1/punch-items/{id}/resolve | Kusur çözüldü (after foto zorunlu) | W:contractor |
14 servis × ortalama 18 endpoint = ~252 REST endpoint + 14 WebSocket hub + 32 event (RabbitMQ). OpenAPI 3.1 spec ile otomatik client üretimi (Swagger Codegen).
📦 Standart Response Formatı
// ✓ Başarılı yanıt { "success": true, "data": { /* payload */ }, "meta": { "page": 1, "total": 248, "timestamp": "2026-04-22T14:32:18Z" } } // ✗ Hata yanıtı { "success": false, "error": { "code": "VALIDATION_FAILED", "message": "Şantiye bütçesi negatif olamaz", "field": "budget", "trace_id": "abc123xyz" } }
🔢 HTTP Status Code Kullanımı
| Kod | Kullanım |
|---|---|
200 OK | Başarılı GET, PUT, PATCH |
201 Created | Başarılı POST |
204 No Content | Başarılı DELETE |
400 Bad Request | Validation hatası |
401 Unauthorized | JWT eksik/geçersiz |
403 Forbidden | RBAC ihlali (audit log) |
404 Not Found | Kaynak yok (veya erişim hakkı yok) |
409 Conflict | İş kuralı çakışması (ör. SoD ihlali) |
422 Unprocessable | Business exception |
429 Too Many | Rate limit aşıldı |
500 Internal | Beklenmeyen hata (Sentry log) |
503 Service Unavailable | Downstream servis down |
Gerçek Zamanlı (Realtime) Altyapı
Canlı dashboard, sahadan gelen anlık veri, alert feed, chat ve SOS bildirimleri için SignalR (ASP.NET Core) ve Redis Pub/Sub kombinasyonu kullanılır.
📡 Realtime Akış Mimarisi
SAHA (Mobile) SERVICES WEB (Dashboard)
───────────── ──────── ───────────────
┌──────────────┐ ┌──────────────┐
│ Mehmet Kaya │ │ Yüksel Bey │
│ (Formen) │ │ (Dashboard) │
└──────┬───────┘ └──────▲───────┘
│ POST │ PUSH
│ /api/fuel │ (SignalR)
▼ │
┌──────────────┐ ┌─────────────┐ ┌──────────────┐ ┌────────┴────────┐
│ Fuel Service │──▶│ RabbitMQ │──▶│ Anomaly ML │──▶│ Notification │
│ │ │ (event) │ │ (Python) │ │ Service (Node) │
└──────────────┘ └─────────────┘ └──────┬──────┘ └────────┬────────┘
│ │
Severity HIGH SignalR Hub
│ "fuel-alerts"
▼ ▼
┌──────────────┐ ┌──────────────┐
│ Redis │───▶│ SignalR │
│ Pub/Sub │ │ Frontend SDK │
└──────────────┘ └──────────────┘
⏱ Latency: Sahadan veri → Dashboard'da görünüm < 300 ms
🎯 SignalR Hub Listesi
| Hub | Event | Payload | Subscriber |
|---|---|---|---|
/hubs/dashboard | KpiUpdated | {siteId, kpi, value, timestamp} | CEO, Finance, Tech |
/hubs/alerts | NewAlert | {type, severity, message, data} | Based on RBAC |
/hubs/fuel-radar | AnomalyDetected | {vehicleId, deviation, severity} | Tech Dir, CEO |
/hubs/location | PersonnelMoved | {personnelId, siteId, enter/exit} | Site chief |
/hubs/sos | EmergencyTriggered | {personnelId, location, type} | ALL + 112 |
/hubs/approvals | RequiresYourApproval | {type, amount, from} | Approver |
/hubs/messaging | NewMessage | {fromId, toId, content} | Recipient |
/hubs/documents | DocumentUpdated | {docId, version, author} | Subscribers |
/hubs/tenders | NewTenderMatch | {tenderId, matchScore} | Tech team |
/hubs/punch-list | PunchItemAssigned | {itemId, contractorId, priority} | Contractor |
/hubs/ekap-sync | NewTender | {tender data} | Tech Dir |
/hubs/progress | SiteProgress | {siteId, pct, slip} | Management |
/hubs/cashflow | CashAlert | {critical_date, amount, reason} | Finance Dir |
/hubs/chat | AIResponse | {userId, message, data} | Only sender |
💻 SignalR Hub Örneği (.NET 9)
public class FuelRadarHub : Hub<IFuelRadarClient> { private readonly IAnomalyService _anomaly; private readonly ILogger<FuelRadarHub> _logger; public override async Task OnConnectedAsync() { var userId = Context.User.GetUserId(); var siteIds = await GetSiteAccessAsync(userId); // Her şantiye için ayrı group subscription foreach (var siteId in siteIds) { await Groups.AddToGroupAsync(Context.ConnectionId, $"site:{siteId}"); } _logger.LogInformation("User {UserId} connected to FuelRadarHub", userId); await base.OnConnectedAsync(); } // Anomali algılandığında broker'dan çağrılır public async Task BroadcastAnomaly(FuelAnomalyEvent evt) { await Clients.Group($"site:{evt.SiteId}") .AnomalyDetected(new { vehicleId = evt.VehicleId, deviationPct = evt.DeviationPct, severity = evt.Severity, timestamp = evt.Timestamp }); } }
📱 Client Bağlantı Örneği (TypeScript)
// Web Dashboard const connection = new HubConnectionBuilder() .withUrl("/hubs/fuel-radar", { accessTokenFactory: () => authStore.getAccessToken() }) .withAutomaticReconnect([0, 2000, 10000, 30000]) .configureLogging(LogLevel.Warning) .build(); connection.on("AnomalyDetected", (evt) => { toast.error(`🚨 Yakıt şüphesi: ${evt.vehicleId} · %${evt.deviationPct}`); dashboardStore.addAlert(evt); if (evt.severity === "CRITICAL") { playSound("critical-alert.mp3"); requestBrowserNotification(evt); } }); await connection.start();
Sahadan gelen bir veri (ör. yakıt anomalisi) dashboard'da görünene kadar toplam süre < 300 ms. Bu süreye: Mobile POST → Service → RabbitMQ → ML → Redis Pub/Sub → SignalR → Client render dahildir.
🔁 Reconnection & Offline Senaryoları
Client tarafında withAutomaticReconnect (0 → 2s → 10s → 30s). Maksimum 5 deneme sonrası polling'e düşer (5 saniyede bir REST ile check).
Mobile'da internet kesildiğinde WatermelonDB'ye kaydedilir, bağlantı dönünce background sync ile kuyruğa atılır. Max 48 saat queue tutulur.
54 Modülün Detaylı Haritası
Her modül için veritabanı tabloları, API endpoint'leri, kritik iş kuralları ve hangi servise ait olduğu tanımlanmıştır. Öncelik dağılımı ile birlikte.
🎯 Öncelik Dağılımı
📋 Kritik 5 Modülün Teknik Detayı
Identity & RBAC Service
/auth/login · /auth/refresh/users · /users/{id}/permissions/users/{id}/permissions/override/audit-logs?user_id=&days=30- 5 başarısız giriş → hesap 15 dk bloke
- Hassas modüllerde 2FA zorunlu (finans, sözleşme, kullanıcı yönetimi)
- 90 gün pasif kullanıcı → otomatik deaktif
- Şifre policy: 12+ karakter, 90 gün rotasyon, son 5 şifre kullanılamaz
- Effective Perm =
Role Default ∪ User Override ∩ ABAC Condition
tenants users roles permissions role_permissions (M2M) user_permissions (override) sessions audit_logs password_reset_tokens
LoginForm · 2FASetupPermissionMatrixUserEditor · AuditLogViewerSessionManager
Fuel Radar (Yakıt Anti-Fraud)
/fuel-records (SoD: ŞOFÖR)/machine-hours (SoD: FORMEN)/fuel-radar/anomalies/hubs/fuel-radar · AnomalyDetecteddef detect_anomaly(fuel, hours, baseline): expected_L = baseline × hours.total deviation = (fuel - expected_L) / expected_L × 100 if deviation > 15: severity = "HIGH" elif deviation > 8: severity = "MEDIUM" # ML confidence ml_score = isolation_forest.predict(features) return Anomaly(severity, deviation, ml_score)
fuel_records machine_hours fuel_anomalies + vehicles.baseline_L_per_h + TimescaleDB hypertable (fuel_consumption)
TRIGGER check_sod BEFORE INSERT ON fuel_records FOR EACH ROW WHEN NEW.driver_id = (SELECT reporter_id FROM machine_hours WHERE same_vehicle_same_date) THEN RAISE EXCEPTION
Hakediş (Progress Payment)
/hakedis (draft oluştur)/hakedis/{id}/submit (onay zinciri başlar)/hakedis/{id}/approve (+ next approver)/hakedis/{id}/deductions (5 kesinti)var gross = items.Sum(w => w.Qty × w.UnitPrice); var deductions = new[] { SgkPrim(gross, 0.048), // %4.8 Guarantee(gross, 0.05), // %5 LogisticShare(gross, 0.025), // %2.5 AdvanceOffset(prev_advance), // avans mahsup DelayPenalty(days_late, 0.004) // %0.4/gün }; var net = gross - deductions.Sum();
hakedis hakedis_items (metraj) hakedis_deductions approval_chain hakedis_documents + audit trigger
2. Saha Şefi (Mehmet)
3. Muhasebe (Sezen)
4. Teknik Dir. (Türker)
5. Ödeme (Onur) → Luca
Luca / Uyumsoft Integration
1. Uyumsoft Inbox sync (her 5 dk) 2. E-Fatura XML parse 3. Dispatch eşleşme (fuzzy: supplier + date + amount) 4. Cost center auto-assign (dispatch.site_id) 5. Luca GenericSales XML üret 6. Luca API upload (yevmiye fişi) 7. Confirmation → mark_synced
def match(invoice): for d in pending_dispatches: score = (0.5 × same_supplier + 0.3 × date_diff(±3d) + 0.2 × amount_similarity) if score > 0.85: return auto_match(d) return manual_review_queue
invoices dispatches invoice_dispatch_matches luca_sync_logs + luca_config per tenant + manual_review_queue
- %98 otomatik eşleşme
- %2 manuel review (~8 fatura/ay)
- Cycle: 12 dk → 2 saniye
- Sezen Hanım'ın 2 saat kazanımı
AI Reports & Chat Service
- LLM: GPT-5 (OpenAI) + Claude Opus fallback
- RAG: LangChain + pgvector
- Forecast: Prophet + XGBoost ensemble
- Anomaly: Isolation Forest + Z-score
- Embedding: text-embedding-3-large
agent = SQLAgent( llm=gpt5, db=readonly_view, restrict_tables=user.allowed_tables, few_shot=examples ) # "Urla neden zararda?" response = agent.run(query) # Output: SQL + chart + prose
/ai/chat (SSE streaming)/ai/reports/weekly-summary/ai/forecast?horizon=6M/ai/anomaliesAylık limit: 500 soru/kullanıcı
Toplam tahmini: ~$780/ay
📊 Tüm 54 Modül · Özet Matris
| # | Modül | Servis | DB | API | Öncelik |
|---|---|---|---|---|---|
| 1 | Dashboard · 6 canlı grafik | Multi | - | 12 | P0 |
| 2 | Identity + RBAC | Identity | 9 | 18 | P0 |
| 3 | Şantiyeler (list + detail) | Projects | 4 | 22 | P0 |
| 4 | Şantiye Günlüğü | Projects | 2 | 8 | P1 |
| 5 | Punch List | Projects | 2 | 14 | P0 |
| 6 | Harita (canlı) | Geofence | - | 4 | P3 |
| 7 | Puantaj | HR | 3 | 16 | P0 |
| 8 | Personel (İK) | HR | 5 | 20 | P0 |
| 9 | Geofencing/PDKS | Geofence | 2 | 10 | P0 |
| 10 | İzin & Avans | HR | 3 | 12 | P1 |
| 11 | İSG Bildirimleri | Safety | 3 | 14 | P1 |
| 12 | Araç Sicili | Fleet | 2 | 16 | P1 |
| 13 | Yakıt Radarı 🚨 | Fuel (Python) | 3 | 12 | P0 |
| 14 | Makine Puantajı | Fleet | 1 | 8 | P2 |
| 15 | Periyodik Bakım | Fleet | 3 | 12 | P1 |
| 16 | Kiralık Ekipman | Fleet | 2 | 10 | P1 |
| 17 | Satın Alma Talepleri | Inventory | 3 | 14 | P1 |
| 18 | Teklif Karşılaştırma (RFQ) | Tenders | 2 | 10 | P1 |
| 19 | Tedarikçi Yönetimi | Inventory | 3 | 18 | P1 |
| 20 | Kommo CRM | Integration | 1 | 8 | P2 |
| 21 | Stok Durumu | Inventory | 4 | 22 | P1 |
| 22 | Giriş/Çıkış Fişleri | Inventory | 2 | 12 | P1 |
| 23 | Barkod Yönetimi | Inventory | 1 | 8 | P2 |
| 24 | Depo Transferleri | Inventory | 2 | 10 | P2 |
| 25 | Nakit Akış Monitör | Finance | - | 10 | P1 |
| 26 | Ödeme Talepleri | Finance | 2 | 12 | P2 |
| 27 | Masraf Merkezleri | Finance | 2 | 14 | P0 |
| 28 | Çek Takvimi | Finance | 1 | 10 | P2 |
| 29 | Çek Parçalama | Finance | 1 | 8 | P0 |
| 30 | Teminat Mektupları | Finance | 2 | 10 | P2 |
| 31 | Hakediş (Liste + Detay) | Finance | 5 | 18 | P0 |
| 32 | Otomatik Kesintiler | Finance | 1 | 6 | P2 |
| 33 | Luca / Uyumsoft | Integration | 4 | 14 | P0 |
| 34 | İhale Takvimi (EKAP) | Tenders | 3 | 16 | P1 |
| 35 | Dinamik Keşif (BOM) | Projects | 2 | 14 | P1 |
| 36 | Otomatik Şablonlar | Documents | 2 | 10 | P1 |
| 37 | Teklif Yönetimi | Tenders | 3 | 18 | P1 |
| 38 | Doküman V1/V2 | Documents | 4 | 20 | P1 |
| 39 | AI Raporlar ✨ | Reports (Python) | 6 | 12 | P2 |
| 40 | Aktif Sözleşmeler | Projects | 3 | 14 | P2 |
| 41 | Sözleşme Detay (AI özet) | Projects | - | 8 | P2 |
| 42 | Resmi Evrak Arşivi | Documents | 2 | 10 | P2 |
| 43 | KEP Arşivi | Integration | 2 | 8 | P2 |
| 44 | Müşteri Portalı | Projects | 2 | 8 | P1 |
| 45 | Mobil (10 ekran) | Multi | - | ~60 | P0 |
| 46 | Kullanıcı + RBAC UI | Identity | - | - | P0 |
| 47 | Superadmin SaaS | Identity | 3 | 16 | P3 |
| 48 | Sistem Ayarları | Identity | 1 | 6 | P3 |
| 49 | 🌿 Karbon Dashboard | Carbon (Go) | 3 | 10 | P3 |
| 50 | 🌿 EPD Malzeme Emisyon | Carbon | 3 | 12 | P3 |
| 51 | 🌿 Lojistik CO₂ | Carbon | 2 | 8 | P3 |
| 52 | 🌿 Atık Yönetimi | Carbon | 3 | 14 | P3 |
| 53 | 🌿 SKDM Raporu | Carbon | 1 | 8 | P3 |
| 54 | Notifications Center | Notifications | 2 | 12 | P0 |
Mobil Uygulama Mimarisi
ConsTech360 mobile saha personelinin birincil cihazı. Zayıf internet koşullarında bile çalışması zorunlu → offline-first mimari.
🏗️ Katmanlı Mobil Yapı
┌───────────────────────────────────────────────────────────────┐
│ UI LAYER (React Native 0.74) │
│ Screens (Expo Router) · Components · Reanimated 3 │
└───────────────────────────┬───────────────────────────────────┘
│
┌───────────────────────────▼───────────────────────────────────┐
│ STATE & LOGIC LAYER │
│ Zustand · TanStack Query · Custom Hooks · Zod Validators │
└───────────────────────────┬───────────────────────────────────┘
│
┌───────────────────────────▼───────────────────────────────────┐
│ SYNC & OFFLINE LAYER │
│ WatermelonDB · SyncEngine · AsyncQueue · ConflictResolver │
└───────────────────────────┬───────────────────────────────────┘
│
┌───────────────────────────▼───────────────────────────────────┐
│ NATIVE & PLATFORM LAYER │
│ Camera · GPS · Biometric · FCM Push · ML Kit OCR · Sensors │
└───────────────────────────────────────────────────────────────┘
🔄 Offline-First Pattern
Kullanıcı eylemi → Local DB'ye hemen yaz → UI'de göster → Arka planda API'ye gönder
async function createPunchItem(data) { // 1. Lokal kayıt (anında) const local = await db.punchItems .create({...data, _sync: "pending"}); // 2. UI güncellensin queryClient.invalidateQueries(...); // 3. Queue'ya ekle syncQueue.enqueue({ type: "create", entity: "punch", data: local, priority: HIGH }); }
Aynı kayıt server'da değişmişse: last-writer-wins + field-level merge
function resolveConflict(local, server) { if (server.updated_at > local.updated_at) { showConflictNotification(local, server); return merge(server, local, { strategy: "server-wins-except-photos" }); } return local; }
📦 Performans & Kaynak Hedefleri
| Metric | Hedef | Nasıl? |
|---|---|---|
| APK Boyutu | < 18 MB | Hermes engine + code splitting + lazy routes |
| Cold Start (iOS) | < 1.5s | Skeleton UI + preload critical routes |
| Cold Start (Android) | < 1.8s | Same + native splash |
| Kamera Açılış | < 600ms | Pre-initialize on app start |
| Pil Kullanımı | < 15% / 8 saat | Wake lock minimum, background throttle |
| Data Kullanımı | < 5 MB/gün | Image compression + delta sync |
| Offline Depolama | 48 saat queue | WatermelonDB + SQLCipher |
🔐 Mobile Güvenlik Katmanları
Face ID / Touch ID. Hassas sayfalarda re-auth.
MITM'e karşı SSL cert pinli.
Root/JB tespit → uyarı + log.
Sözleşme/hakediş ekranında.
WatermelonDB + SQLCipher (AES-256).
CodePush sadece imzalı bundle.
AI & ML Servisleri
6 ayrı AI/ML use case. Her biri için farklı model ve ayrı Python servisi.
🤖 AI Servisleri Matrisi
| Use Case | Model | Tip | Latency | Güven Eşiği |
|---|---|---|---|---|
| AI Chat (Sorgulama) | GPT-5 (OpenAI) | LLM + RAG | 2-5s (stream) | - |
| Executive Summary | GPT-5 + prompts | LLM (cron) | Pzt 08:00 | - |
| Finansal Projeksiyon | Prophet + XGBoost | Ensemble | Offline gece | > 0.85 |
| Yakıt Anomali | Isolation Forest | ML + rule | < 500ms | > 0.75 |
| İhale Eşleşme | BERT + Cosine Sim | NLP | Gece 03:00 | > 0.7 |
| OCR (İrsaliye) | ML Kit (on-device) | Vision | < 800ms | > 0.90 |
🧩 RAG Mimarisi (AI Chat)
SORU: "Urla Teknopark neden zararda?"
│
▼
┌──────────────────┐
│ Query Embedding │── text-embedding-3-large
└────────┬─────────┘
│
▼
┌──────────────────┐
│ pgvector Search │── Top-K: 15 ilgili kayıt
│ (Similarity) │ • Sözleşme · Hakedişler · BOM · Anomaliler
└────────┬─────────┘
│
▼
┌──────────────────┐
│ RBAC Filter │── Kullanıcı görmeye yetkili mi?
└────────┬─────────┘
│
▼
┌──────────────────┐
│ GPT-5 streaming │── Prompt: role + context + question
│ + guardrails │
└────────┬─────────┘
│
▼
CEVAP (streaming) + kaynak referansları + aksiyon önerileri
Kullanıcı girdisinin LLM'e verilmeden önce sanitize edilmesi zorunlu. Formen "tüm şantiyeleri listele" diyerek CEO verisine erişememeli. Çözüm: RBAC SQL filtreleme + Output guardrails + Structured prompts (JSON schema).
💰 AI Aylık Maliyet Tahmini
Karbon Ayak İzi Microservice
Ar-Ge modülü. AB Yeşil Mutabakat (SKDM/CBAM) uyumu için 2026 kritik yıl. Inşaat sektörünün CO₂'nin %37'sini ürettiği dikkate alınarak ayrı microservice olarak Go ile yazılır (yüksek throughput hesaplama).
🌿 5 Alt Modül
| Modül | Görev | Standart / Referans |
|---|---|---|
| 1. Carbon Dashboard | Toplam emisyon özeti, trend, hedef karşılaştırma | GHG Protocol Scope 1-2-3 |
| 2. EPD Malzeme Emisyon | Malzeme miktarı × EPD katsayısı = kgCO₂e | ISO 14025 (EPD) |
| 3. Lojistik CO₂ | Mesafe × araç tipi faktör = nakliye emisyonu | GLEC Framework |
| 4. Atık Yönetimi | Tehlikeli/geri dönüşüm tespit, doluluk takibi | TR Atık Yönetmeliği |
| 5. SKDM Raporu | Avrupa ihracat için CBAM uyumlu rapor | AB 2023/956 Reg. |
📊 Veri Modeli (Karbon Domain)
🧮 Hesaplama Motoru (Go)
package carbon // EPD bazlı malzeme emisyonu hesaplama type MaterialEmission struct { MaterialCode string Quantity float64 EPDFactor float64 // kgCO₂e/unit Unit string } func (m MaterialEmission) CalculateCO2e() float64 { return m.Quantity * m.EPDFactor } // Lojistik emisyonu (GLEC Framework v3) func CalculateLogistics(d Dispatch) float64 { factor := GetGLECFactor(d.VehicleClass, d.FuelType) // factor unit: gCO₂e/tonne-km weight_t := d.LoadKg / 1000 co2e_g := factor * weight_t * d.DistanceKm return co2e_g / 1000 // kgCO₂e } // Atık doluluk tahmini func PredictCollectionDate(container Container) time.Time { dailyFill := container.HistoricalFillRate // L/gün remaining := container.Capacity - container.CurrentFill daysLeft := remaining / dailyFill return time.Now().Add(daysLeft * 24 * time.Hour) }
🇪🇺 SKDM (CBAM) Uyumluluk Akışı
[AB İhracat Yapılacak Şantiye]
│
▼
┌──────────────────────────┐
│ Emission Data Collection │── Tüm Scope 1-2-3 verileri
└──────────┬───────────────┘
│
▼
┌──────────────────────────┐
│ Embedded Emissions Calc │── Ürün başına tCO₂e
└──────────┬───────────────┘
│
▼
┌──────────────────────────┐
│ CBAM Quarterly Report │── AB XML formatı
└──────────┬───────────────┘
│
▼
┌──────────────────────────┐
│ Submit to CBAM Registry │── AB portal üzerinden
└──────────────────────────┘
📅 Periyot: Çeyrek bazında (Q1 → Q2 sonu deadline)
💶 Ceza: Rapor yok → ton CO₂e başına €50
2026'dan itibaren AB'ye yapılan inşaat malzemesi ihracatında CBAM raporu zorunlu. TEORİ Mühendislik'in şimdi bu altyapıyı kurması 5 yıllık rekabet avantajı sağlar. Üstelik kamu ihalelerinde (özellikle TOKİ, Çevre Şehircilik Bakanlığı) 2027'den itibaren karbon raporu puanlama kriteri olacak.
Güvenlik & RBAC
Finansal veriler, kişisel bilgiler (TC, IBAN), gizli sözleşmeler. KVKK + ISO 27001 + SOC 2 uyumluluk.
🔐 Çok Katmanlı Güvenlik
| Katman | Koruma | Teknoloji |
|---|---|---|
| 1. Edge | DDoS, WAF, bot trafiği | Cloudflare + AWS Shield |
| 2. Network | VPC isolation, private subnets | AWS VPC + Security Groups |
| 3. Gateway | JWT validation, rate limiting | Kong + Redis |
| 4. Application | RBAC/ABAC, input validation | Per-service + Zod/FluentValidation |
| 5. Data at Rest | Şifreleme (AES-256) | PostgreSQL TDE + S3 SSE-KMS |
| 6. Data in Transit | TLS 1.3 zorunlu | Let's Encrypt + HSTS |
| 7. PII Encryption | TC, IBAN alan şifreleme | Column-level encryption (pgcrypto) |
| 8. Secret Management | API key, cert, password | HashiCorp Vault |
🏛️ RBAC + ABAC Hibrit Model
function canAccess(user: User, resource: Resource, action: Action): boolean { // 1. RBAC: Rol varsayılanı let allowed = user.role.permissions[resource.type]?.[action] ?? false; // 2. RBAC Override: Kullanıcı özel yetki if (user.customPermissions[resource.type]?.[action] !== undefined) { allowed = user.customPermissions[resource.type][action]; } // 3. ABAC: Bağlamsal kontroller if (allowed) { // a) Şantiye erişim kontrolü if (resource.siteId && !user.siteAccess.includes(resource.siteId)) { allowed = false; } // b) Mali limit kontrolü if (resource.amount && resource.amount > user.financialLimits[action]) { allowed = false; } // c) Çalışma saati kısıtı if (!isWithinWorkHours(user.workHours)) { allowed = false; } // d) IP kısıtı (varsa) if (user.ipWhitelist?.length && !user.ipWhitelist.includes(currentIp)) { allowed = false; } } // 4. Audit log (başarılı veya başarısız) auditLog.record({ user, resource, action, allowed, timestamp: now }); return allowed; }
🇹🇷 KVKK Uyumluluk Kontrol Listesi
- Veri işleme envanteri (tüm PII alanları)
- Açık rıza formu (kayıt esnasında)
- Veri silme hakkı (soft delete + 90 gün)
- Veri taşıma hakkı (JSON/CSV export)
- Erişim logları 2 yıl saklanır
- VERBIS kayıt yapıldı
- Veri İşleme Sözleşmesi (DPA) müşterilerle
- AB-Frankfurt data residency
- Veri koruma etki değerlendirmesi (DPIA)
- Yıllık KVKK denetimi
- Çalışan KVKK eğitimi (yılda 1)
- İhlal bildirim prosedürü (72 saat)
- Alt yüklenici (Luca) DPA gözden geçir
- Çerez politikası + izin banner
- Veri minimizasyonu (sadece gerekli)
- Pseudonymization (analytics için)
DevOps & Deployment
Git → Build → Test → Deploy pipeline'ı tam otomatik. Geliştirici kod push ettiğinden kullanıcıya ulaşana kadar maksimum 8 dakika.
🔄 CI/CD Pipeline
┌─────────────┐
│ git push │── Developer
└──────┬──────┘
│
┌──────▼──────────────────────────────────────────────┐
│ GITHUB ACTIONS (CI) │
│ ┌────────┬────────┬────────┬────────┬────────┐ │
│ │ Lint │ Unit │ Integ │ E2E │ Build │ │
│ │ ESLint │ Jest │ Pytest │ Playwr │ Docker │ │
│ │ Prett │ xUnit │ │ │ │ │
│ └────────┴────────┴────────┴────────┴────────┘ │
│ (4-6 dk) │
└──────────────────────┬──────────────────────────────┘
│
┌──────────────────────▼──────────────────────────────┐
│ GITHUB CONTAINER REGISTRY │
│ Image tag: v1.4.2-abc1234 + latest │
└──────────────────────┬──────────────────────────────┘
│
┌──────────────────────▼──────────────────────────────┐
│ ARGOCD (CD) · GitOps │
│ Kubernetes manifest otomatik güncellenir │
└──────────────────────┬──────────────────────────────┘
│
┌──────────────────────▼──────────────────────────────┐
│ K8S CLUSTER (AWS EKS) │
│ Rolling update · Zero downtime · Health checks │
│ staging-namespace → canary (5%) → production (100%)│
└─────────────────────────────────────────────────────┘
Toplam süre: ~8 dakika (commit → production)
🌍 Ortamlar (Environments)
| Env | Amaç | URL | Data | Release |
|---|---|---|---|---|
| local | Geliştirici makinesi | localhost | Fake seed data | Manuel |
| dev | Geliştirme ortak | dev.constech360.com | Fake + anon prod | Her commit |
| staging | QA + sözleşmeli pilot | staging.constech360.com | Anon prod clone | Merge → master |
| production | Canlı müşteri | app.constech360.com | Gerçek müşteri | Tag (manuel trigger) |
📦 Kubernetes Mimarisi
constech360-prod/ ├── gateway/ # Kong API Gateway (2 replicas, HA) ├── services/ │ ├── identity/ # .NET Identity (3 replicas) │ ├── projects/ # .NET Projects (3 replicas) │ ├── finance/ # .NET Finance (3 replicas) │ ├── hr/ # NestJS HR (2 replicas) │ ├── tenders/ # NestJS Tenders (2 replicas) │ ├── documents/ # NestJS Documents (2 replicas) │ ├── inventory/ # .NET Inventory (2 replicas) │ ├── fleet/ # NestJS Fleet (2 replicas) │ ├── fuel-radar/ # Python ML (2 replicas + GPU) │ ├── safety/ # NestJS Safety (2 replicas) │ ├── reports-ai/ # Python AI (2 replicas + GPU) │ ├── carbon/ # Go Carbon (2 replicas) │ ├── integration/ # .NET Integration (2 replicas) │ ├── geofence/ # Go Geofence (2 replicas) │ └── notifications/ # Node Notifications (2 replicas) ├── data/ │ ├── postgres/ # Primary + Read replicas │ ├── redis/ # Cluster (6 nodes) │ ├── rabbitmq/ # Cluster (3 nodes) │ └── elasticsearch/ # Cluster (3 nodes) └── monitoring/ ├── prometheus/ # Metrics ├── grafana/ # Dashboards ├── loki/ # Logs └── jaeger/ # Tracing
📈 Observability Stack
Prometheus + Grafana. SLA, error rate, p99.
Loki + Grafana. Structured JSON logs.
Jaeger + OpenTelemetry. Request flow takibi.
PagerDuty + Slack. 5xx spike, DB slow query.
3 kişilik DevOps ekibi haftalık rotasyonla on-call olur. Kritik (P1) alarmlar 15 dk içinde yanıtlanır, P2 alarmları 1 saat. Aylık incident retrospektifleri yapılır.
Dış Sistem Entegrasyonları
ConsTech360 tek başına çalışmaz — Türkiye inşaat ekosisteminin bir parçası. 11 kritik entegrasyon tanımlanmıştır.
🔌 Entegrasyon Matrisi
| Sistem | Tip | Yön | Frekans | Öncelik |
|---|---|---|---|---|
| Luca Muhasebe | API + XML | ↑↓ Çift yönlü | Realtime | P0 |
| Uyumsoft E-Fatura | API | ↓ Gelen | Her 5 dk | P0 |
| EKAP (KİK) | Scraping + RSS | ↓ Gelen | Günde 1x (03:00) | P1 |
| KEP (PTT) | SMTP + IMAP | ↑↓ Çift yönlü | Realtime | P2 |
| SGK E-Bildirge | XML Upload | ↑ Giden | Aylık | P1 |
| Kommo CRM | API | ↑↓ Çift yönlü | Realtime | P2 |
| WhatsApp Business | API (Meta) | ↑↓ Çift yönlü | Realtime | P1 |
| Meteoroloji (MGM) | REST API | ↓ Gelen | Saatlik | P2 |
| Banka Hesap (API) | REST (Ziraat, Garanti) | ↓ Gelen | Günlük | P2 |
| Google Maps / Mapbox | API | ↓ Gelen | Realtime | P1 |
| OpenAI (GPT-5) | REST | ↑↓ Çift yönlü | Realtime | P2 |
📐 Entegrasyon Katmanı Mimarisi
┌──────────────────────────────────────────────────────────────────┐
│ INTEGRATION HUB (dedicated .NET service) │
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Adapter │ │ Adapter │ │ Adapter │ │
│ │ Luca │ │ Uyumsoft │ │ EKAP │ ... │
│ │ (C# SDK) │ │ (REST API) │ │ (Scraper) │ │
│ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ │
│ │ │ │ │
│ └────────┬───────┴────────┬───────┘ │
│ │ │ │
│ ┌────────▼────────────────▼────────┐ │
│ │ Common Integration Layer │ │
│ │ • Retry logic │ │
│ │ • Circuit breaker (Polly) │ │
│ │ • Rate limiting │ │
│ │ • Credential rotation (Vault) │ │
│ │ • Audit log │ │
│ └──────────────┬───────────────────┘ │
│ │ │
│ ┌───────▼───────┐ │
│ │ RabbitMQ │ → Events'ler diğer servislere │
│ └───────────────┘ │
└──────────────────────────────────────────────────────────────────┘
⚡ Circuit Breaker Pattern (Polly Kullanımı)
public class LucaService { private readonly IAsyncPolicy<HttpResponseMessage> _resiliencePolicy; public LucaService() { // Retry: 3 kez, exponential backoff var retryPolicy = Policy<HttpResponseMessage> .Handle<HttpRequestException>() .OrResult(r => !r.IsSuccessStatusCode) .WaitAndRetryAsync(3, attempt => TimeSpan.FromSeconds(Math.Pow(2, attempt))); // Circuit Breaker: 5 hata sonrası 30 sn kapat var circuitBreakerPolicy = Policy<HttpResponseMessage> .Handle<HttpRequestException>() .CircuitBreakerAsync(5, TimeSpan.FromSeconds(30)); // Timeout: 10 sn var timeoutPolicy = Policy.TimeoutAsync<HttpResponseMessage>(10); _resiliencePolicy = Policy.WrapAsync( retryPolicy, circuitBreakerPolicy, timeoutPolicy); } public async Task<LucaInvoice> UploadAsync(Invoice invoice) { return await _resiliencePolicy.ExecuteAsync(async () => { var response = await _httpClient.PostAsJsonAsync( "/api/luca/invoices", invoice); response.EnsureSuccessStatusCode(); return await response.Content.ReadFromJsonAsync<LucaInvoice>(); }); } }
Luca veya Uyumsoft kritik bir şekilde down olursa tüm muhasebe işlemleri duraklar. Mitigation: 1) Queue'ya yazılan işlemler 24 saat bekletilir, sonra manuel işlenir. 2) Admin paneline "Luca DOWN" uyarısı düşer. 3) Günlük batch export (CSV) alternatifi hazır bekler.
Performans & SLA
Sözleşme gereği garanti edilen servis seviyeleri ve hedef performans metrikleri.
📜 SLA Taahhütleri
| Metric | Enterprise Plan | Standard Plan | Ölçüm |
|---|---|---|---|
| Uptime | 99.95% (21 dk/ay) | 99.9% (43 dk/ay) | Pingdom |
| API Response p95 | < 200 ms | < 400 ms | Datadog |
| API Response p99 | < 500 ms | < 1s | Datadog |
| Dashboard Load | < 1.5s | < 2.5s | Lighthouse CI |
| Mobile Cold Start | < 1.5s | < 2s | Firebase |
| Realtime Lag | < 300 ms | < 800 ms | SignalR metrics |
| Data Recovery (RTO) | < 1 saat | < 4 saat | DR drill |
| Data Loss (RPO) | < 5 dk | < 1 saat | Backup freq |
| Support Response | < 1 saat | < 8 saat | Ticket system |
🎯 Performance Optimizasyonları
- Read replicas (3 adet · dashboard sorguları)
- Materialized view'lar (agregasyon)
- Connection pooling (pgBouncer)
- Partitioning (timesheets by month)
- Index strategy (GIN, GIST, BRIN)
- Query plan analysis (pg_stat_statements)
- Redis: Session + RBAC cache (TTL 15 dk)
- CDN: Static assets (Cloudflare edge)
- HTTP cache: Stale-while-revalidate
- GraphQL persisted queries
- React Query: Server state cache
- Service Worker: Offline web
📊 Yük Testi Hedefleri
Takım Yapısı & Rol Tanımları
18 aylık geliştirme için 7-9 kişilik core ekip. Her rol için seviye (junior/mid/senior), aylık maaş ve dış kaynak alternatifleri belirlenmiştir.
👥 Core Takım (Tam Zamanlı)
| Rol | Seviye | Sayı | Aylık Maaş | Başlangıç |
|---|---|---|---|---|
| Tech Lead / Solution Architect | Senior 10y+ | 1 | ₺180K | Ay 1 (part-time olarak seyir) |
| Product Owner / BA | Senior | 1 | ₺95K | Ay 1 |
| Backend Developer (.NET) | Senior 5y+ | 2 | ₺120K × 2 | Ay 1 |
| Backend Developer (Node.js) | Mid 3y+ | 1 | ₺95K | Ay 2 |
| Frontend Developer (Next.js) | Senior 5y+ | 1 | ₺110K | Ay 2 |
| Mobile Developer (RN) | Senior 5y+ | 1 | ₺120K | Ay 3 |
| DevOps Engineer | Mid 3y+ | 1 | ₺100K | Ay 2 |
| UX/UI Designer | Mid 3y+ | 1 | ₺75K | Ay 1 |
| QA Engineer | Mid 3y+ | 1 | ₺80K | Ay 4 |
🎯 Dış Kaynak / Freelance
| Rol | Süre | Tutar | Amaç |
|---|---|---|---|
| ML Engineer (Python, AI) | 6 ay (Ay 10-16) | ₺160K/ay | AI Reports + Yakıt Radar + Forecasting |
| Güvenlik Uzmanı (Pentester) | Proje bazlı | ₺80K toplam | Pentest + ISO 27001 hazırlık |
| KVKK / Hukuk Danışmanı | Aylık | ₺18K/ay | DPA, sözleşme, uyumluluk |
| Çevrebilim Danışmanı | Ay 15-18 | ₺45K/ay | Karbon modülü · SKDM uzmanlığı |
🏆 Organizasyon Şeması
┌────────────────────────┐
│ Yüksel Bey (CEO) │
│ Ürün Sponsoru │
└───────────┬────────────┘
│
┌───────────▼────────────┐
│ Tech Lead (Solution │
│ Architect) │
└───────────┬────────────┘
│
┌────────────────────┼────────────────────┐
│ │ │
┌──────▼──────┐ ┌──────▼──────┐ ┌─────▼──────┐
│ Product │ │ Engineering │ │ Design │
│ Owner / BA │ │ Team (6) │ │ (UX/UI) │
└─────────────┘ └──────┬──────┘ └────────────┘
│
┌─────────┬───────┴────────┬─────────┐
│ │ │ │
┌─────▼─┐ ┌─────▼────┐ ┌────────▼────┐ ┌──▼─────┐
│ BE │ │ FE │ │ Mobile │ │ DevOps │
│ (.NET │ │ (Next.js │ │ (RN) │ │ │
│ + Nd)│ │ + TS) │ │ │ │ │
│ (3) │ │ (1) │ │ (1) │ │ (1) │
└───────┘ └──────────┘ └─────────────┘ └────────┘
│
┌──────▼──────┐
│ QA Engineer │
│ (Ay 4+) │
└─────────────┘
💬 Çalışma Metodolojisi
- 2 haftalık sprintler
- Daily standup (10 dk, 09:30)
- Sprint planning (2 saat)
- Review + Retro (cumalar)
- Backlog grooming (çarşamba)
- Velocity tracking (Jira)
- Git: GitHub + branch protection
- Project: Jira + Confluence
- Design: Figma + FigJam
- İletişim: Slack + Meet
- Doc: Confluence + Notion
- Code Review: PR required + 1 approval
18 Aylık Yol Haritası
6 ana faza bölünmüş 18 aylık plan. Her fazın net teslimatı ve başarı kriterleri tanımlıdır.
🎯 Discovery & Design Sprint
İhtiyaç analizi · pilot müşteri (TEORİ Mühendislik) ile workshop · UI prototipleri · SRS finalizasyon · DB şema v1 · infra setup · ekip toplama.
Teslimat: Figma design system, dev cluster, 20+ pilot mockup
🚀 MVP Core (14 P0 modülü)
Identity · RBAC · Sites · Contracts · Dashboard · Hakediş · Luca entegrasyonu · Mobile formen app · Fuel Radar · Geofence · Punch List · Cost Centers.
Teslimat: 14 modül, iOS + Android APK, TEORİ pilot kullanımı
📦 V1.1 Operational (16 P1 modülü)
Tenders · Bid · Templates · BOM · Documents · Suppliers · Inventory · Fleet · Rentals · OHS · Leave · Guarantees · Cashflow · Customer Portal · Kommo · Daily Log.
Teslimat: 30 modül canlıda, 3-5 pilot müşteri
🧪 V1.5 Hardening
Pentest · KVKK denetimi · Load test (2500 concurrent) · performance tuning · bug bash · onboarding flow iyileştirme · support SLA sistemi.
Teslimat: ISO 27001 hazırlık, SLA sistemi, 10 müşteri
🧠 V2.0 AI + Advanced (14 P2 modülü)
AI Chat · Forecasting · Anomaly Detection · KEP Archive · Contract AI · Deduction Engine · Payment Requests · Cheque Calendar · Machine Timesheet · Barcode · Transfers · Tender Win Analysis.
Teslimat: 44 modül, AI destekli raporlar, 25-30 müşteri
🌱 V3.0 Ar-Ge (10 P3 modülü + Karbon)
Carbon Dashboard · EPD Material · Logistic CO₂ · Waste Management · SKDM Reporter · SuperAdmin SaaS · Live Map · Settings · Multi-tenancy UI · Mobile İşçi App.
Teslimat: 54 modül complete, SKDM-ready, AB pazarı hazır, 50+ müşteri
📈 Growth & Scale
Yatırım turu (Series A) · yurt dışı genişleme (KKTC, Azerbaycan) · 3. parti marketplace · mobil çalışan app'i · BIM entegrasyon (Revit).
Teslimat: ₺20M+ ARR, 150+ müşteri
📊 Modül Dağılım Gantt (Simplified)
Modül Grubu │ Q2-26 │ Q3-26 │ Q4-26 │ Q1-27 │ Q2-27 │ Q3-27 │
──────────────────────┼───────┼───────┼───────┼───────┼───────┼───────┤
Discovery & Design │ ████ │ │ │ │ │ │
Identity + RBAC │ ████│███ │ │ │ │ │
Projects + Contracts │ │ █████ │ │ │ │ │
Finance Core │ │ █████ │ │ │ │ │
HR + Timesheet │ │ ████ │ │ │ │ │
Mobile MVP │ │ ███ │███ │ │ │ │
Fuel Radar (ML) │ │ ██ │██ │ │ │ │
Luca Integration │ │ █████│ │ │ │ │
───── V1.0 MVP ───────┼───────┼───────┼───●───┼───────┼───────┼───────┤
Tenders + BOM │ │ │ █████│ │ │ │
Inventory + Fleet │ │ │ █████│ │ │ │
Documents V1/V2 │ │ │ ████│ │ │ │
Customer Portal │ │ │ ███│█ │ │ │
───── V1.1 Release ───┼───────┼───────┼───────┼─●─────┼───────┼───────┤
Hardening + Pentest │ │ │ │ ████ │ │ │
───── V1.5 Stable ────┼───────┼───────┼───────┼─────●─┼───────┼───────┤
AI Reports + Chat │ │ │ │ │███████│ │
Anomaly + Forecast │ │ │ │ │█████ │ │
KEP + Contract AI │ │ │ │ │ █████ │ │
───── V2.0 AI ────────┼───────┼───────┼───────┼───────┼──────●┼───────┤
🌱 Carbon Suite │ │ │ │ │ │ █████ │
SuperAdmin SaaS │ │ │ │ │ │ ████ │
İşçi Mobile │ │ │ │ │ │ ███ │
───── V3.0 Complete ──┼───────┼───────┼───────┼───────┼───────┼─────●─┤
Bütçe & Maliyet Analizi
18 aylık toplam yatırım tahmini. Ekip maaşları + altyapı + lisanslar + operasyon giderleri.
💰 Toplam Maliyet Özet
📊 Aylık Breakdown (Tahmini)
| Gider Kalemi | Aylık Tutar | 18 Ay Toplam | Not |
|---|---|---|---|
| Core Team (9 kişi) | ₺655K | ₺11.79M | Kıdem, ikramiye dahil |
| ML Engineer (6 ay) | ₺160K | ₺960K | Ay 10-16 |
| Freelance (güvenlik, hukuk) | ~₺35K | ₺630K | Pentest + KVKK |
| Cloud (AWS EKS) | ₺55K | ₺990K | Compute + network |
| DB (PostgreSQL RDS + Timescale) | ₺18K | ₺324K | Primary + replicas |
| Storage (S3 + backups) | ₺8K | ₺144K | Fotoğraf + doküman |
| CDN + WAF (Cloudflare Enterprise) | ₺6K | ₺108K | Edge caching |
| Monitoring (Datadog) | ₺9K | ₺162K | APM + logs + traces |
| AI (OpenAI API) | ₺30K | ₺540K | Sadece FAZ 4'ten sonra |
| Software Licenses | ₺14K | ₺252K | GitHub, Jira, Figma, Slack, vs. |
| Legal + Accounting | ₺8K | ₺144K | KVKK sözleşmeleri |
| Marketing (pilot ile başla) | ₺25K | ₺450K | Web sitesi, SEO, LinkedIn ads |
| Yedek / Misc (%5 buffer) | ₺33K | ₺590K | Beklenmedik |
| TOPLAM (18 AY) | ₺14.79M | ||
📈 Gelir Projeksiyonu (5 Yıl)
| Yıl | Müşteri Say. | Ort. Ödeme (₺/ay) | MRR | ARR |
|---|---|---|---|---|
| Y1 (2027) | 12 | ₺18K | ₺216K | ₺2.6M |
| Y2 (2028) | 38 | ₺22K | ₺836K | ₺10M |
| Y3 (2029) | 80 | ₺28K | ₺2.24M | ₺26.9M |
| Y4 (2030) | 140 | ₺32K | ₺4.48M | ₺53.8M |
| Y5 (2031) | 220 | ₺36K | ₺7.92M | ₺95M |
Başabaş noktası ~32. ayda (Y3 ortası) ulaşılır. 5 yıl sonunda toplam ₺95M ARR ile yatırımın ~6.5 katı geri dönüş. Series A (Y2 sonu) ile hızlanma mümkün.
Risk Haritası
18 ana risk tanımlanmıştır. Her biri için olasılık, etki, azaltma stratejisi belirlenmiştir.
⚠️ Risk Matrisi
Terimler Sözlüğü
Dokümanda geçen teknik ve iş terimleri.
| Terim | Açıklama |
|---|---|
| ABAC | Attribute-Based Access Control. Kullanıcı özellikleri + bağlam bazlı yetki. |
| APM | Application Performance Monitoring. Uygulama hız/hata izleme. |
| ARR | Annual Recurring Revenue. Yıllık tekrarlayan gelir. |
| BOM | Bill of Materials. Malzeme listesi / keşif dökümü. |
| CBAM | Carbon Border Adjustment Mechanism. AB sınır karbon düzenlemesi. |
| CI/CD | Continuous Integration / Deployment. Otomatik build ve yayın. |
| DPA | Data Processing Agreement. Veri işleme sözleşmesi (KVKK). |
| DPIA | Data Protection Impact Assessment. Veri koruma etki analizi. |
| EPD | Environmental Product Declaration. Çevresel ürün beyanı. |
| GHG | Greenhouse Gas. Sera gazı (CO₂ dahil). |
| HSTS | HTTP Strict Transport Security. HTTPS zorlaması. |
| JWT | JSON Web Token. Stateless kimlik doğrulama token'ı. |
| KEP | Kayıtlı E-Posta. PTT'nin yasal delil niteliğinde e-posta sistemi. |
| MRR | Monthly Recurring Revenue. Aylık tekrarlayan gelir. |
| OCR | Optical Character Recognition. Fotoğraftan metin tanıma. |
| P2P | Procure-to-Pay. Satın alma-ödeme süreci. |
| PDKS | Personel Devam Kontrol Sistemi. |
| PII | Personally Identifiable Information. Kişisel veriler (TC, IBAN). |
| RAG | Retrieval-Augmented Generation. AI'ın veritabanından bilgi çekmesi. |
| RBAC | Role-Based Access Control. Rol bazlı yetki yönetimi. |
| RPO / RTO | Recovery Point / Time Objective. Veri kaybı / geri dönüş süresi hedefi. |
| SaaS | Software as a Service. Bulut bazlı yazılım hizmeti. |
| SKDM | Sınırda Karbon Düzenleme Mekanizması (Türkçe CBAM). |
| SLA | Service Level Agreement. Servis seviyesi taahhüdü. |
| SoD | Segregation of Duties. Görevler ayrılığı (fraud önleme). |
| SSE | Server-Sent Events. Tek yönlü streaming protokolü. |
| TTI | Time to Interactive. Sayfanın kullanılabilir olması süresi. |
| VERBIS | Veri Sorumluları Sicil Bilgi Sistemi (KVKK resmi kayıt). |
| WAF | Web Application Firewall. Uygulama seviyesi güvenlik duvarı. |
Referanslar & Kaynaklar
Mimari kararların arkasındaki yasal, teknik ve sektörel referanslar.
📚 Yasal Düzenlemeler
- KVKK Kanunu 6698 · 07.04.2016 · Kişisel Verileri Koruma
- 6331 sayılı İş Sağlığı ve Güvenliği Kanunu · İSG bildirim zorunluluğu
- 4734 sayılı Kamu İhale Kanunu · EKAP sistemi
- SGK Aylık E-Bildirge Usul ve Esasları · 2012 yönetmeliği
- 6102 sayılı Türk Ticaret Kanunu · E-defter, e-fatura
- AB 2023/956 Sayılı Düzenleme · CBAM (SKDM) 2026 yürürlük
- Çevre ve Şehircilik Bakanlığı · Atık Yönetmeliği · Tehlikeli atık kodları
🎯 Teknik Standartlar
- ISO 27001:2022 · Bilgi Güvenliği Yönetim Sistemi
- ISO 14025 · Environmental Product Declaration (EPD)
- ISO 14001:2015 · Çevre Yönetim Sistemi
- SOC 2 Type II · Cloud servis güvenlik denetimi
- GHG Protocol Corporate Standard · Scope 1, 2, 3 emisyon
- GLEC Framework v3.0 · Lojistik karbon hesaplama
- OWASP Top 10 (2021) · Web uygulama güvenlik
- NIST Cybersecurity Framework · Siber güvenlik iskeleti
- OpenAPI 3.1 · REST API dokümantasyon standardı
- C4 Model (Simon Brown) · Yazılım mimari görselleştirme
- WCAG 2.2 Level AA · Erişilebilirlik standartları
🛠️ Teknoloji Kaynakları
- Microsoft Learn · .NET 9 ASP.NET Core dokümantasyon
- React Native 0.74 Release Notes · New Architecture
- Next.js 14 App Router · Server Components rehberi
- PostgreSQL 16 Manual · Partitioning, JSONB, pgvector
- Kubernetes Official Docs · EKS production best practices
- AWS Well-Architected Framework · 5 pillar (operational, security, reliability, performance, cost)
- The Twelve-Factor App · SaaS uygulama tasarım prensipleri
- Domain-Driven Design (Eric Evans) · Bounded context, aggregate
- Building Microservices (Sam Newman) · Servis ayrıştırma
🏢 Endüstri Kaynakları
- Türkiye İnşaat Sektörü Raporu 2025 · YapıEndüstri Dergisi
- McKinsey · Construction 2030 · Dijital dönüşüm raporu
- Gartner · Construction Technology Landscape 2026
- Türkiye Çimento Müstahsilleri Birliği (TÇMB) · EPD veritabanı
- Çevre Şehircilik Bakanlığı · Yeşil Mutabakat Eylem Planı 2024
Sorular için:
arch-team@teori.com.tr