12. End-to-End Sequence Diagram and Internal Call Map
12.1 Sequence diagram
12.2 Internal call map
| Public call | Controller / Action | Command or direct call | Service | DB / context touched |
|---|---|---|---|---|
GET Country/GetRegistrationList | CountryController | direct | RegistrationReferenceService | SharedDbContext.Countries |
GET Region/GetRegistrationListByCountryId | RegionController | direct | RegistrationReferenceService | SharedDbContext.Regions |
GET City/GetRegistrationListByRegionId | CityController | direct | RegistrationReferenceService | SharedDbContext.Cities |
GET Subscription/Packages/pricing | SubscriptionController | direct | pricing service | Root/SaaS DB |
POST Tenant/Registration/Register | TenantRegistrationController | RegisterNewTenantRequest → RegisterNewTenantRequestHandler | ITenantService.RegisterAsync (validated by RegisterNewTenantRequestValidator, which calls ISharedLocationService → SharedLocationService → SharedDbContext) | Root/SaaS DB (Tenant, SubscriptionPlanPackage link, demo subscription) |
POST Tenants/Verification | TenantsController | direct | TenantService.VerifyAsync | Root/SaaS DB (Tenant.IsVerified) |
POST Tokens/Create | TokensController | direct | TokenService.GetTokenAsync (inline provisioning fallback → DatabaseInitializer/ApplicationDbSeeder) | Root DB (auth) + Tenant application DB (provisioning) |
GET/POST onboarding/* | OnboardingController | direct | OnboardingService (ISettingsGroupEntitlementService, IOnboardingRecommendationService, IOnboardingTenantSettingsApplier → internal HTTP bridge → OnboardingInternalController → IInternalOnboardingSettingsPatchService) | Tenant application DB (TenantOnboardingSession, TenantOnboardingApplyLog, AppSettings) |
POST Saas/TenantStarterKits/Preview / Apply | TenantStarterKitsController (root-admin only) | PreviewTenantStarterKitRequest / ApplyTenantStarterKitRequest | TenantStarterKitService → 4 independent apply services, each via their own internal bridge | Tenant application DB (accounts, inventory categories, cost centers, product catalog) — not part of the self-service journey, see Chapter 11 |
12.3 Process topology
Both the public signup/onboarding endpoints and every internal bridge endpoint
(api/internal/onboarding/apply-settings-patch, and the equivalent accounting/inventory/cost-center/
product-catalog internal endpoints) are hosted inside the same Shumoul.Api process. The "bridge" is
a loopback HTTP call the process makes to itself (https://localhost:5001 in dev,
https://api.shumoul.com in production) — there is no separate internal-only deployable. This is why
enabling the bridge for a dev test only requires environment variables on the one already-running
process, not a second service.
