How abdlrhman77/princess works
Princess is a Saudi abaya e-commerce application: a React storefront and role-gated admin SPA backed by a Laravel REST API and MySQL. Customers browse products, manage a cart, submit shipping and payment details, and receive an order; accounts support phone verification and order history. Admins manage products, orders, shipping and settings. The sampled checkout and payment code confirms cart-to-order creation and Moyasar payment handling. Several frontend/backend links and unsampled capabilities are documented but lack excerpts showing their precise calls, so those links are marked unverified.
Main entry points: api.php API routing · App.tsx App routing · CheckoutController.php Checkout · Order.php Order records
Components 26
React application
- App routing
frontend/src/App.tsx - Storefront
frontend/src/pages/Shop.tsx - Cart and checkout
frontend/src/pages/Checkout.tsx - Account journeys
frontend/src/pages/Account.tsx - Admin dashboard
frontend/src/pages/admin/ProductEdit.tsx - Frontend API clients
frontend/src/features/checkout/api.ts
Store and orders API
- API routing
backend/routes/api.php - Product catalog
backend/app/Http/Controllers/Api/ProductController.php - Cart operations
backend/app/Http/Controllers/Api/CartController.php - Cart resolution
backend/app/Http/Controllers/Concerns/ResolvesCart.php - Checkout
backend/app/Http/Controllers/Api/CheckoutController.php - Order records
backend/app/Models/Order.php - Customer orders
backend/app/Http/Controllers/Api/AccountOrderController.php
Accounts and payments
- Authentication
backend/app/Http/Controllers/Api/AuthController.php - Phone verification
backend/app/Http/Controllers/Api/OtpController.php - OTP and token helpers
backend/app/Http/Controllers/Concerns/GeneratesOtp.php - Moyasar payments
backend/app/Http/Controllers/Api/Payments/MoyasarController.php
Administration API
- Product management
backend/app/Http/Controllers/Api/Admin/ProductController.php - Order management
backend/app/Http/Controllers/Api/Admin/OrderController.php - Dashboard metrics
backend/app/Http/Controllers/Api/Admin/DashboardController.php - Shipping zones
backend/app/Http/Controllers/Api/Admin/ShippingZoneController.php - Store settings
backend/app/Http/Controllers/Api/Admin/SettingController.php - Image uploads
backend/app/Http/Controllers/Api/Admin/UploadController.php
Other components
- Shopper
- Administrator
- Moyasar
Connections 34
- Shopper → App routing: uses
- Administrator → App routing: uses
- App routing → Storefront: routes to
frontend/src/App.tsx - App routing → Cart and checkout: routes to
frontend/src/App.tsx - App routing → Account journeys: routes to
frontend/src/App.tsx - App routing → Admin dashboard: routes to
frontend/src/App.tsx - Cart and checkout → Frontend API clients: uses
frontend/src/pages/Checkout.tsx - Frontend API clients → API routing: requests
- Admin dashboard → API routing: requests
- API routing → Product catalog: routes to
backend/routes/api.php - API routing → Cart operations: routes to
backend/routes/api.php - API routing → Checkout: routes to
backend/routes/api.php - API routing → Customer orders: routes to
backend/routes/api.php - API routing → Authentication: routes to
backend/routes/api.php - API routing → Phone verification: routes to
backend/routes/api.php - API routing → Moyasar payments: routes to
backend/routes/api.php - API routing → Product management: routes to
backend/routes/api.php - API routing → Order management: routes to
backend/routes/api.php - API routing → Dashboard metrics: routes to
backend/routes/api.php - API routing → Shipping zones: routes to
backend/routes/api.php - API routing → Store settings: routes to
backend/routes/api.php - API routing → Image uploads: routes to
backend/routes/api.php - Cart operations → Cart resolution: resolves cart
backend/app/Http/Controllers/Api/CartController.php - Checkout → Cart resolution: resolves cart
backend/app/Http/Controllers/Api/CheckoutController.php - Checkout → Order records: creates order
backend/app/Http/Controllers/Api/CheckoutController.php - Customer orders → Order records: reads orders
backend/app/Http/Controllers/Api/AccountOrderController.php - Authentication → OTP and token helpers: uses helpers
backend/app/Http/Controllers/Api/AuthController.php - Phone verification → OTP and token helpers: uses helpers
backend/app/Http/Controllers/Api/OtpController.php - Moyasar payments → Order records: updates payment
backend/app/Http/Controllers/Api/Payments/MoyasarController.php - Moyasar payments → Moyasar: verifies payment
backend/app/Http/Controllers/Api/Payments/MoyasarController.php - Order management → Order records: updates orders
backend/app/Http/Controllers/Api/Admin/OrderController.php - Storefront → Product catalog: fetches catalog
- Account journeys → Customer orders: fetches orders
- Cart and checkout → Checkout: submits checkout