# danchik-312/oomat architecture

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

- Interactive diagram: https://gitdiagram.com/danchik-312/oomat
- Repository: https://github.com/danchik-312/oomat

## Overview

This is a real-estate agency platform: a public property and services site plus admin and staff portals, backed by an API. The main visitor flow is browsing/filtering listings, opening a property, and submitting an inquiry; staff then manage properties and applications. Other product areas include reviews, contacts, banners, construction requests, reporting, and audit history. Evidence is limited to the supplied excerpts and SOURCE INDEX; unsampled modules are represented only where the tree or index supports their subsystem.

Main entry points: [`client/src/App.js`](https://github.com/danchik-312/oomat/blob/main/client/src/App.js) (Route application), [`server/src/routes`](https://github.com/danchik-312/oomat/tree/main/server/src/routes) (API routes), [`client/src/services/personalService.js`](https://github.com/danchik-312/oomat/blob/main/client/src/services/personalService.js) (Staff data service), [`client/src/pages/catalogPage/CatalogPage.jsx`](https://github.com/danchik-312/oomat/blob/main/client/src/pages/catalogPage/CatalogPage.jsx) (Property catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Public website"]
  node_app["Route application<br/>[App.js]"]
  node_catalog["Property catalog<br/>[CatalogPage.jsx]"]
  node_property["Property details<br/>[PropertyPage.jsx]"]
  node_map["Property map<br/>[PropertyMap.jsx]"]
  node_inquiry["Inquiry form<br/>[ContactCta.jsx]"]
  node_public_content["Public content pages"]
  node_reviews_ui["Reviews display<br/>[Reviews.jsx]"]
end

subgraph group_portals["Internal portals"]
  node_admin_portal["Admin portal"]
  node_staff_portal["Agent and manager portal"]
end

subgraph group_clientdata["Client data access"]
  node_catalog_service["Catalog normalization<br/>[catalogService.js]"]
  node_admin_data["Admin data service<br/>[adminService.js]"]
  node_staff_data["Staff data service<br/>[personalService.js]"]
  node_http_client["HTTP client<br/>[client.js]"]
end

subgraph group_server["API and domain"]
  node_api_entry["Express API<br/>[index.js]"]
  node_api_routes["API routes"]
  node_controllers["Domain controllers"]
  node_auth["Authentication middleware<br/>[authMiddleware.js]"]
  node_validation["Request validation"]
  node_audit["Audit logging<br/>[auditService.js]"]
end

subgraph group_storage["Persistence"]
  node_prisma[("Prisma database access<br/>[prisma.js]")]
end

node_visitor(("Visitor"))

node_visitor -->|"opens site"| node_app
node_app -->|"routes to"| node_catalog
node_app -->|"routes to"| node_property
node_app -->|"routes to"| node_public_content
node_catalog -->|"loads listings"| node_catalog_service
node_catalog -->|"renders map"| node_map
node_property -->|"loads property"| node_catalog_service
node_property -->|"uses map"| node_map
node_app -->|"renders CTA"| node_inquiry
node_inquiry -->|"creates application"| node_staff_data
node_public_content -->|"shows reviews"| node_reviews_ui
node_catalog_service -->|"fetches properties"| node_staff_data
node_staff_data -->|"sends requests"| node_http_client
node_admin_data -->|"sends requests"| node_http_client
node_admin_portal -.->|"loads admin data"| node_admin_data
node_staff_portal -.->|"loads staff data"| node_staff_data
node_http_client -.->|"calls API"| node_api_entry
node_api_entry -->|"mounts routes"| node_api_routes
node_api_routes -->|"dispatches handlers"| node_controllers
node_api_routes -->|"protects routes"| node_auth
node_api_routes -->|"validates requests"| node_validation
node_controllers -->|"reads and writes"| node_prisma
node_controllers -->|"records changes"| node_audit
node_audit -->|"stores audit logs"| node_prisma

click node_app "https://github.com/danchik-312/oomat/blob/main/client/src/App.js"
click node_catalog "https://github.com/danchik-312/oomat/blob/main/client/src/pages/catalogPage/CatalogPage.jsx"
click node_catalog_service "https://github.com/danchik-312/oomat/blob/main/client/src/services/catalogService.js"
click node_property "https://github.com/danchik-312/oomat/blob/main/client/src/pages/propertyPage/PropertyPage.jsx"
click node_map "https://github.com/danchik-312/oomat/blob/main/client/src/components/propertyMap/PropertyMap.jsx"
click node_inquiry "https://github.com/danchik-312/oomat/blob/main/client/src/components/contactCta/ContactCta.jsx"
click node_public_content "https://github.com/danchik-312/oomat/tree/main/client/src/pages"
click node_reviews_ui "https://github.com/danchik-312/oomat/blob/main/client/src/components/reviews/Reviews.jsx"
click node_admin_portal "https://github.com/danchik-312/oomat/tree/main/client/src/pages/Admin"
click node_staff_portal "https://github.com/danchik-312/oomat/tree/main/client/src/pages/Personal"
click node_admin_data "https://github.com/danchik-312/oomat/blob/main/client/src/services/adminService.js"
click node_staff_data "https://github.com/danchik-312/oomat/blob/main/client/src/services/personalService.js"
click node_http_client "https://github.com/danchik-312/oomat/blob/main/client/src/api/client.js"
click node_api_entry "https://github.com/danchik-312/oomat/blob/main/server/src/index.js"
click node_api_routes "https://github.com/danchik-312/oomat/tree/main/server/src/routes"
click node_controllers "https://github.com/danchik-312/oomat/tree/main/server/src/controllers"
click node_auth "https://github.com/danchik-312/oomat/blob/main/server/src/middleware/authMiddleware.js"
click node_validation "https://github.com/danchik-312/oomat/blob/main/server/src/middleware/validateMiddleware.js"
click node_audit "https://github.com/danchik-312/oomat/blob/main/server/src/services/auditService.js"
click node_prisma "https://github.com/danchik-312/oomat/blob/main/server/src/lib/prisma.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_catalog,node_property,node_map,node_inquiry,node_public_content,node_reviews_ui toneBlue
class node_admin_portal,node_staff_portal toneAmber
class node_catalog_service,node_admin_data,node_staff_data,node_http_client toneMint
class node_api_entry,node_api_routes,node_controllers,node_auth,node_validation,node_audit toneRose
class node_prisma,node_visitor toneIndigo
```

## Components

### Public website

- [Route application](https://github.com/danchik-312/oomat/blob/main/client/src/App.js): `client/src/App.js`
- [Property catalog](https://github.com/danchik-312/oomat/blob/main/client/src/pages/catalogPage/CatalogPage.jsx): `client/src/pages/catalogPage/CatalogPage.jsx`
- [Property details](https://github.com/danchik-312/oomat/blob/main/client/src/pages/propertyPage/PropertyPage.jsx): `client/src/pages/propertyPage/PropertyPage.jsx`
- [Property map](https://github.com/danchik-312/oomat/blob/main/client/src/components/propertyMap/PropertyMap.jsx): `client/src/components/propertyMap/PropertyMap.jsx`
- [Inquiry form](https://github.com/danchik-312/oomat/blob/main/client/src/components/contactCta/ContactCta.jsx): `client/src/components/contactCta/ContactCta.jsx`
- [Public content pages](https://github.com/danchik-312/oomat/tree/main/client/src/pages): `client/src/pages`
- [Reviews display](https://github.com/danchik-312/oomat/blob/main/client/src/components/reviews/Reviews.jsx): `client/src/components/reviews/Reviews.jsx`

### Internal portals

- [Admin portal](https://github.com/danchik-312/oomat/tree/main/client/src/pages/Admin): `client/src/pages/Admin`
- [Agent and manager portal](https://github.com/danchik-312/oomat/tree/main/client/src/pages/Personal): `client/src/pages/Personal`

### Client data access

- [Catalog normalization](https://github.com/danchik-312/oomat/blob/main/client/src/services/catalogService.js): `client/src/services/catalogService.js`
- [Admin data service](https://github.com/danchik-312/oomat/blob/main/client/src/services/adminService.js): `client/src/services/adminService.js`
- [Staff data service](https://github.com/danchik-312/oomat/blob/main/client/src/services/personalService.js): `client/src/services/personalService.js`
- [HTTP client](https://github.com/danchik-312/oomat/blob/main/client/src/api/client.js): `client/src/api/client.js`

### API and domain

- [Express API](https://github.com/danchik-312/oomat/blob/main/server/src/index.js): `server/src/index.js`
- [API routes](https://github.com/danchik-312/oomat/tree/main/server/src/routes): `server/src/routes`
- [Domain controllers](https://github.com/danchik-312/oomat/tree/main/server/src/controllers): `server/src/controllers`
- [Authentication middleware](https://github.com/danchik-312/oomat/blob/main/server/src/middleware/authMiddleware.js): `server/src/middleware/authMiddleware.js`
- [Request validation](https://github.com/danchik-312/oomat/blob/main/server/src/middleware/validateMiddleware.js): `server/src/middleware/validateMiddleware.js`
- [Audit logging](https://github.com/danchik-312/oomat/blob/main/server/src/services/auditService.js): `server/src/services/auditService.js`

### Persistence

- [Prisma database access](https://github.com/danchik-312/oomat/blob/main/server/src/lib/prisma.js): `server/src/lib/prisma.js`

### Other components

- **Visitor**

## Connections

- Visitor → Route application: opens site (evidence: `client/src/App.js`)
- Route application → Property catalog: routes to (evidence: `client/src/App.js`)
- Route application → Property details: routes to (evidence: `client/src/App.js`)
- Route application → Public content pages: routes to (evidence: `client/src/App.js`)
- Property catalog → Catalog normalization: loads listings (evidence: `client/src/pages/catalogPage/CatalogPage.jsx`)
- Property catalog → Property map: renders map (evidence: `client/src/pages/catalogPage/CatalogPage.jsx`)
- Property details → Catalog normalization: loads property (evidence: `client/src/pages/propertyPage/PropertyPage.jsx`)
- Property details → Property map: uses map (evidence: `client/src/pages/propertyPage/PropertyPage.jsx`)
- Route application → Inquiry form: renders CTA (evidence: `client/src/App.js`)
- Inquiry form → Staff data service: creates application (evidence: `client/src/components/contactCta/ContactCta.jsx`)
- Public content pages → Reviews display: shows reviews (evidence: `client/src/pages/reviewsPage/ReviewsPage.jsx`)
- Catalog normalization → Staff data service: fetches properties (evidence: `client/src/services/catalogService.js`)
- Staff data service → HTTP client: sends requests (evidence: `client/src/services/personalService.js`)
- Admin data service → HTTP client: sends requests (evidence: `client/src/services/adminService.js`)
- Admin portal → Admin data service: loads admin data
- Agent and manager portal → Staff data service: loads staff data (evidence: `client/src/pages/Personal/pages/Manager/ManagerDashboard.jsx`)
- HTTP client → Express API: calls API
- Express API → API routes: mounts routes (evidence: `server/src/index.js`)
- API routes → Domain controllers: dispatches handlers (evidence: `server/src/routes/applications.js`)
- API routes → Authentication middleware: protects routes (evidence: `server/src/routes/applications.js`)
- API routes → Request validation: validates requests (evidence: `server/src/routes/applications.js`)
- Domain controllers → Prisma database access: reads and writes (evidence: `server/src/controllers/reviewsController.js`)
- Domain controllers → Audit logging: records changes (evidence: `server/src/controllers/reviewsController.js`)
- Audit logging → Prisma database access: stores audit logs (evidence: `server/src/services/auditService.js`)
