# delibes81/kavixinmobil architecture

> Architecture diagram of the GitHub repository delibes81/kavixinmobil, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/delibes81/kavixinmobil
- Repository: https://github.com/delibes81/kavixinmobil

## Overview

##### Project type and purpose
- Nova Hestia is a full-stack, JAMstack-style real-estate application.
- The “frontend” lives entirely in Vite/React/TypeScript/Tailwind, hosted on Netlify.
- The “backend” is Supabase (PostgreSQL, Auth, Storage) accessed via the supabase.ts client wrapper.

##### File structure
- Top-level build/config: `package.json`, `vite.config.ts`, `netlify.toml`, environment files.
- Frontend application under `/src`:
- `/components` (UI building blocks, grouped by feature: auth, home, blog, properties, admin, etc.)
- `/pages` (React Router pages for user and admin flows)
- `/contexts`, `/hooks`, `/data`, `/lib/supabase.ts`, `/utils`
- `/types` for TypeScript definitions.
- Supabase migrations in `/supabase/migrations`, plus a discarded‐migrations folder under `.bolt`.
- Public assets and redirect/header rules under `/public`.
- Build/CI config in `.bolt`, Tailwind & ESLint config files.

##### README for additional insights
- Describes features: public property search & detail pages, and an admin panel.
- Indicates no custom backend server—everything goes through Supabase.

## Diagram (Mermaid)

```mermaid
graph TB

  subgraph "Client / Frontend Layer"
    Browser["Client Browser\n(React/Vite bundle)"]:::frontend
    App["App.tsx\n(Routing)"]:::frontend
    subgraph "UI Components & Pages"
      UI["UI Component Library"]:::frontend
      HomePage["HomePage"]:::frontend
      BlogPage["Blog Pages"]:::frontend
      PropertyPages["Property Pages"]:::frontend
      AdminPages["Admin Panel"]:::frontend
    end
    subgraph "Auth & Context"
      AuthCtx["AuthContext"]:::frontend
      LoginPage["LoginPage"]:::frontend
      Protected["ProtectedRoute"]:::frontend
    end
    subgraph "Data Hooks"
      UseProps["useProperties"]:::frontend
      UseMapbox["useMapbox"]:::frontend
      UseImageUp["useImageUpload"]:::frontend
    end

    Browser --> App
    App --> UI
    App --> HomePage
    App --> BlogPage
    App --> PropertyPages
    App --> AdminPages
    App --> AuthCtx
    AuthCtx --> LoginPage
    AuthCtx --> Protected
    UseProps --> PropertyPages
    UseMapbox --> PropertyPages
    UseMapbox --> AdminPages
    UseImageUp --> AdminPages
  end

  subgraph "Backend / Services Layer"
    SupabaseClient["Supabase Client\n(src/lib/supabase.ts)"]:::backend
    supAuth["Authentication Service"]:::backend
    supDB["PostgreSQL Database"]:::backend
    supStorage["Storage Service"]:::backend

    SupabaseClient --> supAuth
    SupabaseClient --> supDB
    SupabaseClient --> supStorage
  end

  subgraph "External APIs"
    Mapbox["Mapbox API"]:::external
    WhatsApp["WhatsApp Contact"]:::external
  end

  PropertyPages -->|"CRUD & Auth"| SupabaseClient
  AdminPages -->|"Admin CRUD"| SupabaseClient
  HomePage -->|"Map tiles & Geocoding"| Mapbox
  PropertyPages -->|"Map tiles & Geocoding"| Mapbox
  PropertyPages -->|"Contact Link"| WhatsApp

  %% Click Events
  click Browser "https://github.com/delibes81/kavixinmobil/blob/main/src/main.tsx"
  click Browser "https://github.com/delibes81/kavixinmobil/blob/main/index.html"
  click Browser "https://github.com/delibes81/kavixinmobil/blob/main/vite.config.ts"
  click App "https://github.com/delibes81/kavixinmobil/blob/main/src/App.tsx"
  click UI "https://github.com/delibes81/kavixinmobil/tree/main/src/components/ui/"
  click HomePage "https://github.com/delibes81/kavixinmobil/blob/main/src/pages/HomePage.tsx"
  click HomePage "https://github.com/delibes81/kavixinmobil/tree/main/src/components/home/"
  click BlogPage "https://github.com/delibes81/kavixinmobil/blob/main/src/pages/BlogPage.tsx"
  click BlogPage "https://github.com/delibes81/kavixinmobil/blob/main/src/pages/BlogPostPage.tsx"
  click BlogPage "https://github.com/delibes81/kavixinmobil/tree/main/src/components/blog/"
  click PropertyPages "https://github.com/delibes81/kavixinmobil/blob/main/src/pages/PropertiesPage.tsx"
  click PropertyPages "https://github.com/delibes81/kavixinmobil/blob/main/src/pages/PropertyDetailPage.tsx"
  click PropertyPages "https://github.com/delibes81/kavixinmobil/tree/main/src/components/properties/"
  click PropertyPages "https://github.com/delibes81/kavixinmobil/tree/main/src/components/property-detail/"
  click AdminPages "https://github.com/delibes81/kavixinmobil/blob/main/src/pages/admin/AdminDashboard.tsx"
  click AdminPages "https://github.com/delibes81/kavixinmobil/blob/main/src/pages/admin/AdminProperties.tsx"
  click AdminPages "https://github.com/delibes81/kavixinmobil/blob/main/src/pages/admin/AdminPropertyCreate.tsx"
  click AdminPages "https://github.com/delibes81/kavixinmobil/blob/main/src/pages/admin/AdminPropertyEdit.tsx"
  click AdminPages "https://github.com/delibes81/kavixinmobil/tree/main/src/components/admin/"
  click AuthCtx "https://github.com/delibes81/kavixinmobil/blob/main/src/contexts/AuthContext.tsx"
  click LoginPage "https://github.com/delibes81/kavixinmobil/blob/main/src/pages/LoginPage.tsx"
  click Protected "https://github.com/delibes81/kavixinmobil/blob/main/src/components/auth/ProtectedRoute.tsx"
  click SupabaseClient "https://github.com/delibes81/kavixinmobil/blob/main/src/lib/supabase.ts"
  click supAuth "https://github.com/delibes81/kavixinmobil/tree/main/supabase/migrations/"
  click supAuth "https://github.com/delibes81/kavixinmobil/tree/main/.bolt/supabase_discarded_migrations/"
  click UseImageUp "https://github.com/delibes81/kavixinmobil/blob/main/src/hooks/useImageUpload.ts"
  click UseMapbox "https://github.com/delibes81/kavixinmobil/blob/main/src/hooks/useMapbox.ts"
  click UseMapbox "https://github.com/delibes81/kavixinmobil/blob/main/src/components/admin/MapboxLocationPicker.tsx"
  click UseMapbox "https://github.com/delibes81/kavixinmobil/blob/main/src/components/admin/LocationPickerMap.tsx"
  click UI "https://github.com/delibes81/kavixinmobil/tree/main/src/components/ui/"
  click Protected "https://github.com/delibes81/kavixinmobil/blob/main/src/components/auth/LoginForm.tsx"
  click Protected "https://github.com/delibes81/kavixinmobil/blob/main/src/components/auth/ProtectedRoute.tsx"

  classDef frontend fill:#d0e7ff,stroke:#0366d6,stroke-width:2px;
  classDef backend fill:#d4f8d4,stroke:#28a745,stroke-width:2px;
  classDef external fill:#ffe5b4,stroke:#e69500,stroke-width:2px;
```
