GitHub - kisalnelaka/intraflow: Unified Operations, Automation & Security Platform for MSPs/MSSPs · GitHub
Skip to content
kisalnelakaPublic

About

Unified Operations, Automation & Security Platform for MSPs/MSSPs

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

InfraFlow IT Edition

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.


🏗 System Architecture

This project strictly adheres to a Multi-Tenant SaaS architecture using a single-database, shared-schema approach with rigorous logical isolation.

Core Principles

  • Strict Multi-Tenancy: Every database query is scoped by tenant_id via 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.

Tech Stack

  • 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).

🛡 Multi-Tenancy Implementation ("The Swiss Cheese Model")

We strictly enforce isolation at multiple layers:

  1. ORM Layer: BelongsToTenant trait applies where('tenant_id', ...) automatically. TenantContext singleton manages the current tenant.
  2. Database Layer: Composite Unique Keys (tenant_id, email) and Indexes (tenant_id, status) prevent data collision and leakage.
  3. Test Layer: Automated "Tenant Leakage" suite guarantees isolation in CI/CD.

🚀 Getting Started

Prerequisites

  • PHP 8.3+
  • Composer
  • MySQL 8.0+
  • Redis

Installation

  1. Clone the repository.
  2. Install dependencies:
    composer install
  3. Configure .env:
    DB_CONNECTION=mysql
    DB_HOST=127.0.0.1
    DB_DATABASE=infraflow
    SESSION_DRIVER=redis
    CACHE_STORE=redis
  4. Run migrations:
    php artisan migrate
  5. Link storage:
    php artisan storage:link

🧪 Testing

We carry a dedicated suite for proving tenant isolation.

php artisan test tests/Feature/TenantIsolationTest.php

📂 Project Structure

  • app/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.

⚠️ Developer Rules

  1. Always use BelongsToTenant on new models that belong to a client/tenant.
  2. Never access TenantContext directly in views; use the helper or facade.
  3. Do not disable global scopes (withoutGlobalScope) unless writing a Super Admin system report.

socialrabbit

About

Unified Operations, Automation & Security Platform for MSPs/MSSPs

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages