Business modules & subscription tiers
Biashara ERP is sold as modular business capabilities, not one monolithic app. Each module maps to a boolean flag on subscription_tiers.features and controls:
- Sidebar / business modules (via
config/navigation.php+TenantWorkspaceNavigationService) - Permissions (via
config/rbac.php+ tier permission checklist) - Routes (
subscription.routesmiddleware +config/subscription_route_modules.php, plus explicitsubscription.module:on vertical groups)
Registry: config/business_modules.php
Tier UI metadata: config/tier_catalog.php
Sales & packaging (internal): docs/SUBSCRIPTION_PRICING_PLAYBOOK.md
Dashboard KPIs & cards (per tier)
Each subscription_tiers.tier_level (kiosk → enterprise) ships a default widget layout per role profile (config/dashboard_tier_defaults.php). Widget visibility is further filtered by enabled module flags (analytics, hr, crm, etc.) on the tier.
| Actor | What they can do |
|---|---|
| Owner / manage-settings | Settings → Dashboard cards — toggle cards allowed by the plan; optional workspace-wide default |
| Platform super-admin | Workspace → Dashboard defaults — set org layouts at provisioning; Re-apply tier catalogue after tier changes |
| Automation | OrganizationSubscriptionObserver on create/tier change; SubscriptionInvoiceService on first M-Pesa payment |
Resolution order: user layout → organization default → tier/module defaults → config/dashboard.php profile layout.
Core vs hospitality
| Layer | Purpose |
|---|---|
| Core workspaces | Retail/ERP baseline: Operations, Inventory, Manufacturing (standalone), Finance, CRM, HR, Reports |
| Hospitality modules | Optional verticals sold to hotels, restaurants, resorts — independent tier flags |
Manufacturing is not part of Inventory in the product model. It has its own workspace and tier flag manufacturing. Inventory remains catalog + stock + procurement only.
Pharmacy suite (chemist vertical)
| Tier flag | What customers get |
|---|---|
pharmacy_management |
Pharmacy workspace: batch/expiry stock, settings, near-expiry reports |
suite_experience: pharmacy |
Hides rental, hospitality, manufacturing from nav (chemist-only shell) |
Tier presets: chemist_kiosk, chemist_pro, chemist_enterprise in config/business_modules.php.
Docs: docs/pharmacy/PHARMACY_SUITE_MASTER_SCOPE.md
Hospitality modules (independent)
These align with the hospitality implementation phases but are sold separately:
| Tier flag | Hospitality phase | What customers get |
|---|---|---|
hospitality_accommodation |
Phase 1 | PMS: rooms, reservations, check-in/out, meal plans |
hospitality_restaurant |
Phase 2 | Tables, dining modes, restaurant POS extensions |
hospitality_guest_services |
Phase 5 | Room service, housekeeping, laundry, minibar, folio |
Kitchen / recipes (Phase 3) use the existing manufacturing module plus inventory — no duplicate “kitchen” tier flag unless you later add hospitality_kitchen for KDS-only SKUs.
Opt-in modules (default off)
Modules in tier_catalog.opt_in_modules default to disabled until explicitly enabled on a tier. This prevents new flags from turning on for every existing customer when you ship a vertical.
Current opt-in list includes: manufacturing, all hospitality_* flags, rental_management, pharmacy_management.
Configuring tiers (super-admin)
- Open Platform → Subscription tiers.
- Enable only the module checkboxes that tier should include.
- Restrict permissions to match (permissions tied to disabled modules are rejected on save).
- Use tier presets in
business_modules.tier_presetsas sales templates (café, hotel, resort).
Example packaging
- Street café: Operations + Inventory +
hospitality_restaurant(no manufacturing, no hotel). - Bakery + café: Add
manufacturingfor prep batches; restaurant module for POS. - 3-star hotel: Accommodation + Guest services + Inventory; restaurant optional.
- Chemist kiosk: Operations + Inventory +
pharmacy_management+suite_experience: pharmacy(seechemist_kioskpreset). - Chemist professional: Kiosk + CRM + reports + expenses (
chemist_pro). - Chemist enterprise: Pro + accounts + HR + integrations + analytics + advanced reports + POS credit controls (
chemist_enterprise).
Navigation structure
Operations (always for most tiers)
Inventory (catalog, stock, procurement)
Manufacturing (BOMs, production — tier: manufacturing)
Finance / CRM / HR / Reports
Hospitality (workspace appears when any hospitality_* module is on)
├─ Accommodation (tier: hospitality_accommodation) — routes when Phase 1 ships
├─ Restaurant (tier: hospitality_restaurant) — Phase 2
└─ Guest services (tier: hospitality_guest_services) — Phase 5
Nav items are hidden until routes exist and the tenant’s tier includes the module.
Implementation checklist (per module)
When building Phase 2 or Phase 5:
- Add permissions to
config/rbac.php+subscription_gated→ module key. - Add routes under
routes/web.phpwithcan:middleware. - Add nav items under
navigation.workspaces.hospitality.modules.*. - Enable module on pilot tiers in DB (or super-admin UI).
- Feature tests with
ensureOrganizationGrowthTierpattern + module flag on tier.
Do not nest hospitality-only features inside Inventory or Manufacturing workspaces unless they are truly shared (e.g. ingredient stock stays in Inventory).
Related docs
docs/hospitality/HOSPITALITY_SUITE_MASTER_SPEC.mddocs/hospitality/MANUFACTURING_PHASE3_BRIDGE.mddocs/hospitality/MANUFACTURING_PHASE4_BRIDGE.md