How abedalroufahmad-ctrl/bookstore works
Bookstore is a multi-client storefront and back-office system: customers browse and order books, while staff administer catalog, warehouses, orders, and point-of-sale workflows. The Laravel API is the shared backend; the React app exposes customer and admin routes, and the README identifies a Flutter client whose Dart runtime files are not present in the supplied tree. The sampled sources show routing and payment handling, but not most page-to-endpoint calls, so those links are omitted rather than inferred.
Main entry points: PayPalController.php Payment Workflow · App.tsx Web Router · api.php API Routes · Book.php Book Catalog
Components 24
Client Applications
- Web Router
web/src/App.tsx - Store and Admin Pages
web/src/route-pages.tsx - Web Authentication
web/src/contexts/AuthContext.tsx - Web API Client
web/src/lib/api.ts - Flutter Client
app
API and Workflows
- API Routes
api/routes/api.php - API Response Base
api/app/Http/Controllers/Api/BaseApiController.php - Catalog Administration
api/app/Http/Controllers/Api/Admin/BookController.php - Employee Administration
api/app/Http/Controllers/Api/Admin/EmployeeController.php - Payment Workflow
api/app/Http/Controllers/Api/PayPalController.php - Order Processing
api/app/Services/OrderService.php
Catalog and Operations
- Catalog Services
api/app/Infrastructure/Services/BookService.php - Stock Management
api/app/Infrastructure/Services/StockService.php - Point of Sale
api/app/Http/Controllers/Api/Admin/PosController.php - Publisher Payouts
api/app/Services/PublisherPayoutService.php
Persistence and Payments
- Book Catalog
api/app/Models/Book.php - Authors
api/app/Models/Author.php - Publishers
api/app/Models/Publisher.php - Warehouses
api/app/Models/Warehouse.php - Orders
api/app/Models/Order.php - PayPal Gateway
api/app/Services/PayPalService.php - Payment Records
api/app/Models/Payment.php
Other components
- Customer
- Staff
Connections 23
- Customer → Web Router: uses storefront
README.md - Staff → Web Router: uses admin
web/src/App.tsx - Web Router → Store and Admin Pages: routes to
web/src/App.tsx - Web Router → Web Authentication: provides auth
web/src/App.tsx - Store and Admin Pages → Web API Client: uses API
- Flutter Client → API Routes: calls API
- Web Router → API Routes: proxies requests
README.md - API Routes → Catalog Administration: routes catalog
api/routes/api.php - API Routes → Employee Administration: routes staff
api/routes/api.php - API Routes → Payment Workflow: routes payments
api/routes/api.php - Catalog Administration → Catalog Services: uses service
api/app/Http/Controllers/Api/Admin/BookController.php - Catalog Administration → Book Catalog: reads and writes
api/app/Http/Controllers/Api/Admin/BookController.php - Employee Administration → Warehouses: checks scope
api/app/Http/Controllers/Api/Admin/EmployeeController.php - Book Catalog → Authors: relates authors
api/app/Models/Book.php - Book Catalog → Warehouses: belongs to
api/app/Models/Book.php - Book Catalog → Publishers: relates publishers
api/app/Models/Book.php - Payment Workflow → PayPal Gateway: creates and captures
api/app/Http/Controllers/Api/PayPalController.php - Payment Workflow → Order Processing: marks paid
api/app/Http/Controllers/Api/PayPalController.php - Payment Workflow → Orders: loads orders
api/app/Http/Controllers/Api/PayPalController.php - Payment Workflow → Payment Records: records payment
api/app/Http/Controllers/Api/PayPalController.php - Point of Sale → Order Processing: creates orders
- Order Processing → Stock Management: reserves stock
- Publisher Payouts → Publishers: updates payouts