# christian-ittech/app_test architecture

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

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

## Overview

NdakoTech is a housing-search platform for Brazzaville and Pointe-Noire, with a React client and a read-only Express/PostgreSQL API. The main user flow is to choose a city and filters, load matching available homes, open a listing’s detailed sheet and photos, and contact its manager when available. The API also provides neighborhoods and an unfiltered catalog. Publication and registration pages are routed in the client, but the documented API is read-only; sampled evidence does not establish a submission workflow. Some links reflect README or SOURCE INDEX references rather than inspected implementations.

Main entry points: [`client/src/App.jsx`](https://github.com/christian-ittech/app_test/blob/main/client/src/App.jsx) (Page router), [`client/src/pages/FichePage.jsx`](https://github.com/christian-ittech/app_test/blob/main/client/src/pages/FichePage.jsx) (Listing detail), [`server/src/app.js`](https://github.com/christian-ittech/app_test/blob/main/server/src/app.js) (Express app), [`server/src/routes/logementRoute.js`](https://github.com/christian-ittech/app_test/blob/main/server/src/routes/logementRoute.js) (Housing routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client experience"]
  node_app["Page router<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_listingcard["Listing card<br/>[LogementCard.jsx]"]
  node_detail["Listing detail<br/>[FichePage.jsx]"]
  node_gallery["Photo gallery<br/>[PhotoGallery.jsx]"]
  node_badge["Listing badges<br/>[Badge.jsx]"]
  node_format["Display formatting<br/>[format.js]"]
  node_publish["Publish page<br/>[PublierPage.jsx]"]
  node_signup["Registration page"]
  node_clientapi["Housing API client<br/>[logements.js]"]
end

subgraph group_api["API routing"]
  node_express["Express app<br/>[app.js]"]
  node_routes["API route index<br/>[index.js]"]
  node_housingroutes["Housing routes<br/>[logementRoute.js]"]
  node_neighborhoodroutes["Neighborhood routes<br/>[quartierRoute.js]"]
  node_validation["Search validation"]
  node_idvalidation["ID validation<br/>[validateId.js]"]
  node_errors["Error responses<br/>[errorHandler.js]"]
end

subgraph group_housing["Housing domain"]
  node_housingcontroller["Housing controller"]
  node_neighborhoodcontroller["Neighborhood controller"]
  node_housingmodel["Housing queries<br/>[logementModel.js]"]
end

subgraph group_persistence["Persistence"]
  node_pgpool["PostgreSQL pool<br/>[database.js]"]
  node_database[("Housing database<br/>[schema.sql]")]
  node_images["Listing images"]
end

node_visitor(("Home seeker"))

node_visitor -->|"uses"| node_app
node_app -->|"wraps pages"| 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 neighborhoods"| node_clientapi
node_searchform -->|"navigates to"| node_results
node_results -->|"requests listings"| node_clientapi
node_results -->|"renders"| node_listingcard
node_listingcard -->|"renders"| node_badge
node_listingcard -->|"formats display"| node_format
node_detail -->|"loads listing"| node_clientapi
node_detail -->|"renders photos"| node_gallery
node_detail -->|"renders"| node_badge
node_detail -->|"formats display"| node_format
node_clientapi -->|"calls API"| node_express
node_express -->|"mounts API"| node_routes
node_express -->|"handles errors"| node_errors
node_express -->|"serves images"| node_images
node_routes -->|"mounts"| node_housingroutes
node_routes -->|"mounts"| node_neighborhoodroutes
node_housingroutes -->|"validates search"| node_validation
node_housingroutes -->|"validates ID"| node_idvalidation
node_housingroutes -->|"dispatches"| node_housingcontroller
node_neighborhoodroutes -->|"dispatches"| node_neighborhoodcontroller
node_validation -->|"passes filters"| node_housingcontroller
node_housingcontroller -->|"queries listings"| node_housingmodel
node_neighborhoodcontroller -->|"queries neighborhoods"| node_housingmodel
node_housingmodel -->|"executes SQL"| node_pgpool
node_pgpool -.->|"connects to"| node_database

click node_app "https://github.com/christian-ittech/app_test/blob/main/client/src/App.jsx"
click node_layout "https://github.com/christian-ittech/app_test/blob/main/client/src/components/Layout.jsx"
click node_home "https://github.com/christian-ittech/app_test/blob/main/client/src/pages/HomePage.jsx"
click node_searchform "https://github.com/christian-ittech/app_test/blob/main/client/src/components/SearchForm.jsx"
click node_results "https://github.com/christian-ittech/app_test/blob/main/client/src/pages/ResultatsPage.jsx"
click node_listingcard "https://github.com/christian-ittech/app_test/blob/main/client/src/components/LogementCard.jsx"
click node_detail "https://github.com/christian-ittech/app_test/blob/main/client/src/pages/FichePage.jsx"
click node_gallery "https://github.com/christian-ittech/app_test/blob/main/client/src/components/PhotoGallery.jsx"
click node_badge "https://github.com/christian-ittech/app_test/blob/main/client/src/components/Badge.jsx"
click node_format "https://github.com/christian-ittech/app_test/blob/main/client/src/utils/format.js"
click node_publish "https://github.com/christian-ittech/app_test/blob/main/client/src/pages/PublierPage.jsx"
click node_signup "https://github.com/christian-ittech/app_test/blob/main/client/src/pages/InscriptionPage.jsx"
click node_clientapi "https://github.com/christian-ittech/app_test/blob/main/client/src/api/logements.js"
click node_express "https://github.com/christian-ittech/app_test/blob/main/server/src/app.js"
click node_routes "https://github.com/christian-ittech/app_test/blob/main/server/src/routes/index.js"
click node_housingroutes "https://github.com/christian-ittech/app_test/blob/main/server/src/routes/logementRoute.js"
click node_neighborhoodroutes "https://github.com/christian-ittech/app_test/blob/main/server/src/routes/quartierRoute.js"
click node_validation "https://github.com/christian-ittech/app_test/blob/main/server/src/middlewares/validateRecherche.js"
click node_idvalidation "https://github.com/christian-ittech/app_test/blob/main/server/src/middlewares/validateId.js"
click node_errors "https://github.com/christian-ittech/app_test/blob/main/server/src/middlewares/errorHandler.js"
click node_housingcontroller "https://github.com/christian-ittech/app_test/blob/main/server/src/controllers/logementController.js"
click node_neighborhoodcontroller "https://github.com/christian-ittech/app_test/blob/main/server/src/controllers/quartierController.js"
click node_housingmodel "https://github.com/christian-ittech/app_test/blob/main/server/src/models/logementModel.js"
click node_pgpool "https://github.com/christian-ittech/app_test/blob/main/server/src/config/database.js"
click node_database "https://github.com/christian-ittech/app_test/blob/main/server/schema.sql"
click node_images "https://github.com/christian-ittech/app_test/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_listingcard,node_detail,node_gallery,node_badge,node_format,node_publish,node_signup,node_clientapi toneBlue
class node_express,node_routes,node_housingroutes,node_neighborhoodroutes,node_validation,node_idvalidation,node_errors toneAmber
class node_housingcontroller,node_neighborhoodcontroller,node_housingmodel toneMint
class node_pgpool,node_database,node_images toneRose
class node_visitor toneIndigo
```

## Components

### Client experience

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

### API routing

- [Express app](https://github.com/christian-ittech/app_test/blob/main/server/src/app.js): `server/src/app.js`
- [API route index](https://github.com/christian-ittech/app_test/blob/main/server/src/routes/index.js): `server/src/routes/index.js`
- [Housing routes](https://github.com/christian-ittech/app_test/blob/main/server/src/routes/logementRoute.js): `server/src/routes/logementRoute.js`
- [Neighborhood routes](https://github.com/christian-ittech/app_test/blob/main/server/src/routes/quartierRoute.js): `server/src/routes/quartierRoute.js`
- [Search validation](https://github.com/christian-ittech/app_test/blob/main/server/src/middlewares/validateRecherche.js): `server/src/middlewares/validateRecherche.js`
- [ID validation](https://github.com/christian-ittech/app_test/blob/main/server/src/middlewares/validateId.js): `server/src/middlewares/validateId.js`
- [Error responses](https://github.com/christian-ittech/app_test/blob/main/server/src/middlewares/errorHandler.js): `server/src/middlewares/errorHandler.js`

### Housing domain

- [Housing controller](https://github.com/christian-ittech/app_test/blob/main/server/src/controllers/logementController.js): `server/src/controllers/logementController.js`
- [Neighborhood controller](https://github.com/christian-ittech/app_test/blob/main/server/src/controllers/quartierController.js): `server/src/controllers/quartierController.js`
- [Housing queries](https://github.com/christian-ittech/app_test/blob/main/server/src/models/logementModel.js): `server/src/models/logementModel.js`

### Persistence

- [PostgreSQL pool](https://github.com/christian-ittech/app_test/blob/main/server/src/config/database.js): `server/src/config/database.js`
- [Housing database](https://github.com/christian-ittech/app_test/blob/main/server/schema.sql): `server/schema.sql`
- [Listing images](https://github.com/christian-ittech/app_test/tree/main/server/src/public/images): `server/src/public/images`

### Other components

- **Home seeker**

## Connections

- Home seeker → Page router: uses (evidence: `client/src/App.jsx`)
- Page router → Shared layout: wraps pages (evidence: `client/src/App.jsx`)
- Page router → Home search: routes to (evidence: `client/src/App.jsx`)
- Page router → Search results: routes to (evidence: `client/src/App.jsx`)
- Page router → Listing detail: routes to (evidence: `client/src/App.jsx`)
- Page router → Publish page: routes to (evidence: `client/src/App.jsx`)
- Page router → Registration page: routes to (evidence: `client/src/App.jsx`)
- Home search → Filter form: renders (evidence: `client/src/pages/HomePage.jsx`)
- Filter form → Housing API client: loads neighborhoods (evidence: `client/src/components/SearchForm.jsx`)
- Filter form → Search results: navigates to (evidence: `client/src/components/SearchForm.jsx`)
- Search results → Housing API client: requests listings (evidence: `client/src/pages/ResultatsPage.jsx`)
- Search results → Listing card: renders (evidence: `client/src/pages/ResultatsPage.jsx`)
- Listing card → Listing badges: renders (evidence: `client/src/components/LogementCard.jsx`)
- Listing card → Display formatting: formats display (evidence: `client/src/components/LogementCard.jsx`)
- Listing detail → Housing API client: loads listing (evidence: `client/src/pages/FichePage.jsx`)
- Listing detail → Photo gallery: renders photos (evidence: `client/src/pages/FichePage.jsx`)
- Listing detail → Listing badges: renders (evidence: `client/src/pages/FichePage.jsx`)
- Listing detail → Display formatting: formats display (evidence: `client/src/pages/FichePage.jsx`)
- Housing API client → Express app: calls API (evidence: `README.md`)
- Express app → API route index: mounts API (evidence: `server/src/app.js`)
- Express app → Error responses: handles errors (evidence: `server/src/app.js`)
- Express app → Listing images: serves images (evidence: `server/src/app.js`)
- API route index → Housing routes: mounts (evidence: `server/src/routes/index.js`)
- API route index → Neighborhood routes: mounts (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 → Housing controller: dispatches (evidence: `server/src/routes/logementRoute.js`)
- Neighborhood routes → Neighborhood controller: dispatches (evidence: `server/src/routes/quartierRoute.js`)
- Search validation → Housing controller: passes filters (evidence: `README.md`)
- Housing controller → Housing queries: queries listings (evidence: `server/src/controllers/logementController.js`)
- Neighborhood controller → Housing queries: queries neighborhoods (evidence: `server/src/controllers/quartierController.js`)
- Housing queries → PostgreSQL pool: executes SQL (evidence: `server/src/models/logementModel.js`)
- PostgreSQL pool → Housing database: connects to
