How abbasmuazam6-create/suitflow-api works
SuitFlow is a multi-business backend for suit businesses that trade or manufacture, with a separate platform-admin dashboard. The main workflow is a mobile/API request entering a versioned route, passing through tenant and feature controls, and reaching domain services for business operations such as production and stock. Platform administrators manage businesses and their users through web controllers. The graph preserves documented sales, purchasing, accounts, and reporting capabilities, but their exact service-to-service flows are not shown in the supplied excerpts; those relationships are therefore omitted. Some broader links rely on the SOURCE INDEX or README rather than inspected implementation.
Main entry points: modules.php API routes · StockService.php Stock management · ProductionService.php Production workflow · BusinessController.php Business dashboard
Components 24
Request entry
- API routes
routes/api/modules.php - Web routes
routes/web.php
Tenant and access
- Tenant context
app/Support/Tenancy/TenantContext.php - Tenant scoping
app/Models/Concerns/BelongsToBusiness.php - Feature controls
app/Support/Features.php - Permissions
app/Support/Access/Permissions.php - Authentication
app/Services/AuthService.php - User API
app/Http/Controllers/Api/V1/UserController.php - User identity
app/Models/User.php - Business tenant
app/Models/Business.php
Business operations
- Production API
app/Http/Controllers/Api/V1/ProductionBatchController.php - Production workflow
app/Services/ProductionService.php - Stock API
app/Http/Controllers/Api/V1/StockItemController.php - Stock management
app/Services/StockService.php - Sales and purchasing
app/Http/Controllers/Api/V1 - Accounts and reports
app/Http/Controllers/Api/V1
Platform administration
- Business API
app/Http/Controllers/Api/V1/Admin/BusinessController.php - Business dashboard
app/Http/Controllers/Platform/BusinessController.php - Platform user admin
app/Http/Controllers/Platform/UserController.php - Business service
app/Services/BusinessService.php - Platform user service
app/Services/PlatformUserService.php
Other components
- Mobile app
- Platform admin
- MySQL
Connections 24
- Mobile app → API routes: calls API
README.md - API routes → Production API: routes to
routes/api/modules.php - API routes → Stock API: routes to
routes/api/modules.php - API routes → Sales and purchasing: routes to
routes/api/modules.php - API routes → Accounts and reports: routes to
routes/api/modules.php - Production API → Production workflow: delegates to
app/Http/Controllers/Api/V1/ProductionBatchController.php - Stock API → Stock management: delegates to
app/Http/Controllers/Api/V1/StockItemController.php - Production workflow → Stock management: updates stock
app/Services/ProductionService.php - Production workflow → Tenant scoping: uses tenant models
- Stock management → Tenant scoping: uses tenant models
- Stock management → Feature controls: checks options
app/Services/StockService.php - Stock management → MySQL: reads and writes
- Production workflow → MySQL: reads and writes
- Tenant context → Business tenant: loads tenant
app/Support/Tenancy/TenantContext.php - Tenant context → Feature controls: checks options
app/Support/Tenancy/TenantContext.php - Authentication → User identity: finds user
app/Services/AuthService.php - Web routes → Business dashboard: routes to
routes/web.php - Web routes → Platform user admin: routes to
routes/web.php - Platform admin → Web routes: uses dashboard
- Business dashboard → Business service: delegates to
app/Http/Controllers/Platform/BusinessController.php - Platform user admin → Platform user service: delegates to
app/Http/Controllers/Platform/UserController.php - Business service → Business tenant: manages
app/Services/BusinessService.php - Platform user service → User identity: manages
app/Http/Controllers/Platform/UserController.php - Business dashboard → MySQL: reads and writes