# oussema-tarhouni/handyconnect architecture

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

- Interactive diagram: https://gitdiagram.com/oussema-tarhouni/handyconnect
- Repository: https://github.com/oussema-tarhouni/handyconnect

## Overview

HandyConnect is a static, bilingual marketplace directory for finding Tunisian artisans. A client searches by trade and location, filters the directory, opens an artisan profile, and contacts the artisan directly; signed-in users can also submit a review. The repository also documents artisan registration, support and newsletter forms, and an on-site assistant. The README describes the page/data/forms split; source excerpts show directory rendering, form handling, local review storage, and assistant behavior. Other page wiring is documented but not sampled.

Main entry points: [`js/app.js`](https://github.com/oussema-tarhouni/handyconnect/blob/main/js/app.js) (Artisan directory), [`js/ai.js`](https://github.com/oussema-tarhouni/handyconnect/blob/main/js/ai.js) (Assistant answers), [`js/data.js`](https://github.com/oussema-tarhouni/handyconnect/blob/main/js/data.js) (Artisan catalog), [`js/forms.js`](https://github.com/oussema-tarhouni/handyconnect/blob/main/js/forms.js) (Account forms)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_marketplace["Marketplace"]
  node_directory["Artisan directory<br/>[app.js]"]
  node_catalog["Artisan catalog<br/>[data.js]"]
  node_profile["Artisan profiles<br/>[app.js]"]
  node_contact["Direct contact<br/>[profile.html]"]
end

subgraph group_engagement["Forms and engagement"]
  node_signup["Account forms<br/>[forms.js]"]
  node_reviews["Review forms<br/>[forms.js]"]
  node_reviewstate[("Local review state<br/>[forms.js]")]
  node_support["Support and FAQ<br/>[support.html]"]
  node_newsletter["Newsletter form<br/>[forms.js]"]
end

subgraph group_assistant["Assistant"]
  node_assistantui["Assistant widget<br/>[ai.js]"]
  node_assistantlogic["Assistant answers<br/>[ai.js]"]
end

subgraph group_content["Pages and content"]
  node_pages["Page rendering<br/>[app.js]"]
  node_locales["FR and AR content<br/>[data.js]"]
end

node_client(("Client"))
node_artisan(("Artisan"))
node_aiendpoint{{"Optional AI service"}}
node_formapi{{"Optional form API"}}

node_client -->|"searches"| node_directory
node_directory -->|"filters"| node_catalog
node_directory -->|"opens"| node_profile
node_profile -->|"offers contact"| node_contact
node_client -->|"submits"| node_reviews
node_reviews -->|"stores locally"| node_reviewstate
node_artisan -->|"registers"| node_signup
node_client -->|"seeks help"| node_support
node_client -->|"subscribes"| node_newsletter
node_client -->|"asks"| node_assistantui
node_assistantui -->|"dispatches"| node_assistantlogic
node_assistantlogic -->|"searches"| node_catalog
node_assistantlogic -.->|"posts optionally"| node_aiendpoint
node_signup -.->|"posts optionally"| node_formapi
node_newsletter -.->|"posts optionally"| node_formapi
node_pages -->|"renders from"| node_catalog
node_pages -->|"renders bilingually"| node_locales

click node_directory "https://github.com/oussema-tarhouni/handyconnect/blob/main/js/app.js"
click node_catalog "https://github.com/oussema-tarhouni/handyconnect/blob/main/js/data.js"
click node_profile "https://github.com/oussema-tarhouni/handyconnect/blob/main/js/app.js"
click node_contact "https://github.com/oussema-tarhouni/handyconnect/blob/main/profile.html"
click node_signup "https://github.com/oussema-tarhouni/handyconnect/blob/main/js/forms.js"
click node_reviews "https://github.com/oussema-tarhouni/handyconnect/blob/main/js/forms.js"
click node_reviewstate "https://github.com/oussema-tarhouni/handyconnect/blob/main/js/forms.js"
click node_support "https://github.com/oussema-tarhouni/handyconnect/blob/main/support.html"
click node_newsletter "https://github.com/oussema-tarhouni/handyconnect/blob/main/js/forms.js"
click node_assistantui "https://github.com/oussema-tarhouni/handyconnect/blob/main/js/ai.js"
click node_assistantlogic "https://github.com/oussema-tarhouni/handyconnect/blob/main/js/ai.js"
click node_pages "https://github.com/oussema-tarhouni/handyconnect/blob/main/js/app.js"
click node_locales "https://github.com/oussema-tarhouni/handyconnect/blob/main/js/data.js"

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_directory,node_catalog,node_profile,node_contact,node_client toneBlue
class node_signup,node_reviews,node_reviewstate,node_support,node_newsletter toneAmber
class node_assistantui,node_assistantlogic,node_formapi toneMint
class node_pages,node_locales toneRose
class node_artisan,node_aiendpoint toneIndigo
```

## Components

### Marketplace

- [Artisan directory](https://github.com/oussema-tarhouni/handyconnect/blob/main/js/app.js): `js/app.js`
- [Artisan catalog](https://github.com/oussema-tarhouni/handyconnect/blob/main/js/data.js): `js/data.js`
- [Artisan profiles](https://github.com/oussema-tarhouni/handyconnect/blob/main/js/app.js): `js/app.js`
- [Direct contact](https://github.com/oussema-tarhouni/handyconnect/blob/main/profile.html): `profile.html`

### Forms and engagement

- [Account forms](https://github.com/oussema-tarhouni/handyconnect/blob/main/js/forms.js): `js/forms.js`
- [Review forms](https://github.com/oussema-tarhouni/handyconnect/blob/main/js/forms.js): `js/forms.js`
- [Local review state](https://github.com/oussema-tarhouni/handyconnect/blob/main/js/forms.js): `js/forms.js`
- [Support and FAQ](https://github.com/oussema-tarhouni/handyconnect/blob/main/support.html): `support.html`
- [Newsletter form](https://github.com/oussema-tarhouni/handyconnect/blob/main/js/forms.js): `js/forms.js`

### Assistant

- [Assistant widget](https://github.com/oussema-tarhouni/handyconnect/blob/main/js/ai.js): `js/ai.js`
- [Assistant answers](https://github.com/oussema-tarhouni/handyconnect/blob/main/js/ai.js): `js/ai.js`

### Pages and content

- [Page rendering](https://github.com/oussema-tarhouni/handyconnect/blob/main/js/app.js): `js/app.js`
- [FR and AR content](https://github.com/oussema-tarhouni/handyconnect/blob/main/js/data.js): `js/data.js`

### Other components

- **Client**
- **Artisan**
- **Optional AI service**
- **Optional form API**

## Connections

- Client → Artisan directory: searches (evidence: `js/app.js`)
- Artisan directory → Artisan catalog: filters (evidence: `js/app.js`)
- Artisan directory → Artisan profiles: opens (evidence: `js/app.js`)
- Artisan profiles → Direct contact: offers contact (evidence: `README.txt`)
- Client → Review forms: submits (evidence: `js/forms.js`)
- Review forms → Local review state: stores locally (evidence: `js/forms.js`)
- Artisan → Account forms: registers (evidence: `README.txt`)
- Client → Support and FAQ: seeks help (evidence: `README.txt`)
- Client → Newsletter form: subscribes (evidence: `README.txt`)
- Client → Assistant widget: asks (evidence: `js/ai.js`)
- Assistant widget → Assistant answers: dispatches (evidence: `js/ai.js`)
- Assistant answers → Artisan catalog: searches (evidence: `js/ai.js`)
- Assistant answers → Optional AI service: posts optionally (evidence: `js/ai.js`)
- Account forms → Optional form API: posts optionally (evidence: `js/forms.js`)
- Newsletter form → Optional form API: posts optionally (evidence: `js/forms.js`)
- Page rendering → Artisan catalog: renders from (evidence: `README.txt`)
- Page rendering → FR and AR content: renders bilingually (evidence: `README.txt`)
