# ser-valdivia/venta_lotes architecture

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

- Interactive diagram: https://gitdiagram.com/ser-valdivia/venta_lotes
- Repository: https://github.com/ser-valdivia/venta_lotes

## Overview

Córdoba Serrana Inmuebles is a property-listing and direct-contact website with a Google-authenticated administration panel. Public users browse and filter published properties, inspect details and map locations, then contact owners; administrators manage listings and view activity metrics. Firestore is the documented live catalog and metrics store, with local data and browser storage as fallbacks. The public app and admin code are excerpted; some subsystem links below rely on README descriptions rather than inspected page wiring.

Main entry points: [`js/app.js`](https://github.com/ser-valdivia/venta_lotes/blob/main/js/app.js) (Browse and contact), [`js/firebase-config.js`](https://github.com/ser-valdivia/venta_lotes/blob/main/js/firebase-config.js) (Firebase services), [`js/admin.js`](https://github.com/ser-valdivia/venta_lotes/blob/main/js/admin.js) (Admin operations), [`admin.html`](https://github.com/ser-valdivia/venta_lotes/blob/main/admin.html) (Admin panel)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public property experience"]
  node_public_ui["Public listing<br/>[index.html]"]
  node_browse["Browse and contact<br/>[app.js]"]
  node_property_map["Interactive property map<br/>[map.js]"]
end

subgraph group_admin["Administration"]
  node_admin_ui["Admin panel<br/>[admin.html]"]
  node_admin_logic["Admin operations<br/>[admin.js]"]
  node_admin_map["Map editor<br/>[admin.js]"]
  node_dashboard["Metrics dashboard<br/>[admin.js]"]
end

subgraph group_services["Data and integrations"]
  node_catalog[("Seed property catalog<br/>[data.js]")]
  node_firebase["Firebase services<br/>[firebase-config.js]"]
  node_firestore_catalog[("Firestore catalog")]
  node_firestore_metrics[("Firestore metrics")]
  node_local_metrics[("Local metrics fallback<br/>[firebase-config.js]")]
end

node_visitor(("Property visitor"))
node_google(("Google account"))
node_whatsapp(("WhatsApp"))
node_emailjs["EmailJS"]
node_map_tiles["Map tile providers"]
node_analytics["Google analytics tools"]

node_visitor -->|"opens"| node_public_ui
node_public_ui -.->|"runs"| node_browse
node_browse -.->|"loads listings"| node_firestore_catalog
node_browse -.->|"fallback catalog"| node_catalog
node_browse -.->|"opens property map"| node_property_map
node_browse -->|"records activity"| node_firebase
node_browse -->|"opens contact"| node_whatsapp
node_browse -->|"sends inquiry"| node_emailjs
node_property_map -->|"loads tiles"| node_map_tiles
node_admin_ui -.->|"runs"| node_admin_logic
node_google -->|"authenticates"| node_firebase
node_admin_logic -->|"checks access"| node_firebase
node_admin_logic -->|"manages listings"| node_firestore_catalog
node_admin_logic -.->|"local fallback"| node_catalog
node_admin_logic -->|"edits coordinates"| node_admin_map
node_admin_logic -->|"loads metrics"| node_dashboard
node_dashboard -->|"requests totals"| node_firebase
node_firebase -->|"reads and writes"| node_firestore_catalog
node_firebase -->|"reads and writes"| node_firestore_metrics
node_firebase -->|"stores fallback"| node_local_metrics
node_admin_ui -->|"links to tools"| node_analytics

click node_public_ui "https://github.com/ser-valdivia/venta_lotes/blob/main/index.html"
click node_browse "https://github.com/ser-valdivia/venta_lotes/blob/main/js/app.js"
click node_catalog "https://github.com/ser-valdivia/venta_lotes/blob/main/js/data.js"
click node_property_map "https://github.com/ser-valdivia/venta_lotes/blob/main/js/map.js"
click node_admin_ui "https://github.com/ser-valdivia/venta_lotes/blob/main/admin.html"
click node_admin_logic "https://github.com/ser-valdivia/venta_lotes/blob/main/js/admin.js"
click node_admin_map "https://github.com/ser-valdivia/venta_lotes/blob/main/js/admin.js"
click node_dashboard "https://github.com/ser-valdivia/venta_lotes/blob/main/js/admin.js"
click node_firebase "https://github.com/ser-valdivia/venta_lotes/blob/main/js/firebase-config.js"
click node_local_metrics "https://github.com/ser-valdivia/venta_lotes/blob/main/js/firebase-config.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_public_ui,node_browse,node_property_map toneBlue
class node_admin_ui,node_admin_logic,node_admin_map,node_dashboard toneAmber
class node_catalog,node_firebase,node_firestore_catalog,node_firestore_metrics,node_local_metrics toneMint
class node_visitor,node_google,node_whatsapp,node_emailjs,node_map_tiles,node_analytics toneIndigo
```

## Components

### Public property experience

- [Public listing](https://github.com/ser-valdivia/venta_lotes/blob/main/index.html): `index.html`
- [Browse and contact](https://github.com/ser-valdivia/venta_lotes/blob/main/js/app.js): `js/app.js`
- [Interactive property map](https://github.com/ser-valdivia/venta_lotes/blob/main/js/map.js): `js/map.js`

### Administration

- [Admin panel](https://github.com/ser-valdivia/venta_lotes/blob/main/admin.html): `admin.html`
- [Admin operations](https://github.com/ser-valdivia/venta_lotes/blob/main/js/admin.js): `js/admin.js`
- [Map editor](https://github.com/ser-valdivia/venta_lotes/blob/main/js/admin.js): `js/admin.js`
- [Metrics dashboard](https://github.com/ser-valdivia/venta_lotes/blob/main/js/admin.js): `js/admin.js`

### Data and integrations

- [Seed property catalog](https://github.com/ser-valdivia/venta_lotes/blob/main/js/data.js): `js/data.js`
- [Firebase services](https://github.com/ser-valdivia/venta_lotes/blob/main/js/firebase-config.js): `js/firebase-config.js`
- **Firestore catalog**
- **Firestore metrics**
- [Local metrics fallback](https://github.com/ser-valdivia/venta_lotes/blob/main/js/firebase-config.js): `js/firebase-config.js`

### Other components

- **Property visitor**
- **Google account**
- **WhatsApp**
- **EmailJS**
- **Map tile providers**
- **Google analytics tools**

## Connections

- Property visitor → Public listing: opens (evidence: `README.md`)
- Public listing → Browse and contact: runs
- Browse and contact → Firestore catalog: loads listings (evidence: `README.md`)
- Browse and contact → Seed property catalog: fallback catalog (evidence: `README.md`)
- Browse and contact → Interactive property map: opens property map (evidence: `README.md`)
- Browse and contact → Firebase services: records activity (evidence: `js/app.js`)
- Browse and contact → WhatsApp: opens contact (evidence: `js/app.js`)
- Browse and contact → EmailJS: sends inquiry (evidence: `js/app.js`)
- Interactive property map → Map tile providers: loads tiles (evidence: `js/map.js`)
- Admin panel → Admin operations: runs
- Google account → Firebase services: authenticates (evidence: `js/firebase-config.js`)
- Admin operations → Firebase services: checks access (evidence: `js/admin.js`)
- Admin operations → Firestore catalog: manages listings (evidence: `js/admin.js`)
- Admin operations → Seed property catalog: local fallback (evidence: `README.md`)
- Admin operations → Map editor: edits coordinates (evidence: `js/admin.js`)
- Admin operations → Metrics dashboard: loads metrics (evidence: `js/admin.js`)
- Metrics dashboard → Firebase services: requests totals (evidence: `js/admin.js`)
- Firebase services → Firestore catalog: reads and writes (evidence: `js/firebase-config.js`)
- Firebase services → Firestore metrics: reads and writes (evidence: `js/firebase-config.js`)
- Firebase services → Local metrics fallback: stores fallback (evidence: `js/firebase-config.js`)
- Admin panel → Google analytics tools: links to tools (evidence: `README.md`)
