# l2mit-misa/finale_web architecture

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

- Interactive diagram: https://gitdiagram.com/l2mit-misa/finale_web
- Repository: https://github.com/l2mit-misa/finale_web

## Overview

Connecteo is a place-discovery assistant: users submit a natural-language request, receive conversational results and place details, then explore them on a map, including connectivity and safety information. The repository also contains a separate search-parsing function, a Python assistant/enrichment backend, authentication, localization, and download/informational pages. The README is only a Vite template; architecture evidence comes mainly from the supplied source index and excerpts, so unsampled service links are omitted or marked unverified.

Main entry points: [`backend/scriptpy/conversation.py`](https://github.com/l2mit-misa/finale_web/blob/main/backend/scriptpy/conversation.py) (Conversation orchestration), [`src/App.tsx`](https://github.com/l2mit-misa/finale_web/blob/main/src/App.tsx) (Page routing), [`src/pages/Search/SearchPage.tsx`](https://github.com/l2mit-misa/finale_web/blob/main/src/pages/Search/SearchPage.tsx) (Search session), [`src/services/assistant.ts`](https://github.com/l2mit-misa/finale_web/blob/main/src/services/assistant.ts) (Assistant client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web experience"]
  node_app["Page routing<br/>[App.tsx]"]
  node_search_page["Search session<br/>[SearchPage.tsx]"]
  node_search_results["Results and chat<br/>[SearchResults.tsx]"]
  node_map["Place map<br/>[ConnecteoMap.tsx]"]
  node_security_panel["Safety view"]
  node_security_data["Safety data hook<br/>[useSecurityData.ts]"]
  node_language["Localization"]
end

subgraph group_assistant["Assistant and search"]
  node_assistant_service["Assistant client<br/>[assistant.ts]"]
  node_search_types["Response contract<br/>[searchTypes.ts]"]
  node_conversation["Conversation orchestration<br/>[conversation.py]"]
  node_agent["AI agent<br/>[agent_ia.py]"]
  node_search_engine["Place search<br/>[recherche.py]"]
  node_clarification["Query clarification<br/>[clarification.py]"]
  node_search_function["Query parser<br/>[parseQuery.ts]"]
  node_search_entry["Search function entry<br/>[index.ts]"]
end

subgraph group_enrichment["Place intelligence"]
  node_poi["POI knowledge<br/>[poi_osm.py]"]
  node_web_search["Web research<br/>[recherche_web.py]"]
  node_image_search["Image research"]
  node_result_format["Result assembly<br/>[resultat_json.py]"]
  node_connectivity["Connectivity client<br/>[connectivite.ts]"]
end

subgraph group_platform["Identity and platform"]
  node_auth_page["Sign-in page<br/>[Auth.tsx]"]
  node_auth_service["Authentication service<br/>[auth.ts]"]
  node_supabase_client["Supabase client<br/>[supabase.ts]"]
  node_download["Download page<br/>[DownloadPage.tsx]"]
end

node_visitor(("Visitor"))
node_supabase["Supabase"]

node_visitor -->|"opens"| node_app
node_app -->|"routes to"| node_search_page
node_search_page -->|"requests answers"| node_assistant_service
node_search_page -->|"renders results"| node_search_results
node_search_page -->|"renders map"| node_map
node_search_page -->|"uses contract"| node_search_types
node_search_results -->|"requests assistant"| node_assistant_service
node_search_results -->|"uses contract"| node_search_types
node_map -.->|"shows safety"| node_security_panel
node_security_data -->|"uses types"| node_search_types
node_assistant_service -->|"uses contract"| node_search_types
node_assistant_service -.->|"calls backend"| node_conversation
node_conversation -->|"uses agent"| node_agent
node_conversation -->|"runs searches"| node_search_engine
node_conversation -->|"checks categories"| node_poi
node_conversation -->|"uses research"| node_web_search
node_conversation -->|"uses image search"| node_image_search
node_conversation -->|"reads results"| node_result_format
node_conversation -.->|"may clarify"| node_clarification
node_search_entry -.->|"parses query"| node_search_function
node_map -.->|"loads connectivity"| node_connectivity
node_auth_page -->|"invokes sign-in"| node_auth_service
node_app -->|"handles return"| node_auth_service
node_auth_service -->|"uses client"| node_supabase_client
node_supabase_client -->|"authenticates"| node_supabase
node_app -->|"routes to"| node_download
node_app -->|"provides language"| node_language

click node_app "https://github.com/l2mit-misa/finale_web/blob/main/src/App.tsx"
click node_search_page "https://github.com/l2mit-misa/finale_web/blob/main/src/pages/Search/SearchPage.tsx"
click node_search_results "https://github.com/l2mit-misa/finale_web/blob/main/src/components/SearchResults/SearchResults.tsx"
click node_map "https://github.com/l2mit-misa/finale_web/blob/main/src/components/ConnecteoMap/ConnecteoMap.tsx"
click node_security_panel "https://github.com/l2mit-misa/finale_web/blob/main/src/components/ConnecteoMap/PanneauSecurite.tsx"
click node_security_data "https://github.com/l2mit-misa/finale_web/blob/main/src/components/ConnecteoMap/useSecurityData.ts"
click node_language "https://github.com/l2mit-misa/finale_web/blob/main/src/i18n/LanguageContext.tsx"
click node_assistant_service "https://github.com/l2mit-misa/finale_web/blob/main/src/services/assistant.ts"
click node_search_types "https://github.com/l2mit-misa/finale_web/blob/main/src/pages/Search/searchTypes.ts"
click node_conversation "https://github.com/l2mit-misa/finale_web/blob/main/backend/scriptpy/conversation.py"
click node_agent "https://github.com/l2mit-misa/finale_web/blob/main/backend/scriptpy/agent_ia.py"
click node_search_engine "https://github.com/l2mit-misa/finale_web/blob/main/backend/scriptpy/recherche.py"
click node_clarification "https://github.com/l2mit-misa/finale_web/blob/main/backend/scriptpy/clarification.py"
click node_search_function "https://github.com/l2mit-misa/finale_web/blob/main/supabase/functions/search/parser/parseQuery.ts"
click node_search_entry "https://github.com/l2mit-misa/finale_web/blob/main/supabase/functions/search/index.ts"
click node_poi "https://github.com/l2mit-misa/finale_web/blob/main/backend/scriptpy/poi_osm.py"
click node_web_search "https://github.com/l2mit-misa/finale_web/blob/main/backend/scriptpy/recherche_web.py"
click node_image_search "https://github.com/l2mit-misa/finale_web/blob/main/backend/scriptpy/recherche_images.py"
click node_result_format "https://github.com/l2mit-misa/finale_web/blob/main/backend/scriptpy/resultat_json.py"
click node_connectivity "https://github.com/l2mit-misa/finale_web/blob/main/src/services/connectivite.ts"
click node_auth_page "https://github.com/l2mit-misa/finale_web/blob/main/src/pages/Auth/Auth.tsx"
click node_auth_service "https://github.com/l2mit-misa/finale_web/blob/main/src/services/auth.ts"
click node_supabase_client "https://github.com/l2mit-misa/finale_web/blob/main/src/services/supabase.ts"
click node_download "https://github.com/l2mit-misa/finale_web/blob/main/src/pages/Download/DownloadPage.tsx"

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_app,node_search_page,node_search_results,node_map,node_security_panel,node_security_data,node_language toneBlue
class node_assistant_service,node_search_types,node_conversation,node_agent,node_search_engine,node_clarification,node_search_function,node_search_entry toneAmber
class node_poi,node_web_search,node_image_search,node_result_format,node_connectivity toneMint
class node_auth_page,node_auth_service,node_supabase_client,node_download toneRose
class node_visitor,node_supabase toneIndigo
```

## Components

### Web experience

- [Page routing](https://github.com/l2mit-misa/finale_web/blob/main/src/App.tsx): `src/App.tsx`
- [Search session](https://github.com/l2mit-misa/finale_web/blob/main/src/pages/Search/SearchPage.tsx): `src/pages/Search/SearchPage.tsx`
- [Results and chat](https://github.com/l2mit-misa/finale_web/blob/main/src/components/SearchResults/SearchResults.tsx): `src/components/SearchResults/SearchResults.tsx`
- [Place map](https://github.com/l2mit-misa/finale_web/blob/main/src/components/ConnecteoMap/ConnecteoMap.tsx): `src/components/ConnecteoMap/ConnecteoMap.tsx`
- [Safety view](https://github.com/l2mit-misa/finale_web/blob/main/src/components/ConnecteoMap/PanneauSecurite.tsx): `src/components/ConnecteoMap/PanneauSecurite.tsx`
- [Safety data hook](https://github.com/l2mit-misa/finale_web/blob/main/src/components/ConnecteoMap/useSecurityData.ts): `src/components/ConnecteoMap/useSecurityData.ts`
- [Localization](https://github.com/l2mit-misa/finale_web/blob/main/src/i18n/LanguageContext.tsx): `src/i18n/LanguageContext.tsx`

### Assistant and search

- [Assistant client](https://github.com/l2mit-misa/finale_web/blob/main/src/services/assistant.ts): `src/services/assistant.ts`
- [Response contract](https://github.com/l2mit-misa/finale_web/blob/main/src/pages/Search/searchTypes.ts): `src/pages/Search/searchTypes.ts`
- [Conversation orchestration](https://github.com/l2mit-misa/finale_web/blob/main/backend/scriptpy/conversation.py): `backend/scriptpy/conversation.py`
- [AI agent](https://github.com/l2mit-misa/finale_web/blob/main/backend/scriptpy/agent_ia.py): `backend/scriptpy/agent_ia.py`
- [Place search](https://github.com/l2mit-misa/finale_web/blob/main/backend/scriptpy/recherche.py): `backend/scriptpy/recherche.py`
- [Query clarification](https://github.com/l2mit-misa/finale_web/blob/main/backend/scriptpy/clarification.py): `backend/scriptpy/clarification.py`
- [Query parser](https://github.com/l2mit-misa/finale_web/blob/main/supabase/functions/search/parser/parseQuery.ts): `supabase/functions/search/parser/parseQuery.ts`
- [Search function entry](https://github.com/l2mit-misa/finale_web/blob/main/supabase/functions/search/index.ts): `supabase/functions/search/index.ts`

### Place intelligence

- [POI knowledge](https://github.com/l2mit-misa/finale_web/blob/main/backend/scriptpy/poi_osm.py): `backend/scriptpy/poi_osm.py`
- [Web research](https://github.com/l2mit-misa/finale_web/blob/main/backend/scriptpy/recherche_web.py): `backend/scriptpy/recherche_web.py`
- [Image research](https://github.com/l2mit-misa/finale_web/blob/main/backend/scriptpy/recherche_images.py): `backend/scriptpy/recherche_images.py`
- [Result assembly](https://github.com/l2mit-misa/finale_web/blob/main/backend/scriptpy/resultat_json.py): `backend/scriptpy/resultat_json.py`
- [Connectivity client](https://github.com/l2mit-misa/finale_web/blob/main/src/services/connectivite.ts): `src/services/connectivite.ts`

### Identity and platform

- [Sign-in page](https://github.com/l2mit-misa/finale_web/blob/main/src/pages/Auth/Auth.tsx): `src/pages/Auth/Auth.tsx`
- [Authentication service](https://github.com/l2mit-misa/finale_web/blob/main/src/services/auth.ts): `src/services/auth.ts`
- [Supabase client](https://github.com/l2mit-misa/finale_web/blob/main/src/services/supabase.ts): `src/services/supabase.ts`
- [Download page](https://github.com/l2mit-misa/finale_web/blob/main/src/pages/Download/DownloadPage.tsx): `src/pages/Download/DownloadPage.tsx`

### Other components

- **Visitor**
- **Supabase**

## Connections

- Visitor → Page routing: opens (evidence: `src/App.tsx`)
- Page routing → Search session: routes to (evidence: `src/App.tsx`)
- Search session → Assistant client: requests answers (evidence: `src/pages/Search/SearchPage.tsx`)
- Search session → Results and chat: renders results (evidence: `src/pages/Search/SearchPage.tsx`)
- Search session → Place map: renders map (evidence: `src/pages/Search/SearchPage.tsx`)
- Search session → Response contract: uses contract (evidence: `src/pages/Search/SearchPage.tsx`)
- Results and chat → Assistant client: requests assistant (evidence: `src/components/SearchResults/SearchResults.tsx`)
- Results and chat → Response contract: uses contract (evidence: `src/components/SearchResults/SearchResults.tsx`)
- Place map → Safety view: shows safety
- Safety data hook → Response contract: uses types (evidence: `src/components/ConnecteoMap/useSecurityData.ts`)
- Assistant client → Response contract: uses contract (evidence: `src/services/assistant.ts`)
- Assistant client → Conversation orchestration: calls backend
- Conversation orchestration → AI agent: uses agent (evidence: `backend/scriptpy/conversation.py`)
- Conversation orchestration → Place search: runs searches (evidence: `backend/scriptpy/conversation.py`)
- Conversation orchestration → POI knowledge: checks categories (evidence: `backend/scriptpy/conversation.py`)
- Conversation orchestration → Web research: uses research (evidence: `backend/scriptpy/conversation.py`)
- Conversation orchestration → Image research: uses image search (evidence: `backend/scriptpy/conversation.py`)
- Conversation orchestration → Result assembly: reads results (evidence: `backend/scriptpy/conversation.py`)
- Conversation orchestration → Query clarification: may clarify
- Search function entry → Query parser: parses query
- Place map → Connectivity client: loads connectivity
- Sign-in page → Authentication service: invokes sign-in (evidence: `src/pages/Auth/Auth.tsx`)
- Page routing → Authentication service: handles return (evidence: `src/App.tsx`)
- Authentication service → Supabase client: uses client (evidence: `src/services/auth.ts`)
- Supabase client → Supabase: authenticates (evidence: `src/services/supabase.ts`)
- Page routing → Download page: routes to (evidence: `src/App.tsx`)
- Page routing → Localization: provides language (evidence: `src/main.tsx`)
