How girleniogomesdev/projeto-front-end-faculdade works
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: Mapa.jsx Shop search · App.jsx Route shell · Cadastros.jsx Registration flow · ScheduleForm.jsx Appointment form
Components 27
App and navigation
- Route shell
src/App.jsx - Home
src/pages/Home/Home.jsx - Intro banner
src/components/Banner/Banner.jsx
Tutor registration
- Registration flow
src/pages/Cadastros/Cadastros.jsx - Tutor form
src/components/UserForm/UserForm.jsx - Pet form
src/components/PetForm/PetForm.jsx - Location form
src/components/LocationForm/LocationForm.jsx
Pet shop discovery
- Shop search
src/pages/Mapa/Mapa.jsx - Local shop fallback
src/data/petshops.json - Shop result card
src/components/PetShopCard/PetShopCard.jsx - Interactive map
src/components/MapaReal/MapaReal.jsx - Empty state
src/components/EmptyState/EmptyState.jsx
Login and appointment
- Login form
src/components/AuthLogin/AuthLogin.jsx - Route guard
src/components/ProtectedRoute/ProtectedRoute.jsx - Appointment page
src/pages/Agendamento/Agendamento.jsx - Appointment form
src/components/ScheduleForm/ScheduleForm.jsx - Service options
src/data/servicos.json - Available hours
src/data/horarios.json
API and persistence
- Shop lookup
src/services/petshopService.js - Authentication
src/services/authService.js - HTTP client
src/services/apiClient.js - API configuration
src/services/apiConfig.js - Session service
src/services/sessionService.js
Other components
- Pet owner
- Overpass API
- DummyJSON
- Browser localStorage
Connections 29
- Pet owner → Route shell: opens
README.md - Route shell → Home: routes to
src/App.jsx - Route shell → Registration flow: routes to
src/App.jsx - Route shell → Shop search: routes to
src/App.jsx - Route shell → Appointment page: routes through guard
src/App.jsx - Route shell → Login form: routes to
src/App.jsx - Home → Intro banner: renders
src/pages/Home/Home.jsx - Registration flow → Tutor form: renders
src/pages/Cadastros/Cadastros.jsx - Registration flow → Pet form: renders
src/pages/Cadastros/Cadastros.jsx - Registration flow → Location form: renders
src/pages/Cadastros/Cadastros.jsx - Shop search → Shop lookup: fetches shops
src/pages/Mapa/Mapa.jsx - Shop lookup → Overpass API: queries
src/services/petshopService.js - Shop search → Local shop fallback: falls back to
README.md - Shop search → Shop result card: renders results
README.md - Shop search → Interactive map: renders markers
src/pages/Mapa/Mapa.jsx - Shop search → Empty state: shows when empty
src/pages/Mapa/Mapa.jsx - Shop search → Appointment page: starts appointment
README.md - Login form → Authentication: logs in
src/components/AuthLogin/AuthLogin.jsx - Route guard → Authentication: checks session
README.md - Authentication → HTTP client: requests auth
src/services/authService.js - HTTP client → API configuration: uses base URL
src/services/apiClient.js - HTTP client → DummyJSON: sends requests
README.md - Authentication → Session service: saves and reads
src/services/authService.js - Session service → Browser localStorage: persists session
src/services/sessionService.js - Appointment page → Appointment form: renders
src/pages/Agendamento/Agendamento.jsx - Appointment form → Service options: loads services
src/components/ScheduleForm/ScheduleForm.jsx - Appointment form → Available hours: loads hours
src/components/ScheduleForm/ScheduleForm.jsx - Appointment form → Browser localStorage: stores confirmation
README.md - Shop search → Browser localStorage: stores selection
README.md