> ## Documentation Index
> Fetch the complete documentation index at: https://firespark.cloud/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Architecture

> How your POS or RMS connects to Fire spark and every sales channel.

## Fire spark modules

<img src="https://mintcdn.com/firespark/YOn3mtca0qIExfP1/images/modules-diagram.webp?fit=max&auto=format&n=YOn3mtca0qIExfP1&q=85&s=33fb8d95f915bfb9278766a3e234a760" alt="Fire spark platform modules — dashboard, integrations API, omnichannel menu composition, order engine, and storefront." style={{ borderRadius: "0.5rem", width: "100%" }} width="1599" height="984" data-path="images/modules-diagram.webp" />

## Platform overview

Fire spark sits between your operational stack and every surface where customers order. Your POS or RMS stays the source of truth; Fire spark syncs menus outward and routes orders back.

```mermaid theme={null}
flowchart TB
    subgraph POS["Operational layer — source of truth"]
        POS1["Toast · Aloha · Symphony · Pixel Point"]
        POS2["Fire POS (native RMS)"]
    end

    subgraph FS["Fire spark"]
        DASH["Dashboard"]
        INT["Integrations API\n/api/integrations/v1"]
        INTEL["Omnichannel layer\nmenu composition · routing"]
        ORD["Order engine\nwebhooks · order.injected"]
    end

    subgraph OWNED["Owned channels"]
        SF["Storefront API"]
        APP["App · Web · Kiosk · Call center"]
    end

    subgraph AGG["Aggregators"]
        UE["Uber Eats · Rappi · PedidosYa"]
    end

    POS1 -->|"Menus, pricing, availability"| INT
    POS2 <-->|"Native integration"| FS
    INT --> INTEL
    INTEL --> UE
    INTEL --> SF
    SF --> APP

    UE & APP -->|"Customer order"| ORD
    ORD -->|"order.injected webhook"| INT
    INT -->|"Kitchen ticket"| POS1
    ORD --> POS2

    DASH -.-> INT
```

## Menu sync (POS → channels)

Catalog data flows from your POS or RMS into Fire spark, which composes and publishes menus to each channel.

```mermaid theme={null}
flowchart LR
    subgraph POS["POS / RMS"]
        CAT["Catalog master"]
    end

    subgraph FS["Fire spark"]
        INT["Integrations API"]
        COMPOSE["Menu composition\nchannel · store · fulfillment · schedule"]
    end

    subgraph CH["Sales channels"]
        APP["App"]
        WEB["Web"]
        UE["Uber Eats"]
        OTHER["Rappi · PedidosYa · kiosk · …"]
    end

    CAT -->|"PUT /menus\nPUT /menus/products/{id}"| INT
    INT --> COMPOSE
    COMPOSE --> APP & WEB & UE & OTHER
```

## Order flow (channels → POS)

When a customer checks out on any channel, Fire spark notifies your integration and hands off the order to your POS or RMS.

```mermaid theme={null}
sequenceDiagram
    autonumber
    participant POS as POS / RMS
    participant FS as Fire spark
    participant CH as Sales channel
    participant INT as Your integration server

    CH->>FS: Customer checkout
    FS->>INT: order.created
    FS->>INT: order.injected
    INT->>POS: Create kitchen ticket
    POS->>INT: Fulfillment progress
    INT->>FS: PATCH /orders/{id}/status
    FS->>CH: Status update
```

## Menu composition by context

Each composed menu is scoped to a store, channel, and fulfillment type. Schedules can further restrict when it is active.

```mermaid theme={null}
flowchart TB
    MASTER["POS catalog"]
    MASTER --> M1["downtown · app · delivery"]
    MASTER --> M2["downtown · uber-eats · delivery"]
    MASTER --> M3["downtown · app · pickup"]
    MASTER --> M4["airport · app · delivery"]

    M1 --> S1["Weekday lunch\n11:00–15:00"]
    M2 --> S2["Aggregator subset · all day"]
```

## Defaults and targeted overrides

Omit scope in the URL or payload to apply a menu broadly, then override only where your operation differs.

```mermaid theme={null}
flowchart TB
    BASE["PUT /menus\n(no fulfillment_id · no store_id · no channel_id · no brand_id · schedules: null)\n→ merchant-wide default · 24/7"]
    BASE --> O1["?channel_id=uber-eats"]
    BASE --> O2["?store_id=airport"]
    BASE --> O3["schedules on menu entry"]
```

| Omitted                            | Assumed                          |
| ---------------------------------- | -------------------------------- |
| `store_id` query parameter         | Any store (`__ANY__`)            |
| `channel_id` query parameter       | Any channel (`__ANY__`)          |
| `fulfillment_id` on the menu entry | Any fulfillment type (`__ANY__`) |
| `schedules: null`                  | 24 hours, every day              |

## Modifier model

Modifiers are products. Groups define the choice rules on a parent item.

```mermaid theme={null}
flowchart TB
    COMBO["Combo meal (product)"]
    COMBO --> G1["Group: Choose a drink\nmin 1 · max 1"]
    G1 --> M1["Cola (product)"]
    G1 --> M2["Sprite (product)"]
    G1 --> M3["Still water (product)"]
    COMBO --> G2["Group: Add extras\nmin 0 · max 3"]
    G2 --> M4["Extra cheese (product)"]
    G2 --> M5["Bacon (product)"]
```

## Infrastructure

<img src="https://mintcdn.com/firespark/YOn3mtca0qIExfP1/images/infra-diagram.webp?fit=max&auto=format&n=YOn3mtca0qIExfP1&q=85&s=af0ab4ea89309ae9d3e508ba28579614" alt="Fire spark cloud infrastructure — API services, databases, queues, and integrations with POS systems and sales channels." style={{ borderRadius: "0.5rem", width: "100%" }} width="1536" height="1024" data-path="images/infra-diagram.webp" />
