# vanimeesala7/hotel_chain_operations_data_platform architecture

> Architecture diagram of the GitHub repository vanimeesala7/hotel_chain_operations_data_platform, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vanimeesala7/hotel_chain_operations_data_platform
- Repository: https://github.com/vanimeesala7/hotel_chain_operations_data_platform

## Overview

StaySphere is documented as a Snowflake hotel-operations analytics platform. Its main workflow loads hotel-domain CSVs from S3 through Snowpipe into RAW tables, transforms them through VALIDATED and CURATED layers, then exposes KPI views and anomaly reporting to a Streamlit dashboard. The graph also preserves audit, security, and scheduled anomaly capabilities. The README documents these relationships, but the tree contains only `stayshere.sql`; no SQL excerpts or dashboard source were available, so implementation details and the dashboard path remain unverified.

Main entry points: [`stayshere.sql`](https://github.com/vanimeesala7/hotel_chain_operations_data_platform/blob/main/stayshere.sql) (CURATED star schema)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingestion["Ingestion"]
  node_s3[("S3 bucket")]
  node_sqs["SQS events"]
  node_snowpipe["Snowpipe<br/>[stayshere.sql]"]
  node_raw[("RAW tables<br/>[stayshere.sql]")]
end

subgraph group_warehouse["Warehouse Modeling"]
  node_streams["Change streams<br/>[stayshere.sql]"]
  node_incremental_task["Incremental merge<br/>[stayshere.sql]"]
  node_validated[("VALIDATED tables<br/>[stayshere.sql]")]
  node_curated[("CURATED star schema<br/>[stayshere.sql]")]
end

subgraph group_analytics["Analytics"]
  node_kpi_views["KPI views<br/>[stayshere.sql]"]
  node_anomaly_procedures["Anomaly procedures<br/>[stayshere.sql]"]
  node_anomaly_log[("Anomaly log<br/>[stayshere.sql]")]
  node_daily_task["Daily anomaly task<br/>[stayshere.sql]"]
  node_dashboard["Streamlit dashboard"]
end

subgraph group_governance["Governance"]
  node_audit[("Audit logs<br/>[stayshere.sql]")]
  node_security["Data access controls<br/>[stayshere.sql]"]
end

node_operator(("Data operator"))

node_operator -->|"uploads CSVs"| node_s3
node_s3 -->|"emits events"| node_sqs
node_sqs -->|"triggers ingest"| node_snowpipe
node_snowpipe -->|"loads rows"| node_raw
node_raw -->|"tracks changes"| node_streams
node_streams -->|"feeds changes"| node_incremental_task
node_incremental_task -->|"merges data"| node_validated
node_validated -->|"models data"| node_curated
node_curated -->|"defines metrics"| node_kpi_views
node_curated -->|"checks records"| node_anomaly_procedures
node_daily_task -->|"runs daily"| node_anomaly_procedures
node_anomaly_procedures -->|"logs anomalies"| node_anomaly_log
node_kpi_views -->|"provides analytics"| node_dashboard
node_anomaly_log -->|"feeds summary"| node_dashboard
node_incremental_task -.->|"logs batches"| node_audit
node_curated -->|"applies policies"| node_security

click node_snowpipe "https://github.com/vanimeesala7/hotel_chain_operations_data_platform/blob/main/stayshere.sql"
click node_raw "https://github.com/vanimeesala7/hotel_chain_operations_data_platform/blob/main/stayshere.sql"
click node_streams "https://github.com/vanimeesala7/hotel_chain_operations_data_platform/blob/main/stayshere.sql"
click node_incremental_task "https://github.com/vanimeesala7/hotel_chain_operations_data_platform/blob/main/stayshere.sql"
click node_validated "https://github.com/vanimeesala7/hotel_chain_operations_data_platform/blob/main/stayshere.sql"
click node_curated "https://github.com/vanimeesala7/hotel_chain_operations_data_platform/blob/main/stayshere.sql"
click node_kpi_views "https://github.com/vanimeesala7/hotel_chain_operations_data_platform/blob/main/stayshere.sql"
click node_anomaly_procedures "https://github.com/vanimeesala7/hotel_chain_operations_data_platform/blob/main/stayshere.sql"
click node_anomaly_log "https://github.com/vanimeesala7/hotel_chain_operations_data_platform/blob/main/stayshere.sql"
click node_daily_task "https://github.com/vanimeesala7/hotel_chain_operations_data_platform/blob/main/stayshere.sql"
click node_audit "https://github.com/vanimeesala7/hotel_chain_operations_data_platform/blob/main/stayshere.sql"
click node_security "https://github.com/vanimeesala7/hotel_chain_operations_data_platform/blob/main/stayshere.sql"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_s3,node_sqs,node_snowpipe,node_raw toneBlue
class node_streams,node_incremental_task,node_validated,node_curated toneAmber
class node_kpi_views,node_anomaly_procedures,node_anomaly_log,node_daily_task,node_dashboard toneMint
class node_audit,node_security toneRose
class node_operator toneIndigo
```

## Components

### Ingestion

- **S3 bucket**
- **SQS events**
- [Snowpipe](https://github.com/vanimeesala7/hotel_chain_operations_data_platform/blob/main/stayshere.sql): `stayshere.sql`
- [RAW tables](https://github.com/vanimeesala7/hotel_chain_operations_data_platform/blob/main/stayshere.sql): `stayshere.sql`

### Warehouse Modeling

- [Change streams](https://github.com/vanimeesala7/hotel_chain_operations_data_platform/blob/main/stayshere.sql): `stayshere.sql`
- [Incremental merge](https://github.com/vanimeesala7/hotel_chain_operations_data_platform/blob/main/stayshere.sql): `stayshere.sql`
- [VALIDATED tables](https://github.com/vanimeesala7/hotel_chain_operations_data_platform/blob/main/stayshere.sql): `stayshere.sql`
- [CURATED star schema](https://github.com/vanimeesala7/hotel_chain_operations_data_platform/blob/main/stayshere.sql): `stayshere.sql`

### Analytics

- [KPI views](https://github.com/vanimeesala7/hotel_chain_operations_data_platform/blob/main/stayshere.sql): `stayshere.sql`
- [Anomaly procedures](https://github.com/vanimeesala7/hotel_chain_operations_data_platform/blob/main/stayshere.sql): `stayshere.sql`
- [Anomaly log](https://github.com/vanimeesala7/hotel_chain_operations_data_platform/blob/main/stayshere.sql): `stayshere.sql`
- [Daily anomaly task](https://github.com/vanimeesala7/hotel_chain_operations_data_platform/blob/main/stayshere.sql): `stayshere.sql`
- **Streamlit dashboard**

### Governance

- [Audit logs](https://github.com/vanimeesala7/hotel_chain_operations_data_platform/blob/main/stayshere.sql): `stayshere.sql`
- [Data access controls](https://github.com/vanimeesala7/hotel_chain_operations_data_platform/blob/main/stayshere.sql): `stayshere.sql`

### Other components

- **Data operator**

## Connections

- Data operator → S3 bucket: uploads CSVs (evidence: `README.md`)
- S3 bucket → SQS events: emits events (evidence: `README.md`)
- SQS events → Snowpipe: triggers ingest (evidence: `README.md`)
- Snowpipe → RAW tables: loads rows (evidence: `README.md`)
- RAW tables → Change streams: tracks changes (evidence: `README.md`)
- Change streams → Incremental merge: feeds changes (evidence: `README.md`)
- Incremental merge → VALIDATED tables: merges data (evidence: `README.md`)
- VALIDATED tables → CURATED star schema: models data (evidence: `README.md`)
- CURATED star schema → KPI views: defines metrics (evidence: `README.md`)
- CURATED star schema → Anomaly procedures: checks records (evidence: `README.md`)
- Daily anomaly task → Anomaly procedures: runs daily (evidence: `README.md`)
- Anomaly procedures → Anomaly log: logs anomalies (evidence: `README.md`)
- KPI views → Streamlit dashboard: provides analytics (evidence: `README.md`)
- Anomaly log → Streamlit dashboard: feeds summary (evidence: `README.md`)
- Incremental merge → Audit logs: logs batches (evidence: `README.md`)
- CURATED star schema → Data access controls: applies policies (evidence: `README.md`)
