> For the complete documentation index, see [llms.txt](https://docs.kangal.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kangal.dev/tr/entegrasyonlar/architecture.md).

# Mimari ve sync yaşam döngüsü

Kangal, provider'ların authentication ve API yapıları farklı olsa bile tutarlı davranması için ortak bir driver contract kullanır.

```
Kangal Console
     |
Integration API
     |
Şifreli config ve secret referansları
     |
Redis Streams job queue (production) -> Integration worker -> Provider API
     |                                           |
Sync history, status, request ID, rate-limit ve hata metadata'sı
```

## Yapılandırma ve secret yönetimi

Provider yapılandırması tenant kapsamındadır. Hassas değerler şifrelenir veya çalışma anında desteklenen bir secret referansından çözülür. API cevapları, kaydedilmiş credential yerine maskelenmiş değer döndürür.

## Job yaşam döngüsü

1. Kurulum isteği provider slug'ını, tenant ve isteğe bağlı resource scope'unu, genel request envelope'unu ve secret-source kurallarını doğrular. `secrets` veya `secrets_ref` alanlarından biri kullanılabilir; ikisi birlikte kullanılamaz.
2. Manuel sync isteği sınırlandırılmış job'ı integration queue'ya ekler.
3. Worker credential'ları çözer; provider driver'ı zorunlu alanları ve bağlantıyı manuel sync çalışırken doğrular.
4. Sonuç sync history'ye kaydedilir ve başarılı iş acknowledge edilir.

## Queue backend'leri

Production deployment'lar durable entegrasyon sync teslimatı için `redis-streams` kullanmalıdır. Bu backend ile tekrar denenebilir hatalar sınırlı retry kullanır, worker kesintisinden sonra acknowledge edilmemiş job'lar geri alınır ve deneme sınırını aşan job'lar dead-letter stream'e taşınır.

`memory` backend'i local development modudur ve kuyruğa alınan işleri application process'i içinde tutar.

## Standartlaştırılmış sonuç metadata'sı

Provider desteklediğinde Kangal şunları kaydeder:

* provider request veya correlation ID;
* authentication ve authorization hata kategorisi;
* rate-limit durumu ve `Retry-After` yönlendirmesi;
* network, timeout, TLS ve validation hata kategorisi;
* aktarılan nesne sayıları ve provider'a özel özet metadata.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.kangal.dev/tr/entegrasyonlar/architecture.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
