Docs/Architecture

Architecture Overview

Understanding AutoCom's modular, plugin-based architecture.

Design Philosophy

AutoCom follows a plugin-based design similar to WordPress plugins. The core system is minimal and extensible, with all integrations implemented as self-contained modules.

  • Tenants enable only the modules they need
  • Modules can be installed/uninstalled without affecting core
  • Event-driven communication between core and modules
  • New integrations added without touching core code

Tech Stack

Backend

  • Laravel 11 + PHP 8.3
  • PostgreSQL (database-per-tenant)
  • Redis + Laravel Horizon
  • Laravel Reverb (WebSockets)

Frontend

  • Next.js 14 (App Router)
  • TypeScript
  • Tailwind CSS
  • React Query

Key Packages

  • stancl/tenancy (multi-tenancy)
  • nwidart/laravel-modules
  • spatie/permission (RBAC)
  • Laravel Passport (OAuth)

Infrastructure

  • Docker (Laravel Sail)
  • Scramble (API Docs)
  • Pest (Testing)
  • Laravel Pint (Code Style)

Module Types

TypeAvailable ModulesContract
StoreShopify, WooCommerce, ManualStoreProviderContract
ShippingDelhivery, Shiprocket, BlueDartShippingProviderContract
ChannelWhatsApp, SMS, Email, VoiceChannelProviderContract
PaymentRazorpay, Cashfree, PayUPaymentProviderContract
AIOpenAI, Claude, CustomAIProviderContract

Directory Structure

autocom/
├── backend/                    # Laravel API
│   ├── app/
│   │   ├── Models/
│   │   ├── Http/Controllers/
│   │   └── Providers/
│   ├── config/
│   ├── database/migrations/
│   └── routes/
│
├── frontend/                   # Next.js App
│   ├── app/
│   ├── components/
│   └── lib/
│
├── docs/                       # Documentation (this site)
│
└── modules/                    # Plugin Modules
    ├── Core/                   # Shared models & contracts
    │   └── backend/
    ├── Products/
    │   ├── backend/            # Laravel code
    │   └── frontend/           # React code
    ├── Customers/
    ├── Orders/
    ├── StoreShopify/
    ├── ShippingDelhivery/
    └── ChannelWhatsApp/

Data Flow

Store Module
Core Order
Shipping Module
Channel Module

Orders flow from store integrations → core processing → shipping → customer notifications

Multi-Tenancy

AutoCom uses database-per-tenant isolation for complete data separation:

  • Landlord Database: Stores tenant records, billing, available modules
  • Tenant Databases: Each tenant gets their own PostgreSQL database
  • Identification: Via subdomain (acme.autocom.com) or X-Tenant header