# ahmadabulhawa/aqar-ai architecture

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

- Interactive diagram: https://gitdiagram.com/ahmadabulhawa/aqar-ai
- Repository: https://github.com/ahmadabulhawa/aqar-ai

## Overview

Aqar AI is a room-design and furniture-catalog product: users provide room details, receive a tailored furniture selection and rendered design, and can browse or manage products and templates. A separate catalog-import capability ingests retailer products for use in the catalog. The map reflects documented imports and relationships in the SOURCE INDEX and README; several frontend-to-backend connections and unsampled service internals are not verified.

Main entry points: [`app/routes/design_routes.py`](https://github.com/ahmadabulhawa/aqar-ai/blob/main/app/routes/design_routes.py) (Design workflow), [`app/main.py`](https://github.com/ahmadabulhawa/aqar-ai/blob/main/app/main.py) (FastAPI application), [`frontend/src/app/api/backend/[...path]/route.ts`](https://github.com/ahmadabulhawa/aqar-ai/blob/main/frontend/src/app/api/backend/%5B...path%5D/route.ts) (Backend proxy), [`app/database.py`](https://github.com/ahmadabulhawa/aqar-ai/blob/main/app/database.py) (Application database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_frontend["Web app<br/>[page.tsx]"]
  node_studio["Design studio<br/>[page.tsx]"]
  node_templates_ui["Templates UI<br/>[page.tsx]"]
  node_shop_ui["Product shop<br/>[page.tsx]"]
  node_api_proxy["Backend proxy<br/>[route.ts]"]
end

subgraph group_design["Room design"]
  node_room_intake["Room intake<br/>[room_routes.py]"]
  node_design_api["Design workflow<br/>[design_routes.py]"]
  node_room_analysis["Room analysis"]
  node_constraints["Space constraints"]
  node_selection["Furniture selection"]
  node_composition["Composition fit"]
  node_rendering["Design rendering"]
  node_template_service["Design templates"]
end

subgraph group_catalog["Furniture catalog"]
  node_furniture_api["Furniture management"]
  node_catalog_import["Retailer import<br/>[runner.py]"]
  node_retailer_adapters["Retailer adapters"]
  node_ikea_import["IKEA product import"]
end

subgraph group_platform["Backend platform"]
  node_database[("Application database<br/>[database.py]")]
  node_backend["FastAPI application<br/>[main.py]"]
end

node_user(("User"))

node_user -->|"uses"| node_frontend
node_user -->|"edits designs"| node_studio
node_user -->|"browses"| node_templates_ui
node_user -->|"browses products"| node_shop_ui
node_frontend -.->|"requests"| node_api_proxy
node_studio -.->|"requests"| node_api_proxy
node_templates_ui -.->|"requests"| node_api_proxy
node_shop_ui -.->|"requests"| node_api_proxy
node_api_proxy -.->|"forwards requests"| node_backend
node_backend -->|"mounts routes"| node_room_intake
node_backend -->|"mounts routes"| node_design_api
node_backend -->|"mounts routes"| node_furniture_api
node_backend -->|"initializes"| node_database
node_room_intake -->|"stores room requests"| node_database
node_design_api -->|"uses analysis"| node_room_analysis
node_design_api -->|"builds constraints"| node_constraints
node_design_api -->|"selects products"| node_selection
node_design_api -->|"checks fit"| node_composition
node_design_api -->|"renders design"| node_rendering
node_design_api -->|"matches templates"| node_template_service
node_furniture_api -->|"reads and writes"| node_database
node_catalog_import -.->|"dispatches imports"| node_retailer_adapters
node_ikea_import -->|"adds products"| node_database

click node_frontend "https://github.com/ahmadabulhawa/aqar-ai/blob/main/frontend/src/app/page.tsx"
click node_studio "https://github.com/ahmadabulhawa/aqar-ai/blob/main/frontend/src/app/studio/page.tsx"
click node_templates_ui "https://github.com/ahmadabulhawa/aqar-ai/blob/main/frontend/src/app/templates/page.tsx"
click node_shop_ui "https://github.com/ahmadabulhawa/aqar-ai/blob/main/frontend/src/app/shop/page.tsx"
click node_api_proxy "https://github.com/ahmadabulhawa/aqar-ai/blob/main/frontend/src/app/api/backend/%5B...path%5D/route.ts"
click node_room_intake "https://github.com/ahmadabulhawa/aqar-ai/blob/main/app/routes/room_routes.py"
click node_design_api "https://github.com/ahmadabulhawa/aqar-ai/blob/main/app/routes/design_routes.py"
click node_room_analysis "https://github.com/ahmadabulhawa/aqar-ai/blob/main/app/services/room_analysis_service.py"
click node_constraints "https://github.com/ahmadabulhawa/aqar-ai/blob/main/app/services/architectural_constraint_service.py"
click node_selection "https://github.com/ahmadabulhawa/aqar-ai/blob/main/app/services/unified_selection_service.py"
click node_composition "https://github.com/ahmadabulhawa/aqar-ai/blob/main/app/services/composition_fit_service.py"
click node_rendering "https://github.com/ahmadabulhawa/aqar-ai/blob/main/app/services/openai_image_service.py"
click node_template_service "https://github.com/ahmadabulhawa/aqar-ai/blob/main/app/services/design_template_service.py"
click node_furniture_api "https://github.com/ahmadabulhawa/aqar-ai/blob/main/app/routes/furniture_routes.py"
click node_catalog_import "https://github.com/ahmadabulhawa/aqar-ai/blob/main/app/catalog_import/runner.py"
click node_retailer_adapters "https://github.com/ahmadabulhawa/aqar-ai/tree/main/app/catalog_import/adapters"
click node_ikea_import "https://github.com/ahmadabulhawa/aqar-ai/blob/main/app/services/ikea_product_import_service.py"
click node_database "https://github.com/ahmadabulhawa/aqar-ai/blob/main/app/database.py"
click node_backend "https://github.com/ahmadabulhawa/aqar-ai/blob/main/app/main.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_frontend,node_studio,node_templates_ui,node_shop_ui,node_api_proxy,node_user toneBlue
class node_room_intake,node_design_api,node_room_analysis,node_constraints,node_selection,node_composition,node_rendering,node_template_service toneAmber
class node_furniture_api,node_catalog_import,node_retailer_adapters,node_ikea_import toneMint
class node_database,node_backend toneRose
```

## Components

### User experience

- [Web app](https://github.com/ahmadabulhawa/aqar-ai/blob/main/frontend/src/app/page.tsx): `frontend/src/app/page.tsx`
- [Design studio](https://github.com/ahmadabulhawa/aqar-ai/blob/main/frontend/src/app/studio/page.tsx): `frontend/src/app/studio/page.tsx`
- [Templates UI](https://github.com/ahmadabulhawa/aqar-ai/blob/main/frontend/src/app/templates/page.tsx): `frontend/src/app/templates/page.tsx`
- [Product shop](https://github.com/ahmadabulhawa/aqar-ai/blob/main/frontend/src/app/shop/page.tsx): `frontend/src/app/shop/page.tsx`
- [Backend proxy](https://github.com/ahmadabulhawa/aqar-ai/blob/main/frontend/src/app/api/backend/%5B...path%5D/route.ts): `frontend/src/app/api/backend/[...path]/route.ts`

### Room design

- [Room intake](https://github.com/ahmadabulhawa/aqar-ai/blob/main/app/routes/room_routes.py): `app/routes/room_routes.py`
- [Design workflow](https://github.com/ahmadabulhawa/aqar-ai/blob/main/app/routes/design_routes.py): `app/routes/design_routes.py`
- [Room analysis](https://github.com/ahmadabulhawa/aqar-ai/blob/main/app/services/room_analysis_service.py): `app/services/room_analysis_service.py`
- [Space constraints](https://github.com/ahmadabulhawa/aqar-ai/blob/main/app/services/architectural_constraint_service.py): `app/services/architectural_constraint_service.py`
- [Furniture selection](https://github.com/ahmadabulhawa/aqar-ai/blob/main/app/services/unified_selection_service.py): `app/services/unified_selection_service.py`
- [Composition fit](https://github.com/ahmadabulhawa/aqar-ai/blob/main/app/services/composition_fit_service.py): `app/services/composition_fit_service.py`
- [Design rendering](https://github.com/ahmadabulhawa/aqar-ai/blob/main/app/services/openai_image_service.py): `app/services/openai_image_service.py`
- [Design templates](https://github.com/ahmadabulhawa/aqar-ai/blob/main/app/services/design_template_service.py): `app/services/design_template_service.py`

### Furniture catalog

- [Furniture management](https://github.com/ahmadabulhawa/aqar-ai/blob/main/app/routes/furniture_routes.py): `app/routes/furniture_routes.py`
- [Retailer import](https://github.com/ahmadabulhawa/aqar-ai/blob/main/app/catalog_import/runner.py): `app/catalog_import/runner.py`
- [Retailer adapters](https://github.com/ahmadabulhawa/aqar-ai/tree/main/app/catalog_import/adapters): `app/catalog_import/adapters`
- [IKEA product import](https://github.com/ahmadabulhawa/aqar-ai/blob/main/app/services/ikea_product_import_service.py): `app/services/ikea_product_import_service.py`

### Backend platform

- [Application database](https://github.com/ahmadabulhawa/aqar-ai/blob/main/app/database.py): `app/database.py`
- [FastAPI application](https://github.com/ahmadabulhawa/aqar-ai/blob/main/app/main.py): `app/main.py`

### Other components

- **User**

## Connections

- User → Web app: uses (evidence: `frontend/src/app/page.tsx`)
- User → Design studio: edits designs (evidence: `frontend/src/app/studio/page.tsx`)
- User → Templates UI: browses (evidence: `frontend/src/app/templates/page.tsx`)
- User → Product shop: browses products (evidence: `frontend/src/app/shop/page.tsx`)
- Web app → Backend proxy: requests
- Design studio → Backend proxy: requests
- Templates UI → Backend proxy: requests
- Product shop → Backend proxy: requests
- Backend proxy → FastAPI application: forwards requests
- FastAPI application → Room intake: mounts routes (evidence: `app/main.py`)
- FastAPI application → Design workflow: mounts routes (evidence: `app/main.py`)
- FastAPI application → Furniture management: mounts routes (evidence: `app/main.py`)
- FastAPI application → Application database: initializes (evidence: `app/main.py`)
- Room intake → Application database: stores room requests (evidence: `app/routes/room_routes.py`)
- Design workflow → Room analysis: uses analysis (evidence: `app/routes/design_routes.py`)
- Design workflow → Space constraints: builds constraints (evidence: `app/routes/design_routes.py`)
- Design workflow → Furniture selection: selects products (evidence: `app/routes/design_routes.py`)
- Design workflow → Composition fit: checks fit (evidence: `app/routes/design_routes.py`)
- Design workflow → Design rendering: renders design (evidence: `app/routes/design_routes.py`)
- Design workflow → Design templates: matches templates (evidence: `app/routes/design_routes.py`)
- Furniture management → Application database: reads and writes (evidence: `app/routes/furniture_routes.py`)
- Retailer import → Retailer adapters: dispatches imports
- IKEA product import → Application database: adds products (evidence: `README.md`)
