Skip to content

Introduction

The Retail Intelligence Platform is an enterprise-inspired data lakehouse and intelligence serving layer built to showcase the full lifecycle of analytical data — from raw source ingestion to natural language business intelligence.

Using the popular Brazilian E-Commerce dataset (Olist), the platform processes raw transactions through a medallion pipeline and serves unified insights to dashboards, REST clients, LLM agents, and Claude Desktop via MCP.


Core Pillars

PillarTechnologyWhat It Does
Medallion ArchitectureDatabricks, Delta Lake, PySparkStructures data into Bronze (raw), Silver (cleaned), and Gold (star schema) layers.
Quality GatesCustom DGDQ frameworkAutomated uniqueness and referential integrity checks that halt the pipeline if thresholds are violated.
REST ServingFastAPIHigh-performance API access to sales trends, YoY metrics, customer LTV, and ad-hoc SQL.
Model Context ProtocolFastMCPExposes Gold views as standard MCP tools — any LLM client (like Claude Desktop) can query them natively.
GenAI AgentGemini 2.5 FlashRole-aware conversational agent that adapts output between executive dashboards and developer SQL transparency.

Project Structure

text
Retail-Intelligence-Platform/
├── api/                          # FastAPI backend + MCP server
│   ├── app/
│   │   ├── core/                 # App config & system prompts
│   │   ├── mcp/                  # FastMCP server registration
│   │   ├── routers/              # REST route controllers
│   │   ├── schemas/              # Pydantic validation schemas
│   │   └── services/             # Databricks client & Gemini agent loop
│   └── Dockerfile
├── docs/                         # VitePress documentation (this site)
├── notebooks/                    # PySpark ETL medallion stages
├── sql/                          # Gold-layer reporting view definitions
├── tests/                        # Unit and integration tests
└── databricks.yml                # Databricks Asset Bundle (DAB) config

PageDescription
System ArchitectureHigh-level data flow diagram and medallion stage overview.
Bronze IngestionRaw CSV → Delta Lake ingestion pipeline.
Silver ProcessingCleaning, deduplication, localization, and DGDQ quality gates.
Gold ServingStar schema design, dimension generation, and fact table merge.
REST APIFastAPI endpoint reference with code samples.
MCP ServerModel Context Protocol server setup and tool catalog.
GenAI AgentGemini agent loop, persona system, and prompt builder.
ReferenceFull glossary of terms and complete SQL view definitions.

Retail Intelligence Platform Documentation. Built with VitePress.