# michelejoohann/jardim-dos-presentes architecture

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

- Interactive diagram: https://gitdiagram.com/michelejoohann/jardim-dos-presentes
- Repository: https://github.com/michelejoohann/jardim-dos-presentes

## Overview

Jardim dos Presentes is a React gift-catalog application backed by Firebase. Visitors browse a live catalog, view gift details, and reserve or mark gifts received with an optional private message; an administrator signs in to manage products, reservations, and JSON backups. The graph distinguishes UI orchestration, catalog and gifting, administration, and Firebase data services. Some README-described capabilities, including backup and private-message management, are represented at their documented subsystem level because their detailed implementation was not sampled.

Main entry points: [`src/components/AdminMigrationPanel.jsx`](https://github.com/michelejoohann/jardim-dos-presentes/blob/main/src/components/AdminMigrationPanel.jsx) (Admin Panel), [`src/App.jsx`](https://github.com/michelejoohann/jardim-dos-presentes/blob/main/src/App.jsx) (App & Navigation), [`src/services/reservationService.js`](https://github.com/michelejoohann/jardim-dos-presentes/blob/main/src/services/reservationService.js) (Reservation Service), [`src/components/ProductEditor.jsx`](https://github.com/michelejoohann/jardim-dos-presentes/blob/main/src/components/ProductEditor.jsx) (Product Editor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_app_shell["App &amp; Navigation<br/>[App.jsx]"]
end

subgraph group_catalog["Catalog &amp; Gifting"]
  node_product_card["Gift Card<br/>[ProductCard.jsx]"]
  node_gift_modal["Gift Modal<br/>[GiftModal.jsx]"]
  node_reservation_service["Reservation Service"]
end

subgraph group_admin["Administration"]
  node_admin_panel["Admin Panel"]
  node_product_editor["Product Editor<br/>[ProductEditor.jsx]"]
  node_editor_modal["Editor Compatibility Wrapper"]
  node_gift_suggestions["Gift Suggestions<br/>[giftSuggestions.js]"]
  node_product_service["Product Service<br/>[productService.js]"]
end

subgraph group_data["Firebase Data"]
  node_firebase_config["Firebase Configuration<br/>[config.js]"]
  node_firestore[("Cloud Firestore")]
  node_firebase_auth["Firebase Authentication"]
  node_security_rules["Firestore Security Rules<br/>[firestore.rules]"]
end

node_visitor(("Visitor"))
node_admin_user(("Administrator"))
node_firebase_platform["Firebase Platform"]

node_visitor -->|"browses"| node_app_shell
node_app_shell -->|"renders"| node_product_card
node_app_shell -->|"subscribes to products"| node_firestore
node_app_shell -->|"subscribes to reservations"| node_reservation_service
node_app_shell -->|"renders"| node_gift_modal
node_product_card -.->|"invokes gift action"| node_app_shell
node_visitor -->|"submits gift intent"| node_gift_modal
node_gift_modal -->|"creates reservation"| node_reservation_service
node_reservation_service -->|"writes reservations"| node_firestore
node_reservation_service -->|"streams reservations"| node_firestore
node_admin_user -->|"manages catalog"| node_admin_panel
node_app_shell -->|"loads admin route"| node_admin_panel
node_admin_panel -->|"authenticates"| node_firebase_auth
node_admin_panel -->|"reads private messages"| node_reservation_service
node_admin_panel -->|"manages products"| node_product_service
node_admin_panel -->|"renders editor"| node_product_editor
node_admin_panel -->|"imports product batches"| node_firestore
node_admin_panel -.->|"backs up catalog"| node_firestore
node_product_editor -->|"saves product"| node_product_service
node_product_editor -->|"requests suggestions"| node_gift_suggestions
node_editor_modal -->|"wraps editor"| node_product_editor
node_product_service -->|"writes products"| node_firestore
node_product_service -->|"deletes linked reservations"| node_firestore
node_firebase_config -->|"initializes clients"| node_firebase_platform
node_firebase_config -->|"configures client"| node_firestore
node_firebase_config -->|"configures client"| node_firebase_auth
node_security_rules -->|"protects collections"| node_firestore

click node_app_shell "https://github.com/michelejoohann/jardim-dos-presentes/blob/main/src/App.jsx"
click node_product_card "https://github.com/michelejoohann/jardim-dos-presentes/blob/main/src/components/ProductCard.jsx"
click node_gift_modal "https://github.com/michelejoohann/jardim-dos-presentes/blob/main/src/components/GiftModal.jsx"
click node_reservation_service "https://github.com/michelejoohann/jardim-dos-presentes/blob/main/src/services/reservationService.js"
click node_admin_panel "https://github.com/michelejoohann/jardim-dos-presentes/blob/main/src/components/AdminMigrationPanel.jsx"
click node_product_editor "https://github.com/michelejoohann/jardim-dos-presentes/blob/main/src/components/ProductEditor.jsx"
click node_editor_modal "https://github.com/michelejoohann/jardim-dos-presentes/blob/main/src/components/ProductEditorModal.jsx"
click node_gift_suggestions "https://github.com/michelejoohann/jardim-dos-presentes/blob/main/src/services/giftSuggestions.js"
click node_product_service "https://github.com/michelejoohann/jardim-dos-presentes/blob/main/src/services/productService.js"
click node_firebase_config "https://github.com/michelejoohann/jardim-dos-presentes/blob/main/src/firebase/config.js"
click node_security_rules "https://github.com/michelejoohann/jardim-dos-presentes/blob/main/firestore.rules"

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_shell toneBlue
class node_product_card,node_gift_modal,node_reservation_service toneAmber
class node_admin_panel,node_product_editor,node_editor_modal,node_gift_suggestions,node_product_service toneMint
class node_firebase_config,node_firestore,node_firebase_auth,node_security_rules toneRose
class node_visitor,node_admin_user,node_firebase_platform toneIndigo
```

## Components

### Application

- [App & Navigation](https://github.com/michelejoohann/jardim-dos-presentes/blob/main/src/App.jsx): `src/App.jsx`

### Catalog & Gifting

- [Gift Card](https://github.com/michelejoohann/jardim-dos-presentes/blob/main/src/components/ProductCard.jsx): `src/components/ProductCard.jsx`
- [Gift Modal](https://github.com/michelejoohann/jardim-dos-presentes/blob/main/src/components/GiftModal.jsx): `src/components/GiftModal.jsx`
- [Reservation Service](https://github.com/michelejoohann/jardim-dos-presentes/blob/main/src/services/reservationService.js): `src/services/reservationService.js`

### Administration

- [Admin Panel](https://github.com/michelejoohann/jardim-dos-presentes/blob/main/src/components/AdminMigrationPanel.jsx): `src/components/AdminMigrationPanel.jsx`
- [Product Editor](https://github.com/michelejoohann/jardim-dos-presentes/blob/main/src/components/ProductEditor.jsx): `src/components/ProductEditor.jsx`
- [Editor Compatibility Wrapper](https://github.com/michelejoohann/jardim-dos-presentes/blob/main/src/components/ProductEditorModal.jsx): `src/components/ProductEditorModal.jsx`
- [Gift Suggestions](https://github.com/michelejoohann/jardim-dos-presentes/blob/main/src/services/giftSuggestions.js): `src/services/giftSuggestions.js`
- [Product Service](https://github.com/michelejoohann/jardim-dos-presentes/blob/main/src/services/productService.js): `src/services/productService.js`

### Firebase Data

- [Firebase Configuration](https://github.com/michelejoohann/jardim-dos-presentes/blob/main/src/firebase/config.js): `src/firebase/config.js`
- **Cloud Firestore**
- **Firebase Authentication**
- [Firestore Security Rules](https://github.com/michelejoohann/jardim-dos-presentes/blob/main/firestore.rules): `firestore.rules`

### Other components

- **Visitor**
- **Administrator**
- **Firebase Platform**

## Connections

- Visitor → App & Navigation: browses (evidence: `README.md`)
- App & Navigation → Gift Card: renders (evidence: `src/App.jsx`)
- App & Navigation → Cloud Firestore: subscribes to products (evidence: `src/App.jsx`)
- App & Navigation → Reservation Service: subscribes to reservations (evidence: `src/App.jsx`)
- App & Navigation → Gift Modal: renders (evidence: `src/App.jsx`)
- Gift Card → App & Navigation: invokes gift action (evidence: `src/App.jsx`)
- Visitor → Gift Modal: submits gift intent (evidence: `README.md`)
- Gift Modal → Reservation Service: creates reservation (evidence: `src/components/GiftModal.jsx`)
- Reservation Service → Cloud Firestore: writes reservations (evidence: `src/services/reservationService.js`)
- Reservation Service → Cloud Firestore: streams reservations (evidence: `src/services/reservationService.js`)
- Administrator → Admin Panel: manages catalog (evidence: `README.md`)
- App & Navigation → Admin Panel: loads admin route (evidence: `src/App.jsx`)
- Admin Panel → Firebase Authentication: authenticates (evidence: `src/components/AdminMigrationPanel.jsx`)
- Admin Panel → Reservation Service: reads private messages (evidence: `src/components/AdminMigrationPanel.jsx`)
- Admin Panel → Product Service: manages products (evidence: `src/components/AdminMigrationPanel.jsx`)
- Admin Panel → Product Editor: renders editor (evidence: `src/components/AdminMigrationPanel.jsx`)
- Admin Panel → Cloud Firestore: imports product batches (evidence: `src/components/AdminMigrationPanel.jsx`)
- Admin Panel → Cloud Firestore: backs up catalog (evidence: `README.md`)
- Product Editor → Product Service: saves product (evidence: `src/components/ProductEditor.jsx`)
- Product Editor → Gift Suggestions: requests suggestions (evidence: `src/components/ProductEditor.jsx`)
- Editor Compatibility Wrapper → Product Editor: wraps editor (evidence: `src/components/ProductEditorModal.jsx`)
- Product Service → Cloud Firestore: writes products (evidence: `src/services/productService.js`)
- Product Service → Cloud Firestore: deletes linked reservations (evidence: `src/services/productService.js`)
- Firebase Configuration → Firebase Platform: initializes clients (evidence: `src/firebase/config.js`)
- Firebase Configuration → Cloud Firestore: configures client (evidence: `src/firebase/config.js`)
- Firebase Configuration → Firebase Authentication: configures client (evidence: `src/firebase/config.js`)
- Firestore Security Rules → Cloud Firestore: protects collections (evidence: `README.md`)
