How hamed745/pet-care works
PetCare is a React pet-care portal whose main user journey spans service discovery and booking, pet-profile management, and commerce. The router mounts feature pages inside a shared layout; app state coordinates user, pet, booking, and store data, with Firebase-backed authentication and otherwise mock/in-memory data per the README. The graph preserves documented adoption, community, calendar, notifications, and AI capabilities. Source excerpts provide only selected call relationships, so uncertain feature-to-service links are omitted.
Main entry points: App.jsx Route dispatcher · store.jsx Application state · PhotoUpload.jsx Photo upload · AdoptionPages.jsx Adoption listings
Components 25
Application Shell
- Route dispatcher
src/App.jsx - Shared layout
src/components/Layout.jsx - Home discovery
src/pages/Home.jsx
Pet Care
- Service directory
src/pages/Services.jsx - Bookings
src/pages/Bookings.jsx - Care calendar
src/pages/Calendar.jsx - Pet profiles
src/pages/Pets.jsx - Photo upload
src/components/PhotoUpload.jsx
Commerce
- Product browsing
src/pages/Storefront.jsx - Cart & checkout
src/pages/CartPage.jsx - Orders
src/pages/Orders.jsx - Wishlist
src/pages/Wishlist.jsx
Community & Assistance
- Adoption listings
src/pages/AdoptionPages.jsx - Community reports
src/pages/Community.jsx - AI & care tools
src/pages/Extras.jsx - Care chat
src/components/ChatWidget.jsx
State & Integrations
- Application state
src/store.jsx - Persistent state hook
src/hooks/usePersistentState.js - Authentication & profile
src/pages/Auth.jsx - Authentication service
src/services/authService.js - Firebase auth
src/firebase.js - Product catalog
src/storeCatalog.js - Mock domain data
src/data.js - Notifications
src/pages/Notifications.jsx
Other components
- Pet owner
Connections 42
- Pet owner → Route dispatcher: opens pages
src/App.jsx - Route dispatcher → Shared layout: wraps routes
src/App.jsx - Route dispatcher → Home discovery: routes to
src/App.jsx - Route dispatcher → Service directory: routes to
src/App.jsx - Route dispatcher → Bookings: routes to
src/App.jsx - Route dispatcher → Care calendar: routes to
src/App.jsx - Route dispatcher → Pet profiles: routes to
src/App.jsx - Route dispatcher → Adoption listings: routes to
src/App.jsx - Route dispatcher → Community reports: routes to
src/App.jsx - Route dispatcher → AI & care tools: routes to
src/App.jsx - Route dispatcher → Product browsing: routes to
src/App.jsx - Route dispatcher → Cart & checkout: routes to
src/App.jsx - Route dispatcher → Orders: routes to
src/App.jsx - Route dispatcher → Wishlist: routes to
src/App.jsx - Route dispatcher → Authentication & profile: routes to
src/App.jsx - Route dispatcher → Notifications: routes to
src/App.jsx - Shared layout → Application state: reads context
src/components/Layout.jsx - Shared layout → Care chat: renders
src/components/Layout.jsx - Pet profiles → Photo upload: renders uploader
src/pages/Pets.jsx - Authentication & profile → Photo upload: renders uploader
src/pages/Auth.jsx - Adoption listings → Photo upload: renders uploader
src/pages/AdoptionPages.jsx - Community reports → Photo upload: renders uploader
src/pages/Community.jsx - Photo upload → Application state: updates via caller
- Service directory → Mock domain data: reads listings
src/pages/Services.jsx - Home discovery → Mock domain data: reads content
src/pages/Home.jsx - Adoption listings → Mock domain data: reads listings
src/pages/AdoptionPages.jsx - Community reports → Mock domain data: reads content
src/pages/Community.jsx - Pet profiles → Application state: reads and updates
src/pages/Pets.jsx - Bookings → Application state: reads and updates
src/pages/Bookings.jsx - Care calendar → Application state: reads and updates
src/pages/Calendar.jsx - Adoption listings → Application state: reads and updates
src/pages/AdoptionPages.jsx - Community reports → Application state: reads and updates
src/pages/Community.jsx - Notifications → Application state: reads and updates
src/pages/Notifications.jsx - Product browsing → Application state: reads and updates
src/pages/Storefront.jsx - Product browsing → Product catalog: reads products
src/pages/Storefront.jsx - Application state → Persistent state hook: persists state
src/store.jsx - Application state → Authentication service: delegates user updates
src/store.jsx - Application state → Firebase auth: initializes auth
- Authentication & profile → Authentication service: calls auth operations
src/pages/Auth.jsx - Authentication service → Firebase auth: uses auth SDK
src/services/authService.js - Application state → Product catalog: loads products
src/store.jsx - Care chat → AI & care tools: AI feature context
src/pages/Extras.jsx