How mystic0l/bloomin-fe works
Business Digitalizer is a two-sided platform for small shops: shopkeepers establish a storefront, maintain products and handle incoming orders, while customers discover shops, build a cart, place pickup or delivery orders and track them. The frontend’s pages use shared Zustand state; an Express API exposes shop, product and order operations backed by PostgreSQL. The README documents capabilities such as variants, QR access, payment preferences and bilingual support. Some frontend-to-API wiring is not visible in the excerpts, so those links are marked unverified.
Main entry points: orderRoutes.js Order endpoints · Auth.tsx Authentication · Dashboard.tsx Order dashboard · db.js PostgreSQL pool
Components 27
Customer shopping
- Shop discovery
src/pages/customer/ShopList.tsx - Shop storefront
src/pages/customer/ShopView.tsx - Shopping cart
src/pages/customer/Cart.tsx - Order checkout
src/pages/customer/Checkout.tsx - Order history
src/pages/customer/Orders.tsx
Shopkeeper operations
- Shop setup
src/pages/shopkeeper/ShopSetup.tsx - Product management
src/pages/shopkeeper/ProductManagement.tsx - Order dashboard
src/pages/shopkeeper/Dashboard.tsx - QR generation
src/utils/qrcode.ts - Notifications
src/utils/notifications.ts
Frontend foundation
- Authentication
src/pages/Auth.tsx - Firebase Auth
src/lib/firebase.ts - Home page
src/pages/Home.tsx - App layout
src/components/Layout.tsx - Role guard
src/components/ProtectedRoute.tsx - App state
src/store/index.ts - Translations
src/i18n/translations.ts - Language hook
src/hooks/useTranslation.ts - User profiles
src/utils/userStorage.ts
API and persistence
- Express API
backend/server.js - Shop endpoints
backend/routes/shopRoutes.js - Product endpoints
backend/routes/productRoutes.js - Order endpoints
backend/routes/orderRoutes.js - PostgreSQL pool
backend/config/db.js - PostgreSQL
Other components
- Customer
- Shopkeeper
Connections 33
- Customer → Authentication: signs in
README.md - Shopkeeper → Authentication: signs in
README.md - Authentication → Firebase Auth: authenticates
src/pages/Auth.tsx - Authentication → User profiles: loads and saves
src/pages/Auth.tsx - Authentication → App state: sets role
src/pages/Auth.tsx - Customer → Shop discovery: browses
README.md - Shop discovery → Shop storefront: opens shop
README.md - Shop storefront → Shopping cart: adds products
README.md - Shopping cart → Order checkout: starts checkout
README.md - Order checkout → Order endpoints: places order
- Order endpoints → PostgreSQL: writes order items
backend/routes/orderRoutes.js - Customer → Order history: tracks orders
README.md - Order history → Order endpoints: reads orders
- Shopkeeper → Shop setup: sets up shop
README.md - Shop setup → Shop endpoints: creates shop
- Shopkeeper → Product management: manages products
README.md - Product management → Product endpoints: manages products
- Shopkeeper → Order dashboard: manages orders
README.md - Order dashboard → Order endpoints: updates status
- Order dashboard → QR generation: generates QR
src/pages/shopkeeper/Dashboard.tsx - Order dashboard → Notifications: uses notifications
src/pages/shopkeeper/Dashboard.tsx - Home page → Language hook: translates text
src/pages/Home.tsx - Language hook → App state: reads language
src/hooks/useTranslation.ts - Language hook → Translations: looks up strings
src/hooks/useTranslation.ts - App layout → App state: reads and updates
src/components/Layout.tsx - Role guard → App state: checks role
src/components/ProtectedRoute.tsx - Express API → Shop endpoints: routes requests
backend/server.js - Express API → Product endpoints: routes requests
backend/server.js - Express API → Order endpoints: routes requests
backend/server.js - Shop endpoints → PostgreSQL pool: queries
backend/routes/shopRoutes.js - Product endpoints → PostgreSQL pool: queries
backend/routes/productRoutes.js - Order endpoints → PostgreSQL pool: queries
backend/routes/orderRoutes.js - PostgreSQL pool → PostgreSQL: connects
backend/config/db.js