How kukaracka/digitalpassportclient works
DigitalPassport is a React client for an electronic service book. Users register or sign in, manage their profile and preferences, and maintain a product inventory with details, images, and shareable product pages/QR codes. The main entry renders either the authenticated app or a token-based shared-product view; within inventory, the list owns create/edit/detail interactions while a product hook mediates API operations. The map reflects the shown imports and calls; product screens and services not excerpted are included where the source index identifies their responsibilities, but uncertain links are omitted.
Main entry points: App.jsx App shell · ProductDetail.jsx Product detail · main.jsx React entry · useProducts.js Product state
Components 29
Application shell
- React entry
src/main.jsx - App shell
src/App.jsx - View state
src/contexts/RouteContext.jsx - Loading indicator
src/components/LoadingSpinner.jsx
Account and preferences
- Login
src/components/Login.jsx - Registration
src/components/Register.jsx - Auth state
src/hooks/useAuth.js - Dashboard
src/components/Dashboard.jsx - Profile
src/components/Profile.jsx - Profile editor
src/components/EditProfile.jsx - Avatar upload
src/components/AvatarUploader.jsx - Settings
src/components/Settings.jsx - Theme state
src/hooks/useTheme.js
Product inventory
- Products page
src/components/Products.jsx - Products list
src/components/ProductsList.jsx - Product card
src/components/ProductCard.jsx - Product form
src/components/ProductForm.jsx - Product detail
src/components/ProductDetail.jsx - Product state
src/hooks/useProducts.js - Form drafts
src/hooks/useFormDraft.js - Image gallery
src/components/ProductImageGallery.jsx
Product sharing
- Shared product page
src/components/SharedProductPage.jsx - QR generator
src/components/QRCodeGenerator.jsx
Client services
- Account API
src/services/authAPI.js - Theme persistence
src/utils/themeManager.js - Product API
src/services/productAPI.js - Image API
src/services/productImageAPI.js
Other components
- Visitor
- API server
Connections 35
- Visitor → React entry: opens
src/main.jsx - React entry → App shell: renders
src/main.jsx - React entry → Shared product page: routes to
src/main.jsx - React entry → View state: provides
src/main.jsx - React entry → Theme persistence: initializes
src/main.jsx - App shell → View state: reads view
src/App.jsx - App shell → Auth state: uses auth
src/App.jsx - App shell → Loading indicator: renders
src/App.jsx - App shell → Login: renders
src/App.jsx - App shell → Registration: renders
src/App.jsx - App shell → Dashboard: renders
src/App.jsx - App shell → Products page: renders
src/App.jsx - App shell → Profile: renders
src/App.jsx - App shell → Settings: renders
src/App.jsx - Auth state → Account API: calls
src/hooks/useAuth.js - Account API → API server: HTTP requests
src/services/authAPI.js - Dashboard → Profile: navigates
- Profile → Profile editor: renders
src/components/Profile.jsx - Dashboard → Avatar upload: uses
- Settings → Theme state: uses
src/components/Settings.jsx - Theme state → Theme persistence: reads and saves
src/hooks/useTheme.js - Products page → Products list: renders
src/components/Products.jsx - Products page → Product state: uses
src/components/Products.jsx - Products list → Product card: renders
src/components/ProductsList.jsx - Products list → Product form: renders
src/components/ProductsList.jsx - Products list → Product detail: renders
src/components/ProductsList.jsx - Product detail → Product state: calls
src/components/ProductDetail.jsx - Product detail → Product form: renders
src/components/ProductDetail.jsx - Product detail → Image gallery: renders
src/components/ProductDetail.jsx - Product detail → Loading indicator: renders
src/components/ProductDetail.jsx - Product detail → QR generator: renders
src/components/ProductDetail.jsx - Product form → Form drafts: uses
src/components/ProductForm.jsx - Product state → Product API: calls
src/hooks/useProducts.js - Product state → Image API: calls
src/hooks/useProducts.js - Shared product page → Product state: uses
src/components/SharedProductPage.jsx