# christian-ittech/g_afrinova_project_ndakotech_s17 architecture

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

- Interactive diagram: https://gitdiagram.com/christian-ittech/g_afrinova_project_ndakotech_s17
- Repository: https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17

## Overview

NDAKO TECH is a housing-search MVP for Brazzaville and Pointe-Noire. A visitor filters available listings, reviews results, opens a dated listing with photos and verification/status details, then contacts the manager directly by phone or WhatsApp. The React client calls a read-only Express API, whose controllers use a PostgreSQL-backed model; listing photos are served as static assets. Publishing and registration pages are present as showcase forms, not functional account or listing creation. The map follows the documented workflow and sampled calls; unsampled implementation details are not inferred.

Main entry points: [`client/src/App.jsx`](https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/client/src/App.jsx) (Page routing), [`client/src/pages/FichePage.jsx`](https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/client/src/pages/FichePage.jsx) (Listing detail), [`server/src/routes/logementRoute.js`](https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/server/src/routes/logementRoute.js) (Housing routes), [`client/src/pages/ResultatsPage.jsx`](https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/client/src/pages/ResultatsPage.jsx) (Search results)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["React client"]
  node_app["Page routing<br/>[App.jsx]"]
  node_layout["Shared layout<br/>[Layout.jsx]"]
  node_home["Home search<br/>[HomePage.jsx]"]
  node_searchform["Filter form<br/>[SearchForm.jsx]"]
  node_results["Search results<br/>[ResultatsPage.jsx]"]
  node_card["Listing card<br/>[LogementCard.jsx]"]
  node_detail["Listing detail<br/>[FichePage.jsx]"]
  node_gallery["Photo gallery<br/>[PhotoGallery.jsx]"]
  node_badge["Status badges<br/>[Badge.jsx]"]
  node_format["Display formatting<br/>[format.js]"]
  node_clientapi["API client<br/>[logements.js]"]
  node_publish["Publish showcase<br/>[PublierPage.jsx]"]
  node_signup["Signup showcase"]
end

subgraph group_api["Express API"]
  node_serverapp["HTTP application<br/>[app.js]"]
  node_routes["API route index<br/>[index.js]"]
  node_housingroutes["Housing routes<br/>[logementRoute.js]"]
  node_districtsroute["District routes<br/>[quartierRoute.js]"]
  node_validation["Search validation"]
  node_idvalidation["ID validation<br/>[validateId.js]"]
  node_housingcontroller["Listing controller"]
  node_districtcontroller["District controller"]
end

subgraph group_data["Housing data"]
  node_model["Housing queries<br/>[logementModel.js]"]
  node_pool["Database pool<br/>[database.js]"]
  node_postgres[("PostgreSQL")]
end

subgraph group_integrations["External services"]
  node_photos["Listing photos"]
  node_contacts["Phone / WhatsApp"]
end

node_visitor(("Home seeker"))

node_visitor -->|"opens pages"| node_app
node_app -->|"wraps routes"| node_layout
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_results
node_app -->|"routes to"| node_detail
node_app -->|"routes to"| node_publish
node_app -->|"routes to"| node_signup
node_home -->|"renders"| node_searchform
node_searchform -->|"loads districts"| node_clientapi
node_searchform -->|"navigates to"| node_results
node_home -->|"renders listings"| node_card
node_results -->|"fetches listings"| node_clientapi
node_results -->|"renders listings"| node_card
node_detail -->|"fetches listing"| node_clientapi
node_detail -->|"renders photos"| node_gallery
node_detail -->|"renders status"| node_badge
node_card -->|"renders status"| node_badge
node_detail -->|"formats details"| node_format
node_card -->|"formats price"| node_format
node_clientapi -->|"HTTP JSON"| node_serverapp
node_detail -->|"offers direct contact"| node_contacts
node_serverapp -->|"mounts API"| node_routes
node_serverapp -->|"serves images"| node_photos
node_routes -->|"registers routes"| node_housingroutes
node_routes -->|"registers routes"| node_districtsroute
node_housingroutes -->|"validates search"| node_validation
node_housingroutes -->|"validates ID"| node_idvalidation
node_housingroutes -->|"dispatches requests"| node_housingcontroller
node_districtsroute -->|"dispatches requests"| node_districtcontroller
node_housingcontroller -->|"queries listings"| node_model
node_districtcontroller -->|"queries districts"| node_model
node_model -->|"runs SQL"| node_pool
node_pool -->|"connects to"| node_postgres

click node_app "https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/client/src/App.jsx"
click node_layout "https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/client/src/components/Layout.jsx"
click node_home "https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/client/src/pages/HomePage.jsx"
click node_searchform "https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/client/src/components/SearchForm.jsx"
click node_results "https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/client/src/pages/ResultatsPage.jsx"
click node_card "https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/client/src/components/LogementCard.jsx"
click node_detail "https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/client/src/pages/FichePage.jsx"
click node_gallery "https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/client/src/components/PhotoGallery.jsx"
click node_badge "https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/client/src/components/Badge.jsx"
click node_format "https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/client/src/utils/format.js"
click node_clientapi "https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/client/src/api/logements.js"
click node_publish "https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/client/src/pages/PublierPage.jsx"
click node_signup "https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/client/src/pages/InscriptionPage.jsx"
click node_serverapp "https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/server/src/app.js"
click node_routes "https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/server/src/routes/index.js"
click node_housingroutes "https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/server/src/routes/logementRoute.js"
click node_districtsroute "https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/server/src/routes/quartierRoute.js"
click node_validation "https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/server/src/middlewares/validateRecherche.js"
click node_idvalidation "https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/server/src/middlewares/validateId.js"
click node_housingcontroller "https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/server/src/controllers/logementController.js"
click node_districtcontroller "https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/server/src/controllers/quartierController.js"
click node_model "https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/server/src/models/logementModel.js"
click node_pool "https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/server/src/config/database.js"
click node_photos "https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/tree/main/server/src/public/images"

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_layout,node_home,node_searchform,node_results,node_card,node_detail,node_gallery,node_badge,node_format,node_clientapi,node_publish,node_signup toneBlue
class node_serverapp,node_routes,node_housingroutes,node_districtsroute,node_validation,node_idvalidation,node_housingcontroller,node_districtcontroller toneAmber
class node_model,node_pool,node_postgres toneMint
class node_photos,node_contacts toneRose
class node_visitor toneIndigo
```

## Components

### React client

- [Page routing](https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Shared layout](https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/client/src/components/Layout.jsx): `client/src/components/Layout.jsx`
- [Home search](https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/client/src/pages/HomePage.jsx): `client/src/pages/HomePage.jsx`
- [Filter form](https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/client/src/components/SearchForm.jsx): `client/src/components/SearchForm.jsx`
- [Search results](https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/client/src/pages/ResultatsPage.jsx): `client/src/pages/ResultatsPage.jsx`
- [Listing card](https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/client/src/components/LogementCard.jsx): `client/src/components/LogementCard.jsx`
- [Listing detail](https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/client/src/pages/FichePage.jsx): `client/src/pages/FichePage.jsx`
- [Photo gallery](https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/client/src/components/PhotoGallery.jsx): `client/src/components/PhotoGallery.jsx`
- [Status badges](https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/client/src/components/Badge.jsx): `client/src/components/Badge.jsx`
- [Display formatting](https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/client/src/utils/format.js): `client/src/utils/format.js`
- [API client](https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/client/src/api/logements.js): `client/src/api/logements.js`
- [Publish showcase](https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/client/src/pages/PublierPage.jsx): `client/src/pages/PublierPage.jsx`
- [Signup showcase](https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/client/src/pages/InscriptionPage.jsx): `client/src/pages/InscriptionPage.jsx`

### Express API

- [HTTP application](https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/server/src/app.js): `server/src/app.js`
- [API route index](https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/server/src/routes/index.js): `server/src/routes/index.js`
- [Housing routes](https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/server/src/routes/logementRoute.js): `server/src/routes/logementRoute.js`
- [District routes](https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/server/src/routes/quartierRoute.js): `server/src/routes/quartierRoute.js`
- [Search validation](https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/server/src/middlewares/validateRecherche.js): `server/src/middlewares/validateRecherche.js`
- [ID validation](https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/server/src/middlewares/validateId.js): `server/src/middlewares/validateId.js`
- [Listing controller](https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/server/src/controllers/logementController.js): `server/src/controllers/logementController.js`
- [District controller](https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/server/src/controllers/quartierController.js): `server/src/controllers/quartierController.js`

### Housing data

- [Housing queries](https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/server/src/models/logementModel.js): `server/src/models/logementModel.js`
- [Database pool](https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/blob/main/server/src/config/database.js): `server/src/config/database.js`
- **PostgreSQL**

### External services

- [Listing photos](https://github.com/christian-ittech/g_afrinova_project_ndakotech_s17/tree/main/server/src/public/images): `server/src/public/images`
- **Phone / WhatsApp**

### Other components

- **Home seeker**

## Connections

- Home seeker → Page routing: opens pages (evidence: `README.md`)
- Page routing → Shared layout: wraps routes (evidence: `client/src/App.jsx`)
- Page routing → Home search: routes to (evidence: `client/src/App.jsx`)
- Page routing → Search results: routes to (evidence: `client/src/App.jsx`)
- Page routing → Listing detail: routes to (evidence: `client/src/App.jsx`)
- Page routing → Publish showcase: routes to (evidence: `client/src/App.jsx`)
- Page routing → Signup showcase: routes to (evidence: `client/src/App.jsx`)
- Home search → Filter form: renders (evidence: `client/src/pages/HomePage.jsx`)
- Filter form → API client: loads districts (evidence: `client/src/components/SearchForm.jsx`)
- Filter form → Search results: navigates to (evidence: `client/src/components/SearchForm.jsx`)
- Home search → Listing card: renders listings (evidence: `client/src/pages/HomePage.jsx`)
- Search results → API client: fetches listings (evidence: `client/src/pages/ResultatsPage.jsx`)
- Search results → Listing card: renders listings (evidence: `client/src/pages/ResultatsPage.jsx`)
- Listing detail → API client: fetches listing (evidence: `client/src/pages/FichePage.jsx`)
- Listing detail → Photo gallery: renders photos (evidence: `client/src/pages/FichePage.jsx`)
- Listing detail → Status badges: renders status (evidence: `client/src/pages/FichePage.jsx`)
- Listing card → Status badges: renders status (evidence: `client/src/components/LogementCard.jsx`)
- Listing detail → Display formatting: formats details (evidence: `client/src/pages/FichePage.jsx`)
- Listing card → Display formatting: formats price (evidence: `client/src/components/LogementCard.jsx`)
- API client → HTTP application: HTTP JSON (evidence: `README.md`)
- Listing detail → Phone / WhatsApp: offers direct contact (evidence: `client/src/pages/FichePage.jsx`)
- HTTP application → API route index: mounts API (evidence: `server/src/app.js`)
- HTTP application → Listing photos: serves images (evidence: `server/src/app.js`)
- API route index → Housing routes: registers routes (evidence: `server/src/routes/index.js`)
- API route index → District routes: registers routes (evidence: `server/src/routes/index.js`)
- Housing routes → Search validation: validates search (evidence: `server/src/routes/logementRoute.js`)
- Housing routes → ID validation: validates ID (evidence: `server/src/routes/logementRoute.js`)
- Housing routes → Listing controller: dispatches requests (evidence: `server/src/routes/logementRoute.js`)
- District routes → District controller: dispatches requests (evidence: `server/src/routes/quartierRoute.js`)
- Listing controller → Housing queries: queries listings (evidence: `server/src/controllers/logementController.js`)
- District controller → Housing queries: queries districts (evidence: `server/src/controllers/quartierController.js`)
- Housing queries → Database pool: runs SQL (evidence: `server/src/models/logementModel.js`)
- Database pool → PostgreSQL: connects to (evidence: `README.md`)
