How rnldlcn/francos-perfume-frontend works
This is a React frontend for perfume-shop operations, with role-aware login and a dashboard plus a cashier point of sale. The main user flow is login, route to an authorized workspace, then use feature pages to manage sales or operational records. Requests and deliveries have distinct create, review, dispatch, and confirmation stages; POS has product selection, cart, discount, and payment stages. Feature hooks and services form the internal data-access layer. Connections are limited to routes and imports visible in the supplied excerpts or SOURCE INDEX; other feature branches are shown without speculative wiring.
Main entry points: App.jsx Route and role gate · PointOfSalePage.jsx POS workspace · useRequest.js Request state · useDelivery.js Delivery state
Components 31
App and access
- Route and role gate
src/App.jsx - Login page
src/pages/LoginPage.jsx - Login flow
src/hooks/useLogin.js - Auth context
src/auth/AuthProvider.jsx - Dashboard shell
src/layouts/DashboardLayout.jsx
Point of sale
- POS workspace
src/pages/PointOfSalePage.jsx - Cart state
src/hooks/point_of_sale_hooks/useCart.js - Checkout state
src/hooks/point_of_sale_hooks/useCheckout.js - POS product data
src/hooks/point_of_sale_hooks/usePointOfSale.js - POS dialogs and controls
src/components/features/point_of_sale_components
Branch operations
- Transfer requests
src/components/features/request_components - Request state
src/hooks/request_hooks/useRequest.js - Delivery review and receipt
src/components/features/delivery_components - Delivery state
src/hooks/delivery_hooks/useDelivery.js - Account management
src/pages/dashboard/ManageAccountsPage.jsx - Inventory management
src/pages/dashboard/InventoryPage.jsx - Product catalog
src/pages/dashboard/ProductsPage.jsx - Discount management
src/pages/dashboard/DiscountPage.jsx - Archives
src/pages/dashboard/ArchivesPage.jsx - Audit logs
src/pages/dashboard/AuditLogPage.jsx - Forecasting
src/pages/dashboard/ForecastPage.jsx - Transactions and reports
src/pages/dashboard/TransactionsPage.jsx - Barcode tools
src/pages/dashboard/BarcodePage.jsx - Barcode workflow
src/hooks/product_hooks/useBarcode.js
Feature data access
- Request API service
src/services/RequestService.js - Delivery API service
src/services/DeliveryService.js - Barcode service
src/services/BarcodeService.js - HTTP client
src/services/apiClient.js - Filter state
src/hooks/useFilter.js - Formatting helpers
src/utils/formattingUtils.jsx
Other components
- Staff user
Connections 26
- Staff user → Route and role gate: opens app
src/App.jsx - Route and role gate → Login page: routes to
src/App.jsx - Login page → Login flow: uses
src/pages/LoginPage.jsx - Login flow → Auth context: sets session
src/hooks/useLogin.js - Route and role gate → Auth context: checks roles
src/App.jsx - Route and role gate → Dashboard shell: routes to
src/App.jsx - Route and role gate → POS workspace: routes to
src/App.jsx - POS workspace → POS dialogs and controls: renders
src/pages/PointOfSalePage.jsx - POS workspace → Cart state: uses
src/pages/PointOfSalePage.jsx - POS workspace → Checkout state: uses
src/pages/PointOfSalePage.jsx - POS workspace → POS product data: loads products
src/pages/PointOfSalePage.jsx - Route and role gate → Transfer requests: routes to
src/App.jsx - Transfer requests → Request state: uses
src/components/features/request_components/CreateTransferRequestPage.jsx - Transfer requests → Request state: loads details
src/components/features/request_components/RequestDetailsPage.jsx - Request state → Request API service: fetches records
src/hooks/request_hooks/useRequest.js - Request state → Filter state: uses filters
src/hooks/request_hooks/useRequest.js - Request state → Formatting helpers: builds options
src/hooks/request_hooks/useRequest.js - Route and role gate → Delivery review and receipt: routes to
src/App.jsx - Delivery review and receipt → Delivery state: loads details
src/components/features/delivery_components/DeliveryDetailsPage.jsx - Delivery review and receipt → Delivery state: confirms receipt
src/components/features/delivery_components/DeliveryConfirmationPage.jsx - Delivery state → Delivery API service: fetches records
src/hooks/delivery_hooks/useDelivery.js - Delivery state → Filter state: uses filters
src/hooks/delivery_hooks/useDelivery.js - Delivery state → Formatting helpers: builds options
src/hooks/delivery_hooks/useDelivery.js - Barcode tools → Barcode workflow: uses workflow
src/hooks/product_hooks/useBarcode.js - Barcode workflow → Barcode service: requests barcode actions
src/hooks/product_hooks/useBarcode.js - Barcode service → HTTP client: loads products
src/services/BarcodeService.js