# prolinkinfo/realestatecrm architecture

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

- Interactive diagram: https://gitdiagram.com/prolinkinfo/realestatecrm
- Repository: https://github.com/prolinkinfo/realestatecrm

## Overview

Real Estate CRM is a React/Express/MongoDB application for agents and administrators. Users sign in, then work across CRM records—leads, contacts, properties, and opportunities—and supporting sales, communication, scheduling, and reporting features. Administrative areas configure roles, modules, fields, and validation. The backend exposes feature-specific routes through a central router; the sampled routes demonstrate authenticated record operations and the image controller’s persistence behavior. The README and route configuration document broader capabilities, but most feature-to-API wiring was not sampled, so those links are not asserted here.

Main entry points: [`client/src/routes.js`](https://github.com/prolinkinfo/realestatecrm/blob/main/client/src/routes.js) (Client routes), [`server/controllers/route.js`](https://github.com/prolinkinfo/realestatecrm/blob/main/server/controllers/route.js) (API router), [`server/controllers/contact/_routes.js`](https://github.com/prolinkinfo/realestatecrm/blob/main/server/controllers/contact/_routes.js) (Contact routes), [`server/controllers/property/_routes.js`](https://github.com/prolinkinfo/realestatecrm/blob/main/server/controllers/property/_routes.js) (Property routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_signin["Sign in<br/>[index.jsx]"]
  node_routes["Client routes<br/>[routes.js]"]
  node_views["Admin views"]
end

subgraph group_api["API routing"]
  node_user_routes["User routes<br/>[_routes.js]"]
  node_api_root["API router<br/>[route.js]"]
  node_contact_routes["Contact routes<br/>[_routes.js]"]
  node_property_routes["Property routes<br/>[_routes.js]"]
  node_document_routes["Document routes<br/>[_routes.js]"]
  node_custom_routes["Custom-field routes<br/>[_routes.js]"]
  node_quote_routes["Quote routes<br/>[_routes.js]"]
  node_opp_routes["Opportunity routes<br/>[_routes.js]"]
  node_validation_routes["Validation routes<br/>[_routes.js]"]
  node_contact_controller["Contact controller<br/>[contact.js]"]
  node_property_controller["Property controller<br/>[property.js]"]
  node_image_controller["Image controller"]
end

subgraph group_domains["CRM capabilities"]
  node_sales["Leads and sales"]
  node_records["Contacts and property"]
  node_workflow["Tasks and calendar"]
  node_communications["Communications"]
  node_finance["Quotes and invoices"]
  node_reports["Reports"]
  node_admin["CRM configuration"]
end

subgraph group_persistence["Persistence"]
  node_image_schema[("Image records<br/>[imagesSchema.js]")]
end

node_agent(("CRM user"))

node_agent -->|"signs in"| node_signin
node_agent -->|"uses CRM"| node_routes
node_routes -->|"selects views"| node_views
node_routes -->|"routes to"| node_sales
node_routes -->|"routes to"| node_records
node_routes -->|"routes to"| node_workflow
node_routes -->|"routes to"| node_communications
node_routes -->|"routes to"| node_finance
node_routes -->|"routes to"| node_reports
node_routes -->|"routes to"| node_admin
node_api_root -->|"mounts at /contact"| node_contact_routes
node_api_root -->|"mounts at /property"| node_property_routes
node_api_root -->|"mounts at /document"| node_document_routes
node_api_root -->|"mounts at /custom-field"| node_custom_routes
node_api_root -->|"mounts at /quotes"| node_quote_routes
node_api_root -->|"mounts at /opportunity"| node_opp_routes
node_api_root -->|"mounts at /validation"| node_validation_routes
node_api_root -->|"mounts at /user"| node_user_routes
node_contact_routes -->|"dispatches"| node_contact_controller
node_property_routes -->|"dispatches"| node_property_controller
node_image_controller -->|"reads and writes"| node_image_schema

click node_signin "https://github.com/prolinkinfo/realestatecrm/blob/main/client/src/views/auth/signIn/index.jsx"
click node_routes "https://github.com/prolinkinfo/realestatecrm/blob/main/client/src/routes.js"
click node_views "https://github.com/prolinkinfo/realestatecrm/tree/main/client/src/views/admin"
click node_user_routes "https://github.com/prolinkinfo/realestatecrm/blob/main/server/controllers/user/_routes.js"
click node_api_root "https://github.com/prolinkinfo/realestatecrm/blob/main/server/controllers/route.js"
click node_contact_routes "https://github.com/prolinkinfo/realestatecrm/blob/main/server/controllers/contact/_routes.js"
click node_property_routes "https://github.com/prolinkinfo/realestatecrm/blob/main/server/controllers/property/_routes.js"
click node_document_routes "https://github.com/prolinkinfo/realestatecrm/blob/main/server/controllers/document/_routes.js"
click node_custom_routes "https://github.com/prolinkinfo/realestatecrm/blob/main/server/controllers/customField/_routes.js"
click node_quote_routes "https://github.com/prolinkinfo/realestatecrm/blob/main/server/controllers/quotes/_routes.js"
click node_opp_routes "https://github.com/prolinkinfo/realestatecrm/blob/main/server/controllers/opportunities/_routes.js"
click node_validation_routes "https://github.com/prolinkinfo/realestatecrm/blob/main/server/controllers/validation/_routes.js"
click node_sales "https://github.com/prolinkinfo/realestatecrm/tree/main/client/src/views/admin/lead"
click node_records "https://github.com/prolinkinfo/realestatecrm/tree/main/client/src/views/admin/contact"
click node_workflow "https://github.com/prolinkinfo/realestatecrm/tree/main/client/src/views/admin/task"
click node_communications "https://github.com/prolinkinfo/realestatecrm/tree/main/client/src/views/admin/communication"
click node_finance "https://github.com/prolinkinfo/realestatecrm/tree/main/client/src/views/admin/quotes"
click node_reports "https://github.com/prolinkinfo/realestatecrm/tree/main/client/src/views/admin/reports"
click node_admin "https://github.com/prolinkinfo/realestatecrm/tree/main/client/src/views/admin/customField"
click node_contact_controller "https://github.com/prolinkinfo/realestatecrm/blob/main/server/controllers/contact/contact.js"
click node_property_controller "https://github.com/prolinkinfo/realestatecrm/blob/main/server/controllers/property/property.js"
click node_image_controller "https://github.com/prolinkinfo/realestatecrm/blob/main/server/controllers/images/imagesController.js"
click node_image_schema "https://github.com/prolinkinfo/realestatecrm/blob/main/server/model/schema/imagesSchema.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_signin,node_routes,node_views,node_agent toneBlue
class node_user_routes,node_api_root,node_contact_routes,node_property_routes,node_document_routes,node_custom_routes,node_quote_routes,node_opp_routes,node_validation_routes,node_contact_controller,node_property_controller,node_image_controller toneAmber
class node_sales,node_records,node_workflow,node_communications,node_finance,node_reports,node_admin toneMint
class node_image_schema toneRose
```

## Components

### Web application

- [Sign in](https://github.com/prolinkinfo/realestatecrm/blob/main/client/src/views/auth/signIn/index.jsx): `client/src/views/auth/signIn/index.jsx`
- [Client routes](https://github.com/prolinkinfo/realestatecrm/blob/main/client/src/routes.js): `client/src/routes.js`
- [Admin views](https://github.com/prolinkinfo/realestatecrm/tree/main/client/src/views/admin): `client/src/views/admin`

### API routing

- [User routes](https://github.com/prolinkinfo/realestatecrm/blob/main/server/controllers/user/_routes.js): `server/controllers/user/_routes.js`
- [API router](https://github.com/prolinkinfo/realestatecrm/blob/main/server/controllers/route.js): `server/controllers/route.js`
- [Contact routes](https://github.com/prolinkinfo/realestatecrm/blob/main/server/controllers/contact/_routes.js): `server/controllers/contact/_routes.js`
- [Property routes](https://github.com/prolinkinfo/realestatecrm/blob/main/server/controllers/property/_routes.js): `server/controllers/property/_routes.js`
- [Document routes](https://github.com/prolinkinfo/realestatecrm/blob/main/server/controllers/document/_routes.js): `server/controllers/document/_routes.js`
- [Custom-field routes](https://github.com/prolinkinfo/realestatecrm/blob/main/server/controllers/customField/_routes.js): `server/controllers/customField/_routes.js`
- [Quote routes](https://github.com/prolinkinfo/realestatecrm/blob/main/server/controllers/quotes/_routes.js): `server/controllers/quotes/_routes.js`
- [Opportunity routes](https://github.com/prolinkinfo/realestatecrm/blob/main/server/controllers/opportunities/_routes.js): `server/controllers/opportunities/_routes.js`
- [Validation routes](https://github.com/prolinkinfo/realestatecrm/blob/main/server/controllers/validation/_routes.js): `server/controllers/validation/_routes.js`
- [Contact controller](https://github.com/prolinkinfo/realestatecrm/blob/main/server/controllers/contact/contact.js): `server/controllers/contact/contact.js`
- [Property controller](https://github.com/prolinkinfo/realestatecrm/blob/main/server/controllers/property/property.js): `server/controllers/property/property.js`
- [Image controller](https://github.com/prolinkinfo/realestatecrm/blob/main/server/controllers/images/imagesController.js): `server/controllers/images/imagesController.js`

### CRM capabilities

- [Leads and sales](https://github.com/prolinkinfo/realestatecrm/tree/main/client/src/views/admin/lead): `client/src/views/admin/lead`
- [Contacts and property](https://github.com/prolinkinfo/realestatecrm/tree/main/client/src/views/admin/contact): `client/src/views/admin/contact`
- [Tasks and calendar](https://github.com/prolinkinfo/realestatecrm/tree/main/client/src/views/admin/task): `client/src/views/admin/task`
- [Communications](https://github.com/prolinkinfo/realestatecrm/tree/main/client/src/views/admin/communication): `client/src/views/admin/communication`
- [Quotes and invoices](https://github.com/prolinkinfo/realestatecrm/tree/main/client/src/views/admin/quotes): `client/src/views/admin/quotes`
- [Reports](https://github.com/prolinkinfo/realestatecrm/tree/main/client/src/views/admin/reports): `client/src/views/admin/reports`
- [CRM configuration](https://github.com/prolinkinfo/realestatecrm/tree/main/client/src/views/admin/customField): `client/src/views/admin/customField`

### Persistence

- [Image records](https://github.com/prolinkinfo/realestatecrm/blob/main/server/model/schema/imagesSchema.js): `server/model/schema/imagesSchema.js`

### Other components

- **CRM user**

## Connections

- CRM user → Sign in: signs in
- CRM user → Client routes: uses CRM
- Client routes → Admin views: selects views
- Client routes → Leads and sales: routes to
- Client routes → Contacts and property: routes to
- Client routes → Tasks and calendar: routes to
- Client routes → Communications: routes to
- Client routes → Quotes and invoices: routes to
- Client routes → Reports: routes to
- Client routes → CRM configuration: routes to
- API router → Contact routes: mounts at /contact
- API router → Property routes: mounts at /property
- API router → Document routes: mounts at /document
- API router → Custom-field routes: mounts at /custom-field
- API router → Quote routes: mounts at /quotes
- API router → Opportunity routes: mounts at /opportunity
- API router → Validation routes: mounts at /validation
- API router → User routes: mounts at /user
- Contact routes → Contact controller: dispatches
- Property routes → Property controller: dispatches
- Image controller → Image records: reads and writes
