Unified Operations, Automation & Security Platform for MSPs/MSSPs
InfraFlow IT Edition is a production-grade, multi-tenant SaaS platform designed to centralize client management, workflow automation, and security posture monitoring for Managed Service Providers.
This project strictly adheres to a Multi-Tenant SaaS architecture using a single-database, shared-schema approach with rigorous logical isolation.
- Strict Multi-Tenancy: Every database query is scoped by
tenant_idvia Global Scopes. No data leaks allowed. - Security First: Integrated RBAC, Audit Logging, and OWASP ZAP security scanning.
- Event-Driven: Workflow engine driven by state machines and asynchronous queues.
- Backend: PHP 8.3, Laravel 11
- Database: MySQL 8.0+ (Tenant-aware indexing)
- Queue/Cache: Redis
- Admin UI: FilamentPHP
- Microservices: Python (FastAPI) for external tool orchestration (ZAP, SSH).
We strictly enforce isolation at multiple layers:
- ORM Layer:
BelongsToTenanttrait applieswhere('tenant_id', ...)automatically.TenantContextsingleton manages the current tenant. - Database Layer: Composite Unique Keys (
tenant_id,email) and Indexes (tenant_id,status) prevent data collision and leakage. - Test Layer: Automated "Tenant Leakage" suite guarantees isolation in CI/CD.
- PHP 8.3+
- Composer
- MySQL 8.0+
- Redis
- Clone the repository.
- Install dependencies:
composer install
- Configure
.env:DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_DATABASE=infraflow SESSION_DRIVER=redis CACHE_STORE=redis
- Run migrations:
php artisan migrate
- Link storage:
php artisan storage:link
We carry a dedicated suite for proving tenant isolation.
php artisan test tests/Feature/TenantIsolationTest.phpapp/Services/TenantContext.php: The heart of tenant resolution.app/Scopes/TenantScope.php: The enforcer of database isolation.app/Traits/BelongsToTenant.php: The trait to add to all tenant-owned models.
- Always use
BelongsToTenanton new models that belong to a client/tenant. - Never access
TenantContextdirectly in views; use the helper or facade. - Do not disable global scopes (
withoutGlobalScope) unless writing a Super Admin system report.
socialrabbit
