Skip to content

Architecture

How Streams packages fit together in a Laravel application.

Overview

A Streams application is a normal Laravel project with additional conventions. Streams does not replace Laravel routing, config, or deployment—it extends them.

flowchart TB
    subgraph git [In version control]
        StreamsJSON["streams/*.json"]
        StreamData["streams/data/"]
        LaravelConfig["config/ + .env"]
    end

    subgraph packages [Composer packages]
        Core[streams/core]
        UI[streams/ui]
        API[streams/api]
    end

    subgraph runtime [Runtime]
        Entries[Entries and repositories]
        CP[Control panel]
        REST[REST API]
    end

    StreamsJSON --> Core
    StreamData --> Core
    Core --> Entries
    Core --> UI
    Core --> API
    UI --> CP
    API --> REST

What your team commits

Path Purpose
streams/*.json Stream definitions—fields, sources, routes, UI config
streams/data/ Entry data when using filebase storage
config/streams/ Published package configuration
app/ Custom PHP when JSON is not enough

Environment-specific values stay in .env, not in stream JSON.

Streams Core

Core loads stream definitions, resolves data sources (filebase, Eloquent, collections, remote), and exposes repositories and criteria for querying entries.

Hub guide: Streams
Reference: Core documentation

Streams UI

UI builds control panels, forms, tables, and pages from stream and panel configuration. It runs on Livewire and Tailwind—familiar Laravel frontend stack.

Hub guide: UI
Reference: UI documentation

Streams API

API registers REST routes for streams you expose. Response format follows the existing Streams API envelope (see Responses).

Hub guide: API
Reference: API documentation

Composing packages

Goal Typical packages
Data layer only streams/core
Admin for your team streams/core, streams/ui
Headless + admin streams/core, streams/ui, streams/api
Faster scaffolding Add streams/sdk (dev)
CI and package tests Add streams/testing (dev)

See Use cases for concrete starting points.