# leoncaal/visitmatina architecture

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

- Interactive diagram: https://gitdiagram.com/leoncaal/visitmatina
- Repository: https://github.com/leoncaal/visitmatina

## Overview

Visit Matina is a tourism-discovery website for Matina, with a React client and an Express API. Visitors browse destination and activity pages, read blog posts, contact the alliance, and can register, review shops, and shop/pay; administrators manage site content. The graph shows the documented client routes and the API’s major domain branches. Source evidence is uneven: review and shop wiring is visible, while several other backend and commerce implementations were not sampled, so their internal links are omitted.

Main entry points: [`client/src/App.js`](https://github.com/leoncaal/visitmatina/blob/QA/client/src/App.js) (Route application), [`api/src/routes/index.js`](https://github.com/leoncaal/visitmatina/blob/QA/api/src/routes/index.js) (API route registry), [`client/src/redux/reviewsActions.js`](https://github.com/leoncaal/visitmatina/blob/QA/client/src/redux/reviewsActions.js) (Review requests), [`client/src/components/common/Reviews/Reviews.jsx`](https://github.com/leoncaal/visitmatina/blob/QA/client/src/components/common/Reviews/Reviews.jsx) (Shop reviews)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Visitor website"]
  node_app["Route application<br/>[App.js]"]
  node_destination["Tourism pages"]
  node_blog["Blog pages"]
  node_account["Account pages"]
  node_admin["Admin dashboard"]
  node_contact["Contact page"]
  node_layout["Shared layout<br/>[Layout.js]"]
  node_cart["Shopping cart<br/>[cart.js]"]
  node_reviews_ui["Shop reviews<br/>[Reviews.jsx]"]
  node_review_form["Review form<br/>[ReviewForm.jsx]"]
  node_review_thread["Review discussion<br/>[ReviewThread.jsx]"]
end

subgraph group_client_state["Client state"]
  node_review_actions["Review requests<br/>[reviewsActions.js]"]
  node_review_state["Review state<br/>[reviewsSlice.js]"]
  node_local_storage["Local storage hook<br/>[useLocalStorage.js]"]
end

subgraph group_api["API services"]
  node_api_entry["HTTP API<br/>[app.js]"]
  node_api_routes["API route registry<br/>[index.js]"]
  node_review_routes["Review endpoints<br/>[reviews.js]"]
  node_review_controller["Review operations<br/>[reviews.js]"]
  node_shop_routes["Shop endpoints<br/>[shopsRoutes.js]"]
  node_shop_controller["Shop operations"]
  node_content_routes["Posts and products"]
  node_other_routes["Users, comments, mail, payments"]
end

subgraph group_data["Persistence and media"]
  node_database[("Sequelize database<br/>[db.js]")]
  node_media_upload["Cloudinary upload"]
  node_postgres[("PostgreSQL")]
end

node_visitor(("Visitor"))
node_cloudinary["Cloudinary"]

node_visitor -->|"opens"| node_app
node_app -->|"routes to"| node_destination
node_app -->|"routes to"| node_blog
node_app -->|"routes to"| node_account
node_app -->|"routes to"| node_admin
node_app -->|"routes to"| node_contact
node_app -->|"wraps pages"| node_layout
node_layout -->|"renders"| node_cart
node_reviews_ui -->|"dispatches fetch"| node_review_actions
node_reviews_ui -->|"renders"| node_review_form
node_reviews_ui -->|"renders"| node_review_thread
node_review_form -->|"dispatches requests"| node_review_actions
node_review_thread -->|"dispatches requests"| node_review_actions
node_review_thread -->|"uses"| node_local_storage
node_review_actions -->|"dispatches updates"| node_review_state
node_review_actions -->|"calls review API"| node_api_entry
node_api_entry -->|"mounts"| node_api_routes
node_api_routes -->|"registers"| node_review_routes
node_api_routes -->|"registers"| node_shop_routes
node_api_routes -->|"registers"| node_content_routes
node_api_routes -->|"registers"| node_other_routes
node_review_routes -->|"calls"| node_review_controller
node_shop_routes -->|"calls"| node_shop_controller
node_review_controller -->|"queries"| node_database
node_shop_controller -->|"queries"| node_database
node_shop_controller -->|"uploads images"| node_media_upload
node_media_upload -.->|"uploads to"| node_cloudinary
node_database -->|"connects to"| node_postgres

click node_app "https://github.com/leoncaal/visitmatina/blob/QA/client/src/App.js"
click node_destination "https://github.com/leoncaal/visitmatina/tree/QA/client/src/components/pages"
click node_blog "https://github.com/leoncaal/visitmatina/tree/QA/client/src/components/pages/Blog"
click node_account "https://github.com/leoncaal/visitmatina/tree/QA/client/src/components/pages/Login"
click node_admin "https://github.com/leoncaal/visitmatina/tree/QA/client/src/components/pages/Admin"
click node_contact "https://github.com/leoncaal/visitmatina/tree/QA/client/src/components/pages/Contact"
click node_layout "https://github.com/leoncaal/visitmatina/blob/QA/client/src/components/Layout/Layout.js"
click node_cart "https://github.com/leoncaal/visitmatina/blob/QA/client/src/components/common/cart/cart.js"
click node_reviews_ui "https://github.com/leoncaal/visitmatina/blob/QA/client/src/components/common/Reviews/Reviews.jsx"
click node_review_form "https://github.com/leoncaal/visitmatina/blob/QA/client/src/components/common/Reviews/ReviewForm/ReviewForm.jsx"
click node_review_thread "https://github.com/leoncaal/visitmatina/blob/QA/client/src/components/common/Reviews/ReviewThread/ReviewThread.jsx"
click node_review_actions "https://github.com/leoncaal/visitmatina/blob/QA/client/src/redux/reviewsActions.js"
click node_review_state "https://github.com/leoncaal/visitmatina/blob/QA/client/src/redux/reviewsSlice.js"
click node_local_storage "https://github.com/leoncaal/visitmatina/blob/QA/client/src/components/localStorage/useLocalStorage.js"
click node_api_entry "https://github.com/leoncaal/visitmatina/blob/QA/api/src/app.js"
click node_api_routes "https://github.com/leoncaal/visitmatina/blob/QA/api/src/routes/index.js"
click node_review_routes "https://github.com/leoncaal/visitmatina/blob/QA/api/src/routes/reviews/reviews.js"
click node_review_controller "https://github.com/leoncaal/visitmatina/blob/QA/api/src/controllers/reviews/reviews.js"
click node_shop_routes "https://github.com/leoncaal/visitmatina/blob/QA/api/src/routes/shops/shopsRoutes.js"
click node_shop_controller "https://github.com/leoncaal/visitmatina/blob/QA/api/src/controllers/shops/shopsControllers.js"
click node_content_routes "https://github.com/leoncaal/visitmatina/tree/QA/api/src/routes"
click node_other_routes "https://github.com/leoncaal/visitmatina/tree/QA/api/src/routes"
click node_database "https://github.com/leoncaal/visitmatina/blob/QA/api/src/db.js"
click node_media_upload "https://github.com/leoncaal/visitmatina/blob/QA/api/src/helpers/CloudinaryUpload.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_app,node_destination,node_blog,node_account,node_admin,node_contact,node_layout,node_cart,node_reviews_ui,node_review_form,node_review_thread toneBlue
class node_review_actions,node_review_state,node_local_storage toneAmber
class node_api_entry,node_api_routes,node_review_routes,node_review_controller,node_shop_routes,node_shop_controller,node_content_routes,node_other_routes toneMint
class node_database,node_media_upload,node_postgres toneRose
class node_visitor,node_cloudinary toneIndigo
```

## Components

### Visitor website

- [Route application](https://github.com/leoncaal/visitmatina/blob/QA/client/src/App.js): `client/src/App.js`
- [Tourism pages](https://github.com/leoncaal/visitmatina/tree/QA/client/src/components/pages): `client/src/components/pages`
- [Blog pages](https://github.com/leoncaal/visitmatina/tree/QA/client/src/components/pages/Blog): `client/src/components/pages/Blog`
- [Account pages](https://github.com/leoncaal/visitmatina/tree/QA/client/src/components/pages/Login): `client/src/components/pages/Login`
- [Admin dashboard](https://github.com/leoncaal/visitmatina/tree/QA/client/src/components/pages/Admin): `client/src/components/pages/Admin`
- [Contact page](https://github.com/leoncaal/visitmatina/tree/QA/client/src/components/pages/Contact): `client/src/components/pages/Contact`
- [Shared layout](https://github.com/leoncaal/visitmatina/blob/QA/client/src/components/Layout/Layout.js): `client/src/components/Layout/Layout.js`
- [Shopping cart](https://github.com/leoncaal/visitmatina/blob/QA/client/src/components/common/cart/cart.js): `client/src/components/common/cart/cart.js`
- [Shop reviews](https://github.com/leoncaal/visitmatina/blob/QA/client/src/components/common/Reviews/Reviews.jsx): `client/src/components/common/Reviews/Reviews.jsx`
- [Review form](https://github.com/leoncaal/visitmatina/blob/QA/client/src/components/common/Reviews/ReviewForm/ReviewForm.jsx): `client/src/components/common/Reviews/ReviewForm/ReviewForm.jsx`
- [Review discussion](https://github.com/leoncaal/visitmatina/blob/QA/client/src/components/common/Reviews/ReviewThread/ReviewThread.jsx): `client/src/components/common/Reviews/ReviewThread/ReviewThread.jsx`

### Client state

- [Review requests](https://github.com/leoncaal/visitmatina/blob/QA/client/src/redux/reviewsActions.js): `client/src/redux/reviewsActions.js`
- [Review state](https://github.com/leoncaal/visitmatina/blob/QA/client/src/redux/reviewsSlice.js): `client/src/redux/reviewsSlice.js`
- [Local storage hook](https://github.com/leoncaal/visitmatina/blob/QA/client/src/components/localStorage/useLocalStorage.js): `client/src/components/localStorage/useLocalStorage.js`

### API services

- [HTTP API](https://github.com/leoncaal/visitmatina/blob/QA/api/src/app.js): `api/src/app.js`
- [API route registry](https://github.com/leoncaal/visitmatina/blob/QA/api/src/routes/index.js): `api/src/routes/index.js`
- [Review endpoints](https://github.com/leoncaal/visitmatina/blob/QA/api/src/routes/reviews/reviews.js): `api/src/routes/reviews/reviews.js`
- [Review operations](https://github.com/leoncaal/visitmatina/blob/QA/api/src/controllers/reviews/reviews.js): `api/src/controllers/reviews/reviews.js`
- [Shop endpoints](https://github.com/leoncaal/visitmatina/blob/QA/api/src/routes/shops/shopsRoutes.js): `api/src/routes/shops/shopsRoutes.js`
- [Shop operations](https://github.com/leoncaal/visitmatina/blob/QA/api/src/controllers/shops/shopsControllers.js): `api/src/controllers/shops/shopsControllers.js`
- [Posts and products](https://github.com/leoncaal/visitmatina/tree/QA/api/src/routes): `api/src/routes`
- [Users, comments, mail, payments](https://github.com/leoncaal/visitmatina/tree/QA/api/src/routes): `api/src/routes`

### Persistence and media

- [Sequelize database](https://github.com/leoncaal/visitmatina/blob/QA/api/src/db.js): `api/src/db.js`
- [Cloudinary upload](https://github.com/leoncaal/visitmatina/blob/QA/api/src/helpers/CloudinaryUpload.js): `api/src/helpers/CloudinaryUpload.js`
- **PostgreSQL**

### Other components

- **Visitor**
- **Cloudinary**

## Connections

- Visitor → Route application: opens (evidence: `client/src/App.js`)
- Route application → Tourism pages: routes to (evidence: `client/src/App.js`)
- Route application → Blog pages: routes to (evidence: `client/src/App.js`)
- Route application → Account pages: routes to (evidence: `client/src/App.js`)
- Route application → Admin dashboard: routes to (evidence: `client/src/App.js`)
- Route application → Contact page: routes to (evidence: `client/src/App.js`)
- Route application → Shared layout: wraps pages (evidence: `client/src/App.js`)
- Shared layout → Shopping cart: renders (evidence: `client/src/components/Layout/Layout.js`)
- Shop reviews → Review requests: dispatches fetch (evidence: `client/src/components/common/Reviews/Reviews.jsx`)
- Shop reviews → Review form: renders (evidence: `client/src/components/common/Reviews/Reviews.jsx`)
- Shop reviews → Review discussion: renders (evidence: `client/src/components/common/Reviews/Reviews.jsx`)
- Review form → Review requests: dispatches requests (evidence: `client/src/components/common/Reviews/ReviewForm/ReviewForm.jsx`)
- Review discussion → Review requests: dispatches requests (evidence: `client/src/components/common/Reviews/ReviewThread/ReviewThread.jsx`)
- Review discussion → Local storage hook: uses (evidence: `client/src/components/common/Reviews/ReviewThread/ReviewThread.jsx`)
- Review requests → Review state: dispatches updates (evidence: `client/src/redux/reviewsActions.js`)
- Review requests → HTTP API: calls review API (evidence: `client/src/redux/reviewsActions.js`)
- HTTP API → API route registry: mounts (evidence: `api/src/app.js`)
- API route registry → Review endpoints: registers (evidence: `api/src/routes/index.js`)
- API route registry → Shop endpoints: registers (evidence: `api/src/routes/index.js`)
- API route registry → Posts and products: registers (evidence: `api/src/routes/index.js`)
- API route registry → Users, comments, mail, payments: registers (evidence: `api/src/routes/index.js`)
- Review endpoints → Review operations: calls (evidence: `api/src/routes/reviews/reviews.js`)
- Shop endpoints → Shop operations: calls (evidence: `api/src/routes/shops/shopsRoutes.js`)
- Review operations → Sequelize database: queries (evidence: `api/src/controllers/reviews/reviews.js`)
- Shop operations → Sequelize database: queries (evidence: `api/src/controllers/shops/shopsControllers.js`)
- Shop operations → Cloudinary upload: uploads images (evidence: `api/src/controllers/shops/shopsControllers.js`)
- Cloudinary upload → Cloudinary: uploads to
- Sequelize database → PostgreSQL: connects to (evidence: `api/src/db.js`)
