Architecture Overview
The Metatate Snowflake Native App is the Snowflake runtime of the Metatate decision layer. It runs entirely within the consumer's Snowflake account on Snowpark Container Services (SPCS). There is no external infrastructure, and all compute, storage, and AI processing happen inside Snowflake. The architecture below covers the Snowflake runtime; the decision layer itself is portable across runtimes through MCP.
High-Level Architecture
Request Flow
Component Details
The application is organized into three tiers with clear separation of concerns.
Router (nginx)
The nginx reverse proxy handles:
- Static asset serving for the React frontend
- API request proxying (
/api/*routes to the Flask backend) - HTTPS termination is handled by Snowflake's SPCS ingress, not by nginx
Frontend (React)
Single-page application built with React and Rsbuild.
| Area | Count | Details |
|---|---|---|
| Pages | 4 | Home, Policy Editor, Deployments, Settings |
| Component groups | 6 | AI, Policy, UI, Layout, Catalog, Common |
| State stores | 4 | Policy store, AI status, Table catalog, Auth |
| API client | 1 | Axios-based with interceptors |
Backend (Flask)
Python API server with a layered architecture (routes, services, repositories, models) covering governance operations, AI integration, catalog management, and tenant configuration.
Data Layer
All persistent state lives in Snowflake tables within the application's schemas:
| Schema | Purpose |
|---|---|
app_data | Governance tables, tenant config, activity log, snapshots, decision log |
core | MCP tools (6 UDFs), MCP server registration, utility procedures |
app_public | Versioned procedures, lifecycle callbacks, consumer-facing API |
AI Layer
AI features are powered by Snowflake Cortex and require no external connections. See Cortex AI Integration for details.
Deployment Model
The Snowflake Native App is distributed through the Snowflake Marketplace or direct sharing:
- Provider publishes the application package with versioned container images
- Consumer installs the application in their account
- Application creates its schemas, tables, compute pools, and services
- Consumer grants references (tables for catalog, warehouse for compute)
- Application is fully operational with no external dependencies
All container images, application code, and configuration are bundled in the application package. The consumer does not need to provide any infrastructure beyond a warehouse and table references.