How haizdwng/animalrestaurantshop works
This is a Vietnamese game-account portal for authentication, browsing and buying shop items, topping up coins, editing an avatar and managing account activity; administrators also manage players, users, gift codes and shop data. The principal flow is session boot or sign-in, role-aware navigation, then shop readiness/catalogue loading and purchase or top-up, with account refreshes after relevant actions. The graph preserves documented administration and avatar branches. Relationships are limited to calls visible in excerpts or references listed in the SOURCE INDEX; unsampled feature-to-API behavior is not inferred.
Main entry points: App.jsx App and navigation · AdminPanel.jsx Admin console · api API client and services · client.js HTTP transport
Components 24
Application shell
- App and navigation
src/application/App.jsx - API client and services
src/shared/library/api - HTTP transport
src/shared/library/api/client.js
Identity and account
- Session lifecycle
src/shared/hooks/useSession.js - Sign-in and registration
src/features/authentication/Auth.jsx - Account and transactions
src/features/account
Shop and payments
- Shop data loader
src/shared/hooks/useShop.js - Shop catalogue
src/features/shop/Shop.jsx - Item purchase
src/features/shop/BuyDialog.jsx - Coin top-up
src/shared/components/payment/TopUp.jsx - Payment tracking
src/shared/components/payment/PaymentDialog.jsx
Avatar editor
- Avatar editor
src/features/avatar/Avatar.jsx - Avatar rendering stage
src/features/avatar/AvatarStage.jsx - Editor state
src/features/avatar/avatarEditorState.js - Rendering utilities
src/features/avatar/avatarRendering.js - Asset manifest and geometry
src/features/avatar
Administration
- Admin console
src/features/administration/AdminPanel.jsx - Gift-code management
src/features/administration/GiftCodes.jsx - Player management
src/features/administration/Players.jsx - User management
src/features/administration/Users.jsx - Shop editor
src/features/administration/ShopEditor.jsx
Other components
- Visitor
- Backend API
- Browser local storage
Connections 27
- Visitor → App and navigation: opens
src/application/App.jsx - App and navigation → Session lifecycle: checks session
src/application/App.jsx - App and navigation → Sign-in and registration: shows for guests
src/application/App.jsx - Sign-in and registration → App and navigation: reports sign-in
src/application/App.jsx - Session lifecycle → API client and services: requests identity
src/shared/hooks/useSession.js - App and navigation → Shop data loader: loads when active
src/application/App.jsx - App and navigation → Shop catalogue: renders shop
src/application/App.jsx - App and navigation → Account and transactions: renders account
src/application/App.jsx - App and navigation → Avatar editor: renders editor
src/application/App.jsx - App and navigation → Admin console: renders admin
src/application/App.jsx - Shop data loader → API client and services: checks and fetches
src/shared/hooks/useShop.js - Shop catalogue → Coin top-up: shows top-up
src/features/shop/Shop.jsx - Shop catalogue → Item purchase: opens purchase
src/features/shop/Shop.jsx - Coin top-up → Payment tracking: opens payment
src/shared/components/payment/TopUp.jsx - Payment tracking → API client and services: checks transaction
src/shared/components/payment/PaymentDialog.jsx - Admin console → Gift-code management: includes management
- Admin console → Player management: includes management
- Admin console → User management: includes management
- Admin console → Shop editor: includes editor
- Avatar editor → Avatar rendering stage: renders stage
src/features/avatar/AvatarStage.jsx - Avatar rendering stage → Rendering utilities: uses rendering
src/features/avatar/AvatarStage.jsx - Rendering utilities → Asset manifest and geometry: uses geometry and assets
src/features/avatar/avatarRendering.js - Editor state → Asset manifest and geometry: uses manifest and config
src/features/avatar/avatarEditorState.js - Avatar rendering stage → Asset manifest and geometry: uses geometry and loading
src/features/avatar/AvatarStage.jsx - API client and services → HTTP transport: exports client
src/shared/library/api/index.js - HTTP transport → Backend API: sends HTTP requests
src/shared/library/api/client.js - HTTP transport → Browser local storage: reads and writes token
src/shared/library/api/client.js