Skip to content

Expensis Automation Documentation

Documentation Status: 100% Complete & Verified

  • 260 components fully documented
  • 24/24 verification tests passing (100%)
  • 0 failures, 0 warnings
  • Extremely high confidence

Overview

This documentation provides complete coverage of all automation in the Expensis billing platform, including:

  • 40 MessageBus Commands (39 concrete + 1 abstract)
  • 36 MessageBus Handlers
  • 115 Console Commands
  • 45 Dispatch Locations
  • 10 Event System Components
  • 18 Active Cron Jobs
  • 10 Complete Workflow Traces

Quick Navigation

  • Components


    Commands, handlers, events, and dispatch points

    View Components

  • Dependencies & Architecture


    System relationships and critical paths

    View Dependencies

  • :material-workflow:{ .lg .middle } Workflows


    Complete execution traces with visual diagrams

    View Workflows

  • Reference & Troubleshooting


    Indexes, glossary, debugging guides, and FAQs

    View Reference


Critical System Components

Single Points of Failure

These components are critical - if they fail, automation stops:

  1. MessageConsumedHandler - Enables ALL command chaining

    • Location: src/MessageBus/MessageConsumedHandler.php
    • Impact: Complete automation breakdown if it fails
  2. SyncProfileHandler - Master router for all provider syncs

    • Location: src/MessageBus/AsynchronousHandler/SyncProfileHandler.php
    • Impact: All automated syncs stop
  3. sync:manager - Master cron orchestrator

    • Frequency: Every 5 minutes (*/5 * * * *)
    • Impact: No automated syncs execute

System Architecture

graph TB
    subgraph "Entry Points"
        CRON[Cron Jobs<br/>18 active]
        WEB[Web Controllers<br/>8 dispatch points]
        API[API Services<br/>5 dispatch points]
        CMD[Console Commands<br/>115 commands]
    end

    subgraph "MessageBus Layer"
        BUS[Message Bus<br/>40 Commands]
        HANDLERS[Handlers<br/>36 total]
    end

    subgraph "Event System"
        EVENT[MessageConsumedHandler<br/>Chain Executor]
    end

    CRON --> CMD
    CMD --> BUS
    WEB --> BUS
    API --> BUS
    BUS --> HANDLERS
    HANDLERS --> EVENT
    EVENT --> BUS

    style CRON fill:#e1f5ff
    style WEB fill:#e1f5ff
    style API fill:#e1f5ff
    style CMD fill:#e1f5ff
    style BUS fill:#fff3e0
    style HANDLERS fill:#fff3e0
    style EVENT fill:#ffebee

Getting Started

New to the system? Start here:

  1. Overview - Understand the big picture
  2. Key Concepts - Learn core concepts
  3. System Architecture - See how it all fits together
  4. Quick Start Guide - Find what you need fast

Common Tasks

Browse all commands by category:

See complete execution flows:

Troubleshooting guides:

See how components relate:


Documentation Statistics

Metric Value
Total Components 260
Verification Pass Rate 100% (24/24)
Coverage 100%
Confidence Level Extremely High
Last Updated December 15, 2025

For Developers

Quick Links


Need Help?

Can't find what you're looking for? Try:

  1. Use the search bar at the top (press / to focus)
  2. Check the FAQ
  3. Browse the Command Index
  4. Review Troubleshooting

Documentation Quality

This documentation is 100% verified against the actual codebase with automated tests. All 24 verification tests pass with 0 failures and 0 warnings.