How nabilalsaidaly/pharma works
Sumaya Pharma is a Laravel modular-monolith backend. A customer-facing API serves public catalog reads and customer sessions, then supports personal collections and preliminary checkout; Google OAuth supplies customer identity. The README also documents catalog filtering, pagination, image metadata, and session/CSRF protections. The graph preserves those product areas while omitting management and purchasing capabilities documented as deferred. Some application and persistence implementations were not sampled, so unverified internal calls are left out.
Main entry points: api.php API routes · PublicCatalogController.php Catalog API · GoogleAuthenticationController.php Google sign-in · CartController.php Cart API
Components 24
Customer identity
- Google sign-in
app/Domains/Identity/Interfaces/Http/Controllers/GoogleAuthenticationController.php - OAuth adapter
app/Domains/Identity/Infrastructure/ExternalServices/Google/SocialiteGoogleOAuthClient.php - Customer authentication
app/Domains/Identity/Application/Actions/AuthenticateGoogleCustomer.php - Customer identity store
app/Domains/Identity/Infrastructure/Persistence/EloquentCustomerIdentityRepository.php - Customer records
app/Domains/Identity/Infrastructure/Persistence/Models/Customer.php
Public catalog
- Catalog API
app/Domains/Catalog/Interfaces/Http/Controllers/PublicCatalogController.php - Public catalog reader
app/Domains/Catalog/Infrastructure/Persistence/Queries/EloquentPublicCatalogReader.php - Catalog records
app/Domains/Catalog/Infrastructure/Persistence/Models/Product.php - Product response
app/Domains/Catalog/Interfaces/Http/Resources/ProductResource.php
Personal collections
- Cart API
app/Domains/Cart/Interfaces/Http/Controllers/CartController.php - Cart operations
app/Domains/Cart/Application/CartOperations.php - Cart snapshot
app/Domains/Cart/Application/CartSnapshot.php - Cart records
app/Domains/Cart/Infrastructure/Persistence/Models/Cart.php - Favorites API
app/Domains/Favorites/Interfaces/Http/Controllers/FavoriteController.php - Favorite operations
app/Domains/Favorites/Application/FavoriteOperations.php
Preliminary checkout
- Checkout evaluation API
app/Domains/Orders/Interfaces/Http/Controllers/CheckoutEvaluationController.php - Checkout evaluation
app/Domains/Orders/Application/EvaluateCheckout.php - Preliminary request API
app/Domains/Orders/Interfaces/Http/Controllers/PreliminaryRequestController.php - Submit preliminary request
app/Domains/Orders/Application/SubmitPreliminaryCheckoutRequest.php - Request history
app/Domains/Orders/Application/PreliminaryRequestHistory.php - Checkout intent records
app/Domains/Orders/Infrastructure/Persistence/Models/CheckoutIntent.php
Other components
- Customer
- API routes
routes/api.php - Google OAuth
Connections 25
- Customer → API routes: requests API
routes/api.php - API routes → Google sign-in: routes to
routes/api.php - API routes → Catalog API: routes to
routes/api.php - API routes → Cart API: routes to
routes/api.php - API routes → Favorites API: routes to
routes/api.php - API routes → Checkout evaluation API: routes to
routes/api.php - API routes → Preliminary request API: routes to
routes/api.php - Google sign-in → OAuth adapter: requests identity
app/Domains/Identity/Interfaces/Http/Controllers/GoogleAuthenticationController.php - OAuth adapter → Google OAuth: authenticates with
app/Domains/Identity/Infrastructure/ExternalServices/Google/SocialiteGoogleOAuthClient.php - Google sign-in → Customer authentication: authenticates customer
app/Domains/Identity/Interfaces/Http/Controllers/GoogleAuthenticationController.php - API routes → Catalog API: routes to
routes/api.php - Catalog API → Public catalog reader: reads catalog
app/Domains/Catalog/Interfaces/Http/Controllers/PublicCatalogController.php - Catalog API → Product response: formats products
app/Domains/Catalog/Interfaces/Http/Controllers/PublicCatalogController.php - Cart API → Cart operations: changes cart
app/Domains/Cart/Interfaces/Http/Controllers/CartController.php - Cart API → Cart snapshot: reads snapshot
app/Domains/Cart/Interfaces/Http/Controllers/CartController.php - Favorites API → Favorite operations: manages favorites
app/Domains/Favorites/Interfaces/Http/Controllers/FavoriteController.php - Favorites API → Product response: formats products
app/Domains/Favorites/Interfaces/Http/Controllers/FavoriteController.php - Checkout evaluation API → Checkout evaluation: evaluates checkout
app/Domains/Orders/Interfaces/Http/Controllers/CheckoutEvaluationController.php - Preliminary request API → Submit preliminary request: submits request
app/Domains/Orders/Interfaces/Http/Controllers/PreliminaryRequestController.php - Preliminary request API → Request history: reads history
app/Domains/Orders/Interfaces/Http/Controllers/PreliminaryRequestController.php - Public catalog reader → Catalog records: queries records
- Cart operations → Cart records: persists cart
app/Domains/Cart/Application/CartOperations.php - Cart snapshot → Cart records: reads cart
- Submit preliminary request → Checkout intent records: persists intent
app/Domains/Orders/Application/SubmitPreliminaryCheckoutRequest.php - Request history → Checkout intent records: reads intents