Skip to content

tower/tower-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌎 Orbita Supply Co. - Data Platform

A comprehensive collection of realistic, runnable Tower apps demonstrating data engineering, analytics, and AI workflows for a fictional retail and logistics company.

About Orbita Supply Co.

Orbita Supply Co. is a mid-size omnichannel retail company with:

  • Global e-commerce storefront
  • 150+ physical stores worldwide
  • Multiple warehouses with IoT sensor networks
  • Extensive supply chain and logistics operations
  • Customer support handling thousands of tickets daily

The company is modernizing its data platform using:

  • Tower for app orchestration and workflows
  • Apache Iceberg for data lakehouse storage
  • dltHub for data ingestion
  • dbt/SQLMesh for transformations
  • Marimo for interactive notebooks and dashboards
  • LLMs for AI-powered automation

Repository Structure

tower-demo/
β”œβ”€β”€ lib/                          # Shared library code
β”‚   β”œβ”€β”€ iceberg_utils.py          # Iceberg I/O helpers (uses Tower tables API)
β”‚   β”œβ”€β”€ dlt_utils.py              # dltHub ingestion helpers
β”‚   β”œβ”€β”€ orbita_common.py          # Orbita constants and utilities
β”‚   └── notifications.py          # Slack/email notifications
β”‚
β”œβ”€β”€ Ingestion Apps (5)
β”‚   β”œβ”€β”€ ingest_shopify_orders/
β”‚   β”œβ”€β”€ ingest_inventory_snapshots/
β”‚   β”œβ”€β”€ ingest_warehouse_telemetry/
β”‚   β”œβ”€β”€ ingest_product_catalog/
β”‚   └── ingest_returns_rma/
β”‚
β”œβ”€β”€ Transformation Apps (4)
β”‚   β”œβ”€β”€ run_dbt_models/
β”‚   β”œβ”€β”€ daily_inventory_ledger/
β”‚   β”œβ”€β”€ customer_360/
β”‚   └── product_performance_models/
β”‚
β”œβ”€β”€ Analytics/Dashboard Apps (4)
β”‚   β”œβ”€β”€ sales_dashboard/          # Marimo notebook
β”‚   β”œβ”€β”€ inventory_heatmap/        # Marimo notebook
β”‚   β”œβ”€β”€ order_funnel_analysis/    # Marimo notebook
β”‚   └── returns_quality_insights/ # Marimo notebook
β”‚
β”œβ”€β”€ Orchestration Pipelines (2)
β”‚   β”œβ”€β”€ daily_retail_pipeline/
β”‚   └── warehouse_anomaly_pipeline/
β”‚
└──  Data Generation (1)
    └── regenerate_demo_data/      # Generates sample data daily

Quick Start

Prerequisites

  • Latest Tower CLI installed (Installation guide)
  • Python 3.10+
  • uv for dependency management

Running Locally

# Pick an app to run
cd ingest_shopify_orders

# Install dependencies
uv sync

# Run locally
tower run --local

Note: Iceberg catalog configuration is managed through Tower environments. The lib/iceberg_utils helper uses Tower's tables() API which automatically loads catalogs defined in your Tower environment.

Deploying to Tower

# Deploy a single app
cd ingest_shopify_orders
tower deploy

# Deploy all apps (from repo root)
for app in ingest_* run_* customer_* product_* summarize_* generate_* warehouse_* daily_* regenerate_* sales_* order_* returns_* inventory_*; do
  cd $app && tower deploy && cd ..
done

# Run an app
tower run ingest_shopify_orders

# View logs
tower logs ingest_shopify_orders

App Categories

πŸ“₯ Ingestion Apps

Extract data from source systems into the bronze layer:

  • ingest_shopify_orders: Shopify e-commerce orders
  • ingest_inventory_snapshots: Warehouse stock levels
  • ingest_warehouse_telemetry: IoT sensor data
  • ingest_product_catalog: Product master data
  • ingest_returns_rma: Return and RMA records

πŸ”„ Transformation Apps

Transform bronze data into analytics-ready tables:

  • run_dbt_models: Execute dbt transformations
  • daily_inventory_ledger: Daily inventory movements
  • customer_360: Customer analytics and LTV
  • product_performance_models: Product quality metrics

πŸ“Š Analytics Apps (Marimo Notebooks)

Interactive dashboards and exploration:

  • sales_dashboard: Revenue and order metrics
  • inventory_heatmap: Stock levels by warehouse
  • order_funnel_analysis: Conversion funnel
  • returns_quality_insights: Return patterns

πŸ”— Orchestration Pipelines

Coordinate multiple apps into workflows:

  • daily_retail_pipeline: Full daily ETL pipeline
  • warehouse_anomaly_pipeline: Real-time anomaly response

πŸ› οΈ Utility Examples

Learn Tower features:

  • secrets_example: Secrets management
  • parameterized_app: Runtime parameters
  • scheduled_job: Cron scheduling

Data Architecture

Lakehouse Layers

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚             GOLD LAYER                   β”‚
β”‚  Business-ready aggregates & KPIs       β”‚
β”‚  β€’ customer_360                          β”‚
β”‚  β€’ product_performance                   β”‚
β”‚  β€’ inventory_ledger                      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   β–²
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚            SILVER LAYER                  β”‚
β”‚  Cleaned, conformed, enriched data       β”‚
β”‚  β€’ ticket_summaries                      β”‚
β”‚  β€’ product_descriptions                  β”‚
β”‚  β€’ anomaly_explanations                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   β–²
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚            BRONZE LAYER                  β”‚
β”‚  Raw ingested data from sources          β”‚
β”‚  β€’ orders                                β”‚
β”‚  β€’ inventory                             β”‚
β”‚  β€’ warehouse_telemetry                   β”‚
β”‚  β€’ products                              β”‚
β”‚  β€’ returns                               β”‚
β”‚  β€’ support_tickets                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Data Flow

Sources β†’ Ingestion β†’ Bronze β†’ Transformations β†’ Silver/Gold β†’ Analytics
  β”‚          β”‚          β”‚            β”‚              β”‚            β”‚
Shopify   dltHub    Iceberg        dbt          Iceberg      Marimo
APIs      Tower                   SQLMesh                   Dashboards
IoT                                Tower                       β”‚
Support                            LLMs                        β”‚
Systems                                                    Business
                                                            Users

Key Technologies

  • Tower: App orchestration, scheduling, secrets management, catalog management
  • Apache Iceberg: Open table format for data lakehouse
  • dltHub: Python-first data ingestion framework
  • dbt: SQL-based data transformations
  • Marimo: Reactive Python notebooks
  • PyArrow & Polars: Columnar data processing
  • Claude: LLM for AI automation
  • Slack: Notifications and alerting

Common Workflows

Daily Retail Pipeline

tower run daily_retail_pipeline

Executes:

  1. Ingest orders, products, returns
  2. Build customer_360 and product_performance
  3. Generate AI sales report
  4. Send Slack notification

Real-Time Anomaly Detection

tower run warehouse_anomaly_pipeline

Executes:

  1. Ingest latest telemetry
  2. Detect anomalies
  3. Explain with AI
  4. Alert on critical issues

Demo Data Regeneration

tower run regenerate_demo_data

Executes:

  1. Generate 6 realistic sample data files using Faker
  2. Upload to S3 with public-read access
  3. Notify on completion

Runs automatically daily at 2 AM UTC to keep demo data fresh.

Ad-Hoc Analysis

cd sales_dashboard
marimo run dashboard.py

Opens interactive dashboard in browser.

Configuration

Required Secrets

Set via tower secrets set:

# API Credentials
tower secrets set SHOPIFY_SHOP_NAME "orbita-supply"
tower secrets set SHOPIFY_API_KEY "your-key"

# AWS Credentials (for regenerate_demo_data)
tower secrets set TOWER_DEMO_AWS_ACCESS_KEY_ID "your-access-key"
tower secrets set TOWER_DEMO_AWS_SECRET_ACCESS_KEY "your-secret-key"

# Notifications
tower secrets set SLACK_WEBHOOK_URL "https://hooks.slack.com/..."

# LLM API (provided automatically by Tower)
# TOWER_LLM_API_KEY is injected by Tower runtime

Catalog Configuration

Iceberg catalogs are configured per Tower environment (not via secrets):

# Configure catalog for your environment
# This is typically done through Tower UI or CLI
tower catalog create orbita-lakehouse \
  --type polaris \
  --warehouse s3://orbita-lakehouse/warehouse

# Or for Snowflake Open Catalog
tower catalog create orbita-lakehouse \
  --type snowflake \
  --account your-account \
  --database iceberg_db

Apps automatically use the catalog defined in the default environment or the current environment.

Environment Variables

export AWS_REGION="us-west-2"
export ENVIRONMENT="production"
export LOG_LEVEL="INFO"

Resources

  • Tower Documentation: https://docs.tower.dev
  • Claude Code: Compatible with Tower workflows
  • Sample Data: Located in data/ directory

Demo Scenarios

Booth Demo: End-to-End Pipeline

Show complete data flow from source to insight:

  1. Run ingestion apps β†’ show bronze tables
  2. Run transformations β†’ show silver/gold tables
  3. Open Marimo dashboard β†’ show live analytics
  4. Run LLM app β†’ show AI automation

Booth Demo: Real-Time Monitoring

Demonstrate operational intelligence:

  1. Simulate warehouse anomaly
  2. Run anomaly pipeline
  3. Show AI explanation
  4. Display Slack alert

Booth Demo: Developer Experience

Highlight Tower features:

  1. Show Towerfile syntax
  2. Deploy app with CLI
  3. Run with parameters
  4. View logs and monitoring

Contributing

This demo repository follows the Orbita Supply Co. theme. When adding apps:

  • Use realistic retail/logistics scenarios
  • Keep data volumes small for demos
  • Document all dependencies
  • Follow existing naming conventions
  • Add sample data if needed

License

This demo repository is provided for educational and demonstration purposes.


Built with Tower β€’ tower.dev

About

Demo deployment that shows how to use Tower.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published