How karim-galal/fullstack_ecommerce_starter works
This is a localized ecommerce storefront and administration system, with a Next.js frontend and Laravel API. The principal purchase workflow is cart contents through checkout calculation, order/payment creation, and gateway initiation; the API also supports catalog management, customer accounts, reviews, promotions, and other commerce operations. The excerpts show checkout and authentication internals, while the API route file documents controller dispatch. Payment processing beyond initiation and most frontend-to-API wiring were not sampled, so those links are omitted.
Main entry points: api.php API routes · CheckoutController.php Checkout · AuthController.php Authentication · Cart.php Cart state
Components 23
Storefront
- Storefront UI
frontend/src/app/[locale]/(storefront)/page.jsx - Customer auth
frontend/src/app/[locale]/(customer-auth)/login/page.jsx - Admin login
frontend/src/app/[locale]/admin/(auth)/login/page.jsx
Accounts
- Authentication
backend/app/Http/Controllers/Api/AuthController.php - Cart merge
backend/app/Services/CartMergeService.php - User accounts
backend/app/Models/User.php
Commerce
- Product catalog
backend/app/Models/Product.php - Cart API
backend/app/Http/Controllers/Api/CartController.php - Cart state
backend/app/Models/Cart.php - Checkout
backend/app/Http/Controllers/Api/CheckoutController.php - Orders
backend/app/Models/Order.php - Payment initiation
backend/app/Services/Payments/PaymentInitiationService.php - Payment records
backend/app/Models/Payment.php - Gateway manager
backend/app/Services/Payments/PaymentGatewayManager.php - Payment gateways
backend/app/Services/Payments/Gateways
Commerce operations
- Reviews
backend/app/Http/Controllers/Api/ReviewController.php - Review records
backend/app/Models/Review.php - Coupons and offers
backend/app/Models/Coupon.php - Invitations
backend/app/Http/Controllers/Api/InvitationController.php - Addresses
backend/app/Http/Controllers/Api/AddressController.php - Catalog APIs
backend/app/Http/Controllers/Api/ProductController.php
Other components
- Shopper
- API routes
backend/routes/api.php
Connections 25
- Shopper → Storefront UI: browses
- Shopper → Customer auth: signs in
- Storefront UI → API routes: requests
- Customer auth → API routes: requests
- Admin login → API routes: requests
- API routes → Authentication: dispatches
backend/routes/api.php - API routes → Cart API: dispatches
backend/routes/api.php - API routes → Checkout: dispatches
backend/routes/api.php - API routes → Reviews: dispatches
backend/routes/api.php - API routes → Invitations: dispatches
backend/routes/api.php - API routes → Addresses: dispatches
backend/routes/api.php - API routes → Catalog APIs: dispatches
backend/routes/api.php - Authentication → User accounts: creates accounts
backend/app/Http/Controllers/Api/AuthController.php - Authentication → Cart merge: merges guest cart
backend/app/Http/Controllers/Api/AuthController.php - Cart merge → Cart state: merges items
backend/app/Services/CartMergeService.php - Cart API → Cart state: manages cart
backend/app/Http/Controllers/Api/CartController.php - Checkout → Cart state: reads cart
backend/app/Http/Controllers/Api/CheckoutController.php - Checkout → Product catalog: prices products
backend/app/Http/Controllers/Api/CheckoutController.php - Checkout → Coupons and offers: applies discounts
backend/app/Http/Controllers/Api/CheckoutController.php - Checkout → Orders: creates order
backend/app/Http/Controllers/Api/CheckoutController.php - Checkout → Payment records: creates payment
backend/app/Http/Controllers/Api/CheckoutController.php - Checkout → Payment initiation: initiates payment
backend/app/Http/Controllers/Api/CheckoutController.php - Payment initiation → Gateway manager: selects gateway
- Gateway manager → Payment gateways: manages gateways
backend/app/Services/Payments/PaymentGatewayManager.php - Reviews → Review records: manages reviews
backend/app/Http/Controllers/Api/ReviewController.php