# sortex911/realwork architecture

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

- Interactive diagram: https://gitdiagram.com/sortex911/realwork
- Repository: https://github.com/sortex911/realwork

## Overview

Green Realm Landscape’s React application presents public landscape-design content and a private admin CMS. Visitors enter through the routed public site and browse services, projects, news and procedures or submit a contact inquiry; admins authenticate, manage content and review inquiries. Firestore supplies live site/admin data, while image handling includes Cloudinary optimization and an admin upload path whose storage backend is not fully shown. The graph preserves the main page capabilities and shared rendering/auth layers; some page internals and upload wiring are unsampled, so those links are omitted where unsupported.

Main entry points: [`src/App.jsx`](https://github.com/sortex911/realwork/blob/main/src/App.jsx) (Route Application), [`src/services/adminService.js`](https://github.com/sortex911/realwork/blob/main/src/services/adminService.js) (Content Operations), [`src/components/FadeUp.jsx`](https://github.com/sortex911/realwork/blob/main/src/components/FadeUp.jsx) (Fade Up), [`src/lib/cloudinary.js`](https://github.com/sortex911/realwork/blob/main/src/lib/cloudinary.js) (Cloudinary Helpers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_site["Public Site"]
  node_app["Route Application<br/>[App.jsx]"]
  node_home["Home<br/>[Home.jsx]"]
  node_about["About<br/>[About.jsx]"]
  node_portfolio["Portfolio<br/>[Portfolio.jsx]"]
  node_news["News<br/>[News.jsx]"]
  node_procedure["Procedure<br/>[Procedure.jsx]"]
  node_contact["Contact<br/>[Contact.jsx]"]
  node_client_logos["Client Logos<br/>[ClientLogos.jsx]"]
end

subgraph group_admin["Admin CMS"]
  node_admin_login["Admin Login<br/>[AdminLogin.jsx]"]
  node_dashboard["Admin Dashboard<br/>[AdminDashboard.jsx]"]
  node_guard["Protected Route<br/>[ProtectedRoute.jsx]"]
  node_admin_service["Content Operations<br/>[adminService.js]"]
  node_upload_service[("Cloud Image Storage")]
end

subgraph group_data["Data And Auth"]
  node_auth_context["Auth And Roles<br/>[AuthContext.jsx]"]
  node_auth_module["Firebase Auth Client<br/>[firebaseAuth.js]"]
  node_firebase_client["Firebase Client<br/>[firebase.js]"]
  node_firestore[("Firestore")]
end

subgraph group_media["Media And UI"]
  node_image_component["Optimized Image<br/>[OptimizedImage.jsx]"]
  node_cloudinary["Cloudinary Helpers<br/>[cloudinary.js]"]
  node_image_slider["Image Slider<br/>[ImagesSlider.jsx]"]
  node_shared_motion["Fade Up<br/>[FadeUp.jsx]"]
  node_cloudinary_service[("Cloudinary")]
end

node_visitor(("Visitor"))
node_administrator(("Administrator"))

node_visitor -->|"opens"| node_app
node_administrator -->|"opens"| node_app
node_app -->|"routes"| node_home
node_app -->|"routes"| node_about
node_app -->|"routes"| node_portfolio
node_app -->|"routes"| node_news
node_app -->|"routes"| node_procedure
node_app -->|"routes"| node_contact
node_app -->|"routes"| node_admin_login
node_app -->|"protects dashboard"| node_guard
node_guard -->|"renders"| node_dashboard
node_app -->|"provides admin auth"| node_auth_context
node_home -->|"loads content"| node_admin_service
node_about -->|"loads content"| node_admin_service
node_portfolio -->|"reads projects"| node_firestore
node_contact -->|"submits inquiry"| node_firestore
node_dashboard -->|"streams records"| node_firestore
node_dashboard -->|"manages content"| node_admin_service
node_admin_service -->|"writes records"| node_firestore
node_admin_service -.->|"uploads images"| node_upload_service
node_upload_service -.->|"stores images"| node_cloudinary_service
node_admin_service -->|"uses image helpers"| node_cloudinary
node_auth_context -->|"checks identity"| node_auth_module
node_auth_context -->|"reads user role"| node_firestore
node_auth_module -->|"uses app"| node_firebase_client
node_firebase_client -->|"initializes"| node_firestore
node_client_logos -->|"streams logos"| node_firestore
node_client_logos -->|"renders logos"| node_image_component
node_image_component -->|"optimizes URLs"| node_cloudinary
node_cloudinary -->|"uploads images"| node_cloudinary_service
node_image_slider -->|"uses image helpers"| node_cloudinary
node_portfolio -->|"renders gallery"| node_image_slider
node_home -->|"uses reveal"| node_shared_motion
node_about -->|"uses reveal"| node_shared_motion
node_news -->|"uses reveal"| node_shared_motion
node_contact -->|"uses reveal"| node_shared_motion
node_procedure -->|"uses reveal"| node_shared_motion

click node_app "https://github.com/sortex911/realwork/blob/main/src/App.jsx"
click node_home "https://github.com/sortex911/realwork/blob/main/src/pages/Home.jsx"
click node_about "https://github.com/sortex911/realwork/blob/main/src/pages/About.jsx"
click node_portfolio "https://github.com/sortex911/realwork/blob/main/src/pages/Portfolio.jsx"
click node_news "https://github.com/sortex911/realwork/blob/main/src/pages/News.jsx"
click node_procedure "https://github.com/sortex911/realwork/blob/main/src/pages/Procedure.jsx"
click node_contact "https://github.com/sortex911/realwork/blob/main/src/pages/Contact.jsx"
click node_admin_login "https://github.com/sortex911/realwork/blob/main/src/pages/AdminLogin.jsx"
click node_dashboard "https://github.com/sortex911/realwork/blob/main/src/pages/AdminDashboard.jsx"
click node_guard "https://github.com/sortex911/realwork/blob/main/src/components/ProtectedRoute.jsx"
click node_admin_service "https://github.com/sortex911/realwork/blob/main/src/services/adminService.js"
click node_auth_context "https://github.com/sortex911/realwork/blob/main/src/context/AuthContext.jsx"
click node_auth_module "https://github.com/sortex911/realwork/blob/main/src/firebaseAuth.js"
click node_firebase_client "https://github.com/sortex911/realwork/blob/main/src/firebase.js"
click node_client_logos "https://github.com/sortex911/realwork/blob/main/src/components/ClientLogos.jsx"
click node_image_component "https://github.com/sortex911/realwork/blob/main/src/components/OptimizedImage.jsx"
click node_cloudinary "https://github.com/sortex911/realwork/blob/main/src/lib/cloudinary.js"
click node_image_slider "https://github.com/sortex911/realwork/blob/main/src/components/ImagesSlider.jsx"
click node_shared_motion "https://github.com/sortex911/realwork/blob/main/src/components/FadeUp.jsx"

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_home,node_about,node_portfolio,node_news,node_procedure,node_contact,node_client_logos toneBlue
class node_admin_login,node_dashboard,node_guard,node_admin_service,node_upload_service toneAmber
class node_auth_context,node_auth_module,node_firebase_client,node_firestore toneMint
class node_image_component,node_cloudinary,node_image_slider,node_shared_motion,node_cloudinary_service toneRose
class node_visitor,node_administrator toneIndigo
```

## Components

### Public Site

- [Route Application](https://github.com/sortex911/realwork/blob/main/src/App.jsx): `src/App.jsx`
- [Home](https://github.com/sortex911/realwork/blob/main/src/pages/Home.jsx): `src/pages/Home.jsx`
- [About](https://github.com/sortex911/realwork/blob/main/src/pages/About.jsx): `src/pages/About.jsx`
- [Portfolio](https://github.com/sortex911/realwork/blob/main/src/pages/Portfolio.jsx): `src/pages/Portfolio.jsx`
- [News](https://github.com/sortex911/realwork/blob/main/src/pages/News.jsx): `src/pages/News.jsx`
- [Procedure](https://github.com/sortex911/realwork/blob/main/src/pages/Procedure.jsx): `src/pages/Procedure.jsx`
- [Contact](https://github.com/sortex911/realwork/blob/main/src/pages/Contact.jsx): `src/pages/Contact.jsx`
- [Client Logos](https://github.com/sortex911/realwork/blob/main/src/components/ClientLogos.jsx): `src/components/ClientLogos.jsx`

### Admin CMS

- [Admin Login](https://github.com/sortex911/realwork/blob/main/src/pages/AdminLogin.jsx): `src/pages/AdminLogin.jsx`
- [Admin Dashboard](https://github.com/sortex911/realwork/blob/main/src/pages/AdminDashboard.jsx): `src/pages/AdminDashboard.jsx`
- [Protected Route](https://github.com/sortex911/realwork/blob/main/src/components/ProtectedRoute.jsx): `src/components/ProtectedRoute.jsx`
- [Content Operations](https://github.com/sortex911/realwork/blob/main/src/services/adminService.js): `src/services/adminService.js`
- **Cloud Image Storage**

### Data And Auth

- [Auth And Roles](https://github.com/sortex911/realwork/blob/main/src/context/AuthContext.jsx): `src/context/AuthContext.jsx`
- [Firebase Auth Client](https://github.com/sortex911/realwork/blob/main/src/firebaseAuth.js): `src/firebaseAuth.js`
- [Firebase Client](https://github.com/sortex911/realwork/blob/main/src/firebase.js): `src/firebase.js`
- **Firestore**

### Media And UI

- [Optimized Image](https://github.com/sortex911/realwork/blob/main/src/components/OptimizedImage.jsx): `src/components/OptimizedImage.jsx`
- [Cloudinary Helpers](https://github.com/sortex911/realwork/blob/main/src/lib/cloudinary.js): `src/lib/cloudinary.js`
- [Image Slider](https://github.com/sortex911/realwork/blob/main/src/components/ImagesSlider.jsx): `src/components/ImagesSlider.jsx`
- [Fade Up](https://github.com/sortex911/realwork/blob/main/src/components/FadeUp.jsx): `src/components/FadeUp.jsx`
- **Cloudinary**

### Other components

- **Visitor**
- **Administrator**

## Connections

- Visitor → Route Application: opens (evidence: `src/App.jsx`)
- Administrator → Route Application: opens (evidence: `src/App.jsx`)
- Route Application → Home: routes (evidence: `src/App.jsx`)
- Route Application → About: routes (evidence: `src/App.jsx`)
- Route Application → Portfolio: routes (evidence: `src/App.jsx`)
- Route Application → News: routes (evidence: `src/App.jsx`)
- Route Application → Procedure: routes (evidence: `src/App.jsx`)
- Route Application → Contact: routes (evidence: `src/App.jsx`)
- Route Application → Admin Login: routes (evidence: `src/App.jsx`)
- Route Application → Protected Route: protects dashboard (evidence: `src/App.jsx`)
- Protected Route → Admin Dashboard: renders (evidence: `src/App.jsx`)
- Route Application → Auth And Roles: provides admin auth (evidence: `src/App.jsx`)
- Home → Content Operations: loads content (evidence: `src/pages/Home.jsx`)
- About → Content Operations: loads content (evidence: `src/pages/About.jsx`)
- Portfolio → Firestore: reads projects (evidence: `src/pages/Portfolio.jsx`)
- Contact → Firestore: submits inquiry (evidence: `src/pages/Contact.jsx`)
- Admin Dashboard → Firestore: streams records (evidence: `src/pages/AdminDashboard.jsx`)
- Admin Dashboard → Content Operations: manages content (evidence: `src/pages/AdminDashboard.jsx`)
- Content Operations → Firestore: writes records (evidence: `src/services/adminService.js`)
- Content Operations → Cloud Image Storage: uploads images
- Cloud Image Storage → Cloudinary: stores images
- Content Operations → Cloudinary Helpers: uses image helpers (evidence: `src/services/adminService.js`)
- Auth And Roles → Firebase Auth Client: checks identity (evidence: `src/context/AuthContext.jsx`)
- Auth And Roles → Firestore: reads user role (evidence: `src/context/AuthContext.jsx`)
- Firebase Auth Client → Firebase Client: uses app (evidence: `src/firebaseAuth.js`)
- Firebase Client → Firestore: initializes (evidence: `src/firebase.js`)
- Client Logos → Firestore: streams logos (evidence: `src/components/ClientLogos.jsx`)
- Client Logos → Optimized Image: renders logos (evidence: `src/components/ClientLogos.jsx`)
- Optimized Image → Cloudinary Helpers: optimizes URLs (evidence: `src/components/OptimizedImage.jsx`)
- Cloudinary Helpers → Cloudinary: uploads images (evidence: `src/lib/cloudinary.js`)
- Image Slider → Cloudinary Helpers: uses image helpers (evidence: `src/components/ImagesSlider.jsx`)
- Portfolio → Image Slider: renders gallery (evidence: `src/pages/Portfolio.jsx`)
- Home → Fade Up: uses reveal (evidence: `src/pages/Home.jsx`)
- About → Fade Up: uses reveal (evidence: `src/pages/About.jsx`)
- News → Fade Up: uses reveal (evidence: `src/pages/News.jsx`)
- Contact → Fade Up: uses reveal (evidence: `src/pages/Contact.jsx`)
- Procedure → Fade Up: uses reveal (evidence: `src/pages/Procedure.jsx`)
