# girleniogomesdev/projeto-front-end-faculdade architecture

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

- Interactive diagram: https://gitdiagram.com/girleniogomesdev/projeto-front-end-faculdade
- Repository: https://github.com/girleniogomesdev/projeto-front-end-faculdade

## Overview

PetNear is a React app for finding pet shops, registering tutor/pet details, and making a protected, demonstrative appointment. The main user path is Home → shop discovery and selection → login if needed → appointment details and confirmation; registration is a separate three-step flow. The map page owns search, filtering, remote lookup, fallback display, and selection. Authentication and API access form an internal service layer. The map and service excerpts show several key calls; other connections below rely on README documentation where noted.

Main entry points: [`src/pages/Mapa/Mapa.jsx`](https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/pages/Mapa/Mapa.jsx) (Shop search), [`src/App.jsx`](https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/App.jsx) (Route shell), [`src/pages/Cadastros/Cadastros.jsx`](https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/pages/Cadastros/Cadastros.jsx) (Registration flow), [`src/components/ScheduleForm/ScheduleForm.jsx`](https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/components/ScheduleForm/ScheduleForm.jsx) (Appointment form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App and navigation"]
  node_app["Route shell<br/>[App.jsx]"]
  node_home["Home<br/>[Home.jsx]"]
  node_banner["Intro banner<br/>[Banner.jsx]"]
end

subgraph group_registration["Tutor registration"]
  node_cadastros["Registration flow<br/>[Cadastros.jsx]"]
  node_tutor["Tutor form<br/>[UserForm.jsx]"]
  node_pet["Pet form<br/>[PetForm.jsx]"]
  node_location["Location form<br/>[LocationForm.jsx]"]
end

subgraph group_discovery["Pet shop discovery"]
  node_mapa["Shop search<br/>[Mapa.jsx]"]
  node_localshops["Local shop fallback<br/>[petshops.json]"]
  node_shopcard["Shop result card<br/>[PetShopCard.jsx]"]
  node_mapview["Interactive map<br/>[MapaReal.jsx]"]
  node_empty["Empty state<br/>[EmptyState.jsx]"]
end

subgraph group_appointment["Login and appointment"]
  node_login["Login form<br/>[AuthLogin.jsx]"]
  node_guard["Route guard<br/>[ProtectedRoute.jsx]"]
  node_appointment["Appointment page<br/>[Agendamento.jsx]"]
  node_schedule["Appointment form<br/>[ScheduleForm.jsx]"]
  node_servicesdata["Service options<br/>[servicos.json]"]
  node_hoursdata["Available hours<br/>[horarios.json]"]
end

subgraph group_services["API and persistence"]
  node_shopservice["Shop lookup<br/>[petshopService.js]"]
  node_auth["Authentication<br/>[authService.js]"]
  node_apiclient["HTTP client<br/>[apiClient.js]"]
  node_apiconfig["API configuration<br/>[apiConfig.js]"]
  node_session["Session service<br/>[sessionService.js]"]
end

node_user(("Pet owner"))
node_overpass{{"Overpass API"}}
node_dummyjson{{"DummyJSON"}}
node_storage[("Browser localStorage")]

node_user -->|"opens"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_cadastros
node_app -->|"routes to"| node_mapa
node_app -->|"routes through guard"| node_appointment
node_app -->|"routes to"| node_login
node_home -->|"renders"| node_banner
node_cadastros -->|"renders"| node_tutor
node_cadastros -->|"renders"| node_pet
node_cadastros -->|"renders"| node_location
node_mapa -->|"fetches shops"| node_shopservice
node_shopservice -->|"queries"| node_overpass
node_mapa -->|"falls back to"| node_localshops
node_mapa -->|"renders results"| node_shopcard
node_mapa -->|"renders markers"| node_mapview
node_mapa -->|"shows when empty"| node_empty
node_mapa -->|"starts appointment"| node_appointment
node_login -->|"logs in"| node_auth
node_guard -->|"checks session"| node_auth
node_auth -->|"requests auth"| node_apiclient
node_apiclient -->|"uses base URL"| node_apiconfig
node_apiclient -->|"sends requests"| node_dummyjson
node_auth -->|"saves and reads"| node_session
node_session -->|"persists session"| node_storage
node_appointment -->|"renders"| node_schedule
node_schedule -->|"loads services"| node_servicesdata
node_schedule -->|"loads hours"| node_hoursdata
node_schedule -->|"stores confirmation"| node_storage
node_mapa -->|"stores selection"| node_storage

click node_app "https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/App.jsx"
click node_home "https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/pages/Home/Home.jsx"
click node_banner "https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/components/Banner/Banner.jsx"
click node_cadastros "https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/pages/Cadastros/Cadastros.jsx"
click node_tutor "https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/components/UserForm/UserForm.jsx"
click node_pet "https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/components/PetForm/PetForm.jsx"
click node_location "https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/components/LocationForm/LocationForm.jsx"
click node_mapa "https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/pages/Mapa/Mapa.jsx"
click node_shopservice "https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/services/petshopService.js"
click node_localshops "https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/data/petshops.json"
click node_shopcard "https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/components/PetShopCard/PetShopCard.jsx"
click node_mapview "https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/components/MapaReal/MapaReal.jsx"
click node_empty "https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/components/EmptyState/EmptyState.jsx"
click node_login "https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/components/AuthLogin/AuthLogin.jsx"
click node_guard "https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/components/ProtectedRoute/ProtectedRoute.jsx"
click node_auth "https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/services/authService.js"
click node_apiclient "https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/services/apiClient.js"
click node_apiconfig "https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/services/apiConfig.js"
click node_session "https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/services/sessionService.js"
click node_appointment "https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/pages/Agendamento/Agendamento.jsx"
click node_schedule "https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/components/ScheduleForm/ScheduleForm.jsx"
click node_servicesdata "https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/data/servicos.json"
click node_hoursdata "https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/data/horarios.json"

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_banner toneBlue
class node_cadastros,node_tutor,node_pet,node_location,node_storage toneAmber
class node_mapa,node_localshops,node_shopcard,node_mapview,node_empty,node_overpass toneMint
class node_login,node_guard,node_appointment,node_schedule,node_servicesdata,node_hoursdata toneRose
class node_shopservice,node_auth,node_apiclient,node_apiconfig,node_session,node_user,node_dummyjson toneIndigo
```

## Components

### App and navigation

- [Route shell](https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/App.jsx): `src/App.jsx`
- [Home](https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/pages/Home/Home.jsx): `src/pages/Home/Home.jsx`
- [Intro banner](https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/components/Banner/Banner.jsx): `src/components/Banner/Banner.jsx`

### Tutor registration

- [Registration flow](https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/pages/Cadastros/Cadastros.jsx): `src/pages/Cadastros/Cadastros.jsx`
- [Tutor form](https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/components/UserForm/UserForm.jsx): `src/components/UserForm/UserForm.jsx`
- [Pet form](https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/components/PetForm/PetForm.jsx): `src/components/PetForm/PetForm.jsx`
- [Location form](https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/components/LocationForm/LocationForm.jsx): `src/components/LocationForm/LocationForm.jsx`

### Pet shop discovery

- [Shop search](https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/pages/Mapa/Mapa.jsx): `src/pages/Mapa/Mapa.jsx`
- [Local shop fallback](https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/data/petshops.json): `src/data/petshops.json`
- [Shop result card](https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/components/PetShopCard/PetShopCard.jsx): `src/components/PetShopCard/PetShopCard.jsx`
- [Interactive map](https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/components/MapaReal/MapaReal.jsx): `src/components/MapaReal/MapaReal.jsx`
- [Empty state](https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/components/EmptyState/EmptyState.jsx): `src/components/EmptyState/EmptyState.jsx`

### Login and appointment

- [Login form](https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/components/AuthLogin/AuthLogin.jsx): `src/components/AuthLogin/AuthLogin.jsx`
- [Route guard](https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/components/ProtectedRoute/ProtectedRoute.jsx): `src/components/ProtectedRoute/ProtectedRoute.jsx`
- [Appointment page](https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/pages/Agendamento/Agendamento.jsx): `src/pages/Agendamento/Agendamento.jsx`
- [Appointment form](https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/components/ScheduleForm/ScheduleForm.jsx): `src/components/ScheduleForm/ScheduleForm.jsx`
- [Service options](https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/data/servicos.json): `src/data/servicos.json`
- [Available hours](https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/data/horarios.json): `src/data/horarios.json`

### API and persistence

- [Shop lookup](https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/services/petshopService.js): `src/services/petshopService.js`
- [Authentication](https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/services/authService.js): `src/services/authService.js`
- [HTTP client](https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/services/apiClient.js): `src/services/apiClient.js`
- [API configuration](https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/services/apiConfig.js): `src/services/apiConfig.js`
- [Session service](https://github.com/girleniogomesdev/projeto-front-end-faculdade/blob/main/src/services/sessionService.js): `src/services/sessionService.js`

### Other components

- **Pet owner**
- **Overpass API**
- **DummyJSON**
- **Browser localStorage**

## Connections

- Pet owner → Route shell: opens (evidence: `README.md`)
- Route shell → Home: routes to (evidence: `src/App.jsx`)
- Route shell → Registration flow: routes to (evidence: `src/App.jsx`)
- Route shell → Shop search: routes to (evidence: `src/App.jsx`)
- Route shell → Appointment page: routes through guard (evidence: `src/App.jsx`)
- Route shell → Login form: routes to (evidence: `src/App.jsx`)
- Home → Intro banner: renders (evidence: `src/pages/Home/Home.jsx`)
- Registration flow → Tutor form: renders (evidence: `src/pages/Cadastros/Cadastros.jsx`)
- Registration flow → Pet form: renders (evidence: `src/pages/Cadastros/Cadastros.jsx`)
- Registration flow → Location form: renders (evidence: `src/pages/Cadastros/Cadastros.jsx`)
- Shop search → Shop lookup: fetches shops (evidence: `src/pages/Mapa/Mapa.jsx`)
- Shop lookup → Overpass API: queries (evidence: `src/services/petshopService.js`)
- Shop search → Local shop fallback: falls back to (evidence: `README.md`)
- Shop search → Shop result card: renders results (evidence: `README.md`)
- Shop search → Interactive map: renders markers (evidence: `src/pages/Mapa/Mapa.jsx`)
- Shop search → Empty state: shows when empty (evidence: `src/pages/Mapa/Mapa.jsx`)
- Shop search → Appointment page: starts appointment (evidence: `README.md`)
- Login form → Authentication: logs in (evidence: `src/components/AuthLogin/AuthLogin.jsx`)
- Route guard → Authentication: checks session (evidence: `README.md`)
- Authentication → HTTP client: requests auth (evidence: `src/services/authService.js`)
- HTTP client → API configuration: uses base URL (evidence: `src/services/apiClient.js`)
- HTTP client → DummyJSON: sends requests (evidence: `README.md`)
- Authentication → Session service: saves and reads (evidence: `src/services/authService.js`)
- Session service → Browser localStorage: persists session (evidence: `src/services/sessionService.js`)
- Appointment page → Appointment form: renders (evidence: `src/pages/Agendamento/Agendamento.jsx`)
- Appointment form → Service options: loads services (evidence: `src/components/ScheduleForm/ScheduleForm.jsx`)
- Appointment form → Available hours: loads hours (evidence: `src/components/ScheduleForm/ScheduleForm.jsx`)
- Appointment form → Browser localStorage: stores confirmation (evidence: `README.md`)
- Shop search → Browser localStorage: stores selection (evidence: `README.md`)
