# zal9212/projet_deukouway architecture

> Architecture diagram of the GitHub repository zal9212/projet_deukouway, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zal9212/projet_deukouway
- Repository: https://github.com/zal9212/projet_deukouway

## Overview

KYI IMMOBILIER is a Senegalese rental SaaS with client, owner, and SuperAdmin dashboards, property and reservation workflows, payments, owner KYC, support, and a Groq-powered assistant. The main flow spans property management and discovery, reservation requests and approval, payment, and confirmed stays. The graph also shows dashboard orchestration and supporting AI, document, notification, and support capabilities. Relationships are limited to README statements and SOURCE INDEX references; unsampled routing and integrations are not inferred.

Main entry points: [`apps/dashboard/views/client.py`](https://github.com/zal9212/projet_deukouway/blob/develop/apps/dashboard/views/client.py) (Role dashboards), [`apps/ai/services/groq_service.py`](https://github.com/zal9212/projet_deukouway/blob/develop/apps/ai/services/groq_service.py) (Groq model service), [`apps/notifications/services/services.py`](https://github.com/zal9212/projet_deukouway/blob/develop/apps/notifications/services/services.py) (Notifications), [`apps/reservations/services/services.py`](https://github.com/zal9212/projet_deukouway/blob/develop/apps/reservations/services/services.py) (Reservation workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_marketplace["Marketplace &amp; stays"]
  node_property_service["Property management<br/>[services.py]"]
  node_property_catalog["Property catalog<br/>[selectors.py]"]
  node_property_records[("Property records<br/>[models.py]")]
  node_reservation_service["Reservation workflow<br/>[services.py]"]
  node_reservation_queries["Reservation queries<br/>[selectors.py]"]
  node_reservation_records[("Reservation records<br/>[models.py]")]
end

subgraph group_identity["Accounts &amp; verification"]
  node_accounts[("Account and KYC<br/>[models.py]")]
  node_documents["Document verification<br/>[services.py]"]
  node_private_files["Private file storage<br/>[storage.py]"]
end

subgraph group_operations["Platform operations"]
  node_payment_service["Payment operations<br/>[services.py]"]
  node_payment_records[("Payment records<br/>[models.py]")]
  node_notifications["Notifications<br/>[services.py]"]
  node_email["Transactional email<br/>[emails.py]"]
  node_support["Support tickets<br/>[services.py]"]
end

subgraph group_assistant["AI assistant"]
  node_ai_moderation["AI moderation"]
  node_ai_chat["AI assistant<br/>[chatbot_service.py]"]
  node_ai_prompt["Prompt construction<br/>[prompt_builder.py]"]
  node_ai_sanitizer["PII sanitizer<br/>[sanitizer.py]"]
  node_groq["Groq model service<br/>[groq_service.py]"]
  node_ai_usage[("AI usage logs<br/>[models.py]")]
  node_recommendations["Recommendations"]
  node_platform_context["Platform context"]
end

subgraph group_experience["Dashboards &amp; insights"]
  node_dashboard["Role dashboards<br/>[client.py]"]
  node_dashboard_data["Dashboard aggregates<br/>[selectors.py]"]
  node_analytics["Analytics<br/>[views.py]"]
end

node_clients(("Clients and owners"))

node_clients -->|"use dashboards"| node_dashboard
node_dashboard -->|"loads aggregates"| node_dashboard_data
node_dashboard -->|"loads reservations"| node_reservation_queries
node_dashboard -->|"loads properties"| node_property_catalog
node_dashboard -->|"uses payment queries"| node_payment_service
node_dashboard -->|"manages documents"| node_documents
node_dashboard -->|"manages support"| node_support
node_dashboard -->|"loads notifications"| node_notifications
node_dashboard_data -->|"reads"| node_reservation_records
node_dashboard_data -->|"reads"| node_property_records
node_dashboard_data -->|"reads"| node_payment_records
node_property_service -->|"writes"| node_property_records
node_property_service -->|"checks availability"| node_reservation_queries
node_property_service -->|"notifies"| node_notifications
node_property_catalog -->|"queries"| node_property_records
node_reservation_service -->|"creates and updates"| node_reservation_records
node_reservation_service -->|"uses property services"| node_property_service
node_reservation_service -->|"checks workflow"| node_reservation_queries
node_reservation_service -->|"notifies"| node_notifications
node_payment_service -->|"writes payments"| node_payment_records
node_payment_service -->|"uses reservations"| node_reservation_records
node_accounts -->|"stores identity files"| node_private_files
node_documents -->|"associates documents"| node_accounts
node_support -->|"moderates messages"| node_ai_moderation
node_support -->|"alerts admins"| node_notifications
node_ai_chat -->|"builds prompts"| node_ai_prompt
node_ai_chat -->|"sanitizes content"| node_ai_sanitizer
node_ai_chat -->|"requests completions"| node_groq
node_groq -->|"sanitizes inputs"| node_ai_sanitizer
node_groq -->|"logs usage"| node_ai_usage
node_ai_moderation -->|"requests moderation"| node_groq
node_ai_moderation -->|"uses prompts"| node_ai_prompt
node_ai_moderation -->|"sanitizes text"| node_ai_sanitizer
node_recommendations -->|"queries listings"| node_property_catalog
node_recommendations -->|"builds prompts"| node_ai_prompt
node_recommendations -->|"requests completions"| node_groq
node_platform_context -->|"queries listings"| node_property_catalog
node_platform_context -->|"queries payment data"| node_payment_service
node_notifications -->|"sends email"| node_email

click node_dashboard "https://github.com/zal9212/projet_deukouway/blob/develop/apps/dashboard/views/client.py"
click node_dashboard_data "https://github.com/zal9212/projet_deukouway/blob/develop/apps/dashboard/services/selectors.py"
click node_property_service "https://github.com/zal9212/projet_deukouway/blob/develop/apps/properties/services/services.py"
click node_property_catalog "https://github.com/zal9212/projet_deukouway/blob/develop/apps/properties/services/selectors.py"
click node_property_records "https://github.com/zal9212/projet_deukouway/blob/develop/apps/properties/models.py"
click node_reservation_service "https://github.com/zal9212/projet_deukouway/blob/develop/apps/reservations/services/services.py"
click node_reservation_queries "https://github.com/zal9212/projet_deukouway/blob/develop/apps/reservations/services/selectors.py"
click node_reservation_records "https://github.com/zal9212/projet_deukouway/blob/develop/apps/reservations/models.py"
click node_payment_service "https://github.com/zal9212/projet_deukouway/blob/develop/apps/payments/services/services.py"
click node_payment_records "https://github.com/zal9212/projet_deukouway/blob/develop/apps/payments/models.py"
click node_accounts "https://github.com/zal9212/projet_deukouway/blob/develop/apps/accounts/models.py"
click node_documents "https://github.com/zal9212/projet_deukouway/blob/develop/apps/documents/services/services.py"
click node_private_files "https://github.com/zal9212/projet_deukouway/blob/develop/apps/core/storage.py"
click node_notifications "https://github.com/zal9212/projet_deukouway/blob/develop/apps/notifications/services/services.py"
click node_email "https://github.com/zal9212/projet_deukouway/blob/develop/apps/core/emails.py"
click node_support "https://github.com/zal9212/projet_deukouway/blob/develop/apps/support/services/services.py"
click node_ai_moderation "https://github.com/zal9212/projet_deukouway/blob/develop/apps/ai/services/moderation_service.py"
click node_ai_chat "https://github.com/zal9212/projet_deukouway/blob/develop/apps/ai/services/chatbot_service.py"
click node_ai_prompt "https://github.com/zal9212/projet_deukouway/blob/develop/apps/ai/prompt_builder.py"
click node_ai_sanitizer "https://github.com/zal9212/projet_deukouway/blob/develop/apps/ai/sanitizer.py"
click node_groq "https://github.com/zal9212/projet_deukouway/blob/develop/apps/ai/services/groq_service.py"
click node_ai_usage "https://github.com/zal9212/projet_deukouway/blob/develop/apps/ai/models.py"
click node_recommendations "https://github.com/zal9212/projet_deukouway/blob/develop/apps/ai/services/recommendation_engine.py"
click node_platform_context "https://github.com/zal9212/projet_deukouway/blob/develop/apps/ai/services/platform_context.py"
click node_analytics "https://github.com/zal9212/projet_deukouway/blob/develop/apps/analytics/views.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_property_service,node_property_catalog,node_property_records,node_reservation_service,node_reservation_queries,node_reservation_records,node_clients toneBlue
class node_accounts,node_documents,node_private_files toneAmber
class node_payment_service,node_payment_records,node_notifications,node_email,node_support toneMint
class node_ai_moderation,node_ai_chat,node_ai_prompt,node_ai_sanitizer,node_groq,node_ai_usage,node_recommendations,node_platform_context toneRose
class node_dashboard,node_dashboard_data,node_analytics toneIndigo
```

## Components

### Marketplace & stays

- [Property management](https://github.com/zal9212/projet_deukouway/blob/develop/apps/properties/services/services.py): `apps/properties/services/services.py`
- [Property catalog](https://github.com/zal9212/projet_deukouway/blob/develop/apps/properties/services/selectors.py): `apps/properties/services/selectors.py`
- [Property records](https://github.com/zal9212/projet_deukouway/blob/develop/apps/properties/models.py): `apps/properties/models.py`
- [Reservation workflow](https://github.com/zal9212/projet_deukouway/blob/develop/apps/reservations/services/services.py): `apps/reservations/services/services.py`
- [Reservation queries](https://github.com/zal9212/projet_deukouway/blob/develop/apps/reservations/services/selectors.py): `apps/reservations/services/selectors.py`
- [Reservation records](https://github.com/zal9212/projet_deukouway/blob/develop/apps/reservations/models.py): `apps/reservations/models.py`

### Accounts & verification

- [Account and KYC](https://github.com/zal9212/projet_deukouway/blob/develop/apps/accounts/models.py): `apps/accounts/models.py`
- [Document verification](https://github.com/zal9212/projet_deukouway/blob/develop/apps/documents/services/services.py): `apps/documents/services/services.py`
- [Private file storage](https://github.com/zal9212/projet_deukouway/blob/develop/apps/core/storage.py): `apps/core/storage.py`

### Platform operations

- [Payment operations](https://github.com/zal9212/projet_deukouway/blob/develop/apps/payments/services/services.py): `apps/payments/services/services.py`
- [Payment records](https://github.com/zal9212/projet_deukouway/blob/develop/apps/payments/models.py): `apps/payments/models.py`
- [Notifications](https://github.com/zal9212/projet_deukouway/blob/develop/apps/notifications/services/services.py): `apps/notifications/services/services.py`
- [Transactional email](https://github.com/zal9212/projet_deukouway/blob/develop/apps/core/emails.py): `apps/core/emails.py`
- [Support tickets](https://github.com/zal9212/projet_deukouway/blob/develop/apps/support/services/services.py): `apps/support/services/services.py`

### AI assistant

- [AI moderation](https://github.com/zal9212/projet_deukouway/blob/develop/apps/ai/services/moderation_service.py): `apps/ai/services/moderation_service.py`
- [AI assistant](https://github.com/zal9212/projet_deukouway/blob/develop/apps/ai/services/chatbot_service.py): `apps/ai/services/chatbot_service.py`
- [Prompt construction](https://github.com/zal9212/projet_deukouway/blob/develop/apps/ai/prompt_builder.py): `apps/ai/prompt_builder.py`
- [PII sanitizer](https://github.com/zal9212/projet_deukouway/blob/develop/apps/ai/sanitizer.py): `apps/ai/sanitizer.py`
- [Groq model service](https://github.com/zal9212/projet_deukouway/blob/develop/apps/ai/services/groq_service.py): `apps/ai/services/groq_service.py`
- [AI usage logs](https://github.com/zal9212/projet_deukouway/blob/develop/apps/ai/models.py): `apps/ai/models.py`
- [Recommendations](https://github.com/zal9212/projet_deukouway/blob/develop/apps/ai/services/recommendation_engine.py): `apps/ai/services/recommendation_engine.py`
- [Platform context](https://github.com/zal9212/projet_deukouway/blob/develop/apps/ai/services/platform_context.py): `apps/ai/services/platform_context.py`

### Dashboards & insights

- [Role dashboards](https://github.com/zal9212/projet_deukouway/blob/develop/apps/dashboard/views/client.py): `apps/dashboard/views/client.py`
- [Dashboard aggregates](https://github.com/zal9212/projet_deukouway/blob/develop/apps/dashboard/services/selectors.py): `apps/dashboard/services/selectors.py`
- [Analytics](https://github.com/zal9212/projet_deukouway/blob/develop/apps/analytics/views.py): `apps/analytics/views.py`

### Other components

- **Clients and owners**

## Connections

- Clients and owners → Role dashboards: use dashboards
- Role dashboards → Dashboard aggregates: loads aggregates (evidence: `apps/dashboard/views/client.py`)
- Role dashboards → Reservation queries: loads reservations (evidence: `apps/dashboard/views/client.py`)
- Role dashboards → Property catalog: loads properties (evidence: `apps/dashboard/views/client.py`)
- Role dashboards → Payment operations: uses payment queries (evidence: `apps/dashboard/views/client.py`)
- Role dashboards → Document verification: manages documents (evidence: `apps/dashboard/views/client.py`)
- Role dashboards → Support tickets: manages support (evidence: `apps/dashboard/views/client.py`)
- Role dashboards → Notifications: loads notifications (evidence: `apps/dashboard/views/client.py`)
- Dashboard aggregates → Reservation records: reads (evidence: `apps/dashboard/services/selectors.py`)
- Dashboard aggregates → Property records: reads (evidence: `apps/dashboard/services/selectors.py`)
- Dashboard aggregates → Payment records: reads (evidence: `apps/dashboard/services/selectors.py`)
- Property management → Property records: writes (evidence: `apps/properties/services/services.py`)
- Property management → Reservation queries: checks availability (evidence: `apps/properties/services/services.py`)
- Property management → Notifications: notifies (evidence: `apps/properties/services/services.py`)
- Property catalog → Property records: queries (evidence: `apps/properties/services/selectors.py`)
- Reservation workflow → Reservation records: creates and updates (evidence: `apps/reservations/services/services.py`)
- Reservation workflow → Property management: uses property services (evidence: `apps/reservations/services/services.py`)
- Reservation workflow → Reservation queries: checks workflow (evidence: `apps/reservations/services/services.py`)
- Reservation workflow → Notifications: notifies (evidence: `apps/reservations/services/services.py`)
- Payment operations → Payment records: writes payments (evidence: `apps/payments/services/services.py`)
- Payment operations → Reservation records: uses reservations (evidence: `apps/payments/services/services.py`)
- Account and KYC → Private file storage: stores identity files (evidence: `apps/accounts/models.py`)
- Document verification → Account and KYC: associates documents (evidence: `apps/documents/services/services.py`)
- Support tickets → AI moderation: moderates messages (evidence: `apps/support/services/services.py`)
- Support tickets → Notifications: alerts admins (evidence: `apps/support/services/services.py`)
- AI assistant → Prompt construction: builds prompts (evidence: `apps/ai/services/chatbot_service.py`)
- AI assistant → PII sanitizer: sanitizes content (evidence: `apps/ai/services/chatbot_service.py`)
- AI assistant → Groq model service: requests completions (evidence: `apps/ai/services/chatbot_service.py`)
- Groq model service → PII sanitizer: sanitizes inputs (evidence: `apps/ai/services/groq_service.py`)
- Groq model service → AI usage logs: logs usage (evidence: `apps/ai/services/groq_service.py`)
- AI moderation → Groq model service: requests moderation (evidence: `apps/ai/services/moderation_service.py`)
- AI moderation → Prompt construction: uses prompts (evidence: `apps/ai/services/moderation_service.py`)
- AI moderation → PII sanitizer: sanitizes text (evidence: `apps/ai/services/moderation_service.py`)
- Recommendations → Property catalog: queries listings (evidence: `apps/ai/services/recommendation_engine.py`)
- Recommendations → Prompt construction: builds prompts (evidence: `apps/ai/services/recommendation_engine.py`)
- Recommendations → Groq model service: requests completions (evidence: `apps/ai/services/recommendation_engine.py`)
- Platform context → Property catalog: queries listings (evidence: `apps/ai/services/platform_context.py`)
- Platform context → Payment operations: queries payment data (evidence: `apps/ai/services/platform_context.py`)
- Notifications → Transactional email: sends email (evidence: `apps/notifications/services/services.py`)
