Live reference build

Millionaire Mountain - site plan & architecture

The end-to-end architecture behind our live site at www.millionairemountain.com.
Hover any box for its tech stack.

Millionaire Mountain Stock Market Prediction & Competition - Social User Engagement - Self-Serve Data Analytics Hover any box for tech stack: Real-time User Engagement & Business User Extracts SOCIAL + USERS + MARKET AGENTIC AI / DATA / ML WAREHOUSE GOVERNANCE SELF-SERVE DATA ANALYTICS GOVERNANCE + REPORTS Site Security - Edge: CloudFront + AWS WAF - Auth: Amazon Cognito (JWT) - API: API Gateway -> Lambda (Node .mjs) - Client: HTML/JS PWA (SPA) Site SecurityWAF - Cognito - Acct Setup Social Stock Site - Tech: CloudFront + API Gateway PWA - DB: DynamoDB (operational) - Orchestration: DynamoDB Streams - Scripting: Lambda (Node .mjs) - Cluster: serverless (no cluster) Social Stock Sitestock picks / analytics / competitiongoal parties, cash flow / education Kafka (live engagement) - Tech: Amazon MSK (Apache Kafka) - Streams: trades / picks / likes / party activity - Orchestration: consumers -> leaderboards / feed - Sinks (at once, same topic, two consumer groups): DynamoDB (real-time leaderboards / feed) + S3 raw (continuous stream, no DynamoDB batch-export hop) - Scripting: Lambda / Kafka consumers - Scope: engagement only (market data stays batch) Kafka (MSK) - live engagementtrades / picks / likes / parties ->streams to DynamoDB + S3 at once Social User Chat - Tech: API Gateway + Lambda - Call: POST /noah -> Agentic AI RAG - Returns: grounded answer to chat - Cluster: serverless (no cluster) Social User ChatQ&A: asks Agentic AI / RAG directly NYSE + NASDAQ ingest - Tech: market data poller - Source: stock price + earnings - Target: S3 raw/stocks - Orchestration: EventBridge schedule (batch) - Scripting: Lambda / Glue (Python) NYSE + NASDAQstock price & earnings download Business User Chat - Tech: MCP client + API Gateway + Lambda - Drives: the MCP self-serve APIs - Asks: cross-tool metric research (Power BI / BO / Tableau) - Reads: the Agentic AI RAG group - Cluster: serverless (no cluster) Business User Chatrequests CHANGES + research -> MCP;also reads RAG group Airflow (EC2 orchestrator) - Tech: Apache Airflow 2.10 LocalExecutor + local Postgres on t4g.small (AL2023 arm64) - mm_full_load: DynamoDB export + ML-1 Glue -> Glue Iceberg ETL -> Databricks gold -> Athena parity checks -> Redshift+EMR, dbt-glue and Snowflake gold loads - mm_weekly_batch: DynamoDB export + ML-1 Glue -> Iceberg ETL -> Databricks gold -> checks (+ dbt-glue) - mm_price_daily: price Lambda -> Glue Iceberg ETL -> Athena parity check - mm_load_snowflake / mm_load_redshift_emr / mm_load_dbt_glue: single warehouse loads - Access: SSM port-forward only (no ingress) - Cost guard: box starts for a run and stops itself (auto-stop at +60 / +65 / +70 min) - Scripting: Python DAGs, PowerShell start/stop scripts Airflow (EC2 orchestrator)DDB export + ML-1 -> Iceberg ETL ->Databricks / Snowflake / Redshift / dbt AGENTIC AI + RAG (Noah) Agentic AI (Noah) - Tech: LangGraph.js answer loop + LangChain model gateway (Node.js Lambda) - LLM: Amazon Bedrock (Claude Haiku 4.5) - called only on a miss - Embeddings: Bedrock Titan V2 - Pre-empt: Graph DB + Vector DB answer first (saves tokens) - Scripting: Lambda (Node.js) + RDS Data API Agentic AI (Noah) LangGraph RAG + Bedrock (Claude + Titan) graph+vector pre-empt the LLM => save tokens Bedrock called ONLY on a miss Vector DB (semantic meaning) - Tech: pgvector (HNSW cosine k-NN) - DB: Aurora PostgreSQL (Serverless v2) - Role: semantic similarity match (meaning, not keywords) - Load: Bedrock Titan V2 embeddings via RDS Data API (SQL UPSERT) Vector DBsemanticmeaningpgvector k-NN Graph DB (facts + relationships) - Tech: Neo4j (property graph) - Role: fact/relationship lookups; metadata + lineage knowledge graph - Load: Cypher load from S3 export - Scripting: Cypher - Cluster: EC2 (golden AMI), ephemeral start/kill Graph DBNeo4j factsrelationships+ metadata graph DynamoDB - Tech: Amazon DynamoDB (NoSQL) - DB: 9 operational app tables - Orchestration: DynamoDB Streams; batch export to S3 - Scripting: Lambda writes - Cluster: on-demand (PAY_PER_REQUEST) DynamoDB9 app tables (operational) S3 - raw / archives - Tech: Amazon S3 (object store), us-east-1 - Role: single source of truth - Stores: ddb-archives, raw/stocks, analytics/ml1, corpus - Load: Kafka engagement stream (real time) + DynamoDB export (app tables) + market poller + ML outputs - Cluster: serverless (idle ~$0) S3 - raw / archivesddb-archives, raw/stocks,analytics/ml1, corpus (single truth) ETL COMPARE Two fully isolated ETL approaches, compared head-to-head. Each builds its own bronze/silver/gold table set in Apache Iceberg (Glue Data Catalog) - no shared tables - so load time, correctness, and cost compare cleanly, one isolated set at a time. - Glue ETL -> S3 Iceberg : PySpark on Glue (Glue-native) - dbt + Spark (ETL) : dbt-glue, SQL/Jinja compiled to PySpark on Glue ETL COMPARETwo paths w/ isolated tables Glue ETL -> S3 Iceberg - Tech: Apache Iceberg (Glue Data Catalog) - DB: mm_dev_curated (bronze / silver / gold) - Orchestration: Glue job (MERGE / overwrite) - Scripting: PySpark (Glue 5.0 / Spark 3.5) - Cluster: Glue serverless (DPU-seconds) Glue ETL -> S3 Icebergcurated bronze/silver/GOLD dbt + Spark (ETL) - Tech: dbt (authors the transforms; the T in ELT) - Adapter: dbt-glue (runs models as Glue Spark / PySpark jobs) - DB: writes Apache Iceberg (Glue Data Catalog) - Scripting: SQL + Jinja models compiled to PySpark on Glue - Cluster: AWS Glue Spark (serverless DPU-seconds) dbt + Spark (ETL)dbt-glue - PySpark on Gluebronze/silver/GOLD SageMaker Feature Store - Source ML from a feature store, not raw S3 - avoids re-inventing feature logic per model and training-serving skew. - Dual store - SageMaker Feature Store offline (training/batch) + online (low-latency inference). - Define each feature once, reuse across training and inference. - Verify train/serve feature consistency (AWS Well-Architected ML Lens) so distributions match. - Feature lineage + reproducibility for governance and audit. SageMaker Feature Storeoffline (train) + online (serve) - no skew SageMaker - Predictions - Tech: Amazon SageMaker (training + inference) - Source: the Feature Store (not raw S3) - Models: LSTM / GARCH / XGBoost / LightGBM ranker - Orchestration: model registry + batch inference - Scripting: Python - Cluster: SageMaker training / inference containers SageMaker - Predictions 1) Stock growth (LSTM) 2) Volatility / risk (GARCH / LSTM) 3) Sector trend up/flat/down (XGBoost) 4) Pick win-probability (LightGBM rank) train ctr infer ctr model reg Data Governance (subject-level) - AWS-native - Catalog: AWS Glue Data Catalog + SageMaker Lakehouse (federates Snowflake / Redshift / S3) - Access: AWS Lake Formation (LF-Tags; column/row/cell) + tag-based access control - Lineage + glossary: Glue Data Catalog / Lake Formation - Per-engine enforce: Lake Formation (S3/Athena/Redshift Spectrum), Redshift RBAC, Unity Catalog (Databricks) - Reuse graph: Neo4j metadata (S3) Data Governance (subject-level) AWS-native: Glue Catalog + Lake Formation + SageMaker Lakehouse federation + Neo4j metadata graph (S3) Parallel Warehouse Comparisons Efficiency Ranking: Load Performance, ETL Integration, ENV Maintenance, Cost Efficiency The same governed gold loaded into every engine (Athena / Databricks / Redshift+EMR / Snowflake / dbt) as trial and compared number-for-number and cost-for-cost until a winner is selected. WAREHOUSE LOADS Parallel Warehouse Comparisons Athena + Iceberg - Tech: Amazon Athena (Trino SQL) - DB: Apache Iceberg (Glue Data Catalog) - Orchestration: Glue ETL -> Iceberg; Athena queries - Scripting: PySpark (ETL) + SQL - Cluster: serverless (pay-per-TB scanned) Athena + Icebergserverless lakehouse Databricks (Delta Lake) - Tech: Databricks Lakehouse - DB: Delta Lake (Unity Catalog managed) - Orchestration: UC Glue Lakehouse Federation read of Iceberg - Scripting: Spark SQL + PySpark - Cluster: serverless (no classic cluster) Databricks (Delta Lake)Lakehouse - Unity Catalog - Serverless Redshift + EMR (MPP) - Tech: Amazon Redshift (MPP warehouse) - DB: Redshift RA3 tables - Orchestration: EMR Spark -> S3 Parquet -> Redshift COPY - Scripting: PySpark + SQL - Cluster: RA3 (2-node) + EMR Spark (5-node, ephemeral) Redshift + EMR (MPP)5-node Spark - MPP Snowflake - Tech: Snowflake cloud warehouse - DB: Snowflake tables (or Iceberg over external volume) - Orchestration: COPY INTO from S3 external stage - Scripting: SQL - Cluster: virtual warehouse (auto-suspend) Snowflakeexternal stage Reporting Layer Build - Tech: governed semantic / metrics layer - Role: define each metric/field ONCE (single source of truth) - Serves: Power BI / Tableau / BO read the same definition (no drift) - Options: dbt semantic layer or Unity Catalog metric views - Feeds: the Data Extract Builder Reporting Layer Buildgoverned semantic / metrics layer MCP System (self-serve) - Tech: MCP server (automated, request-driven) - APIs: query / report / ticket / govern / RAG / approve - Reads: Governance + warehouse gold + S3 raw + RAG - Scripting: Lambda (Node) / MCP tools - Cluster: serverless (no cluster) MCP System (Self-Serve) AUTOMATED; DRIVEN BY user request query API report API ticket API govern API RAG API approve API Data Extract Builder (automated) - Tech: automated extract job over the semantic layer - Builds: materialized views / extracts (field list + logic) - Reuse: metadata graph finds existing governed fields - Feeds: the Report Builder - Cluster: serverless job Data Extract Builder (AUTOMATED)materialized views / extracts from thegoverned Reporting Layer Report Builder (automated) - Tech: automated report job - Builds: 3 report types after approval - Reads: Data Extract Builder output (not the warehouse directly) - Orchestration: triggered by the approval gate - Cluster: serverless job Report Builder (AUTOMATED)builds/refreshes 3 reports fromthe governed extracts Metric Reconciliation (automated) - Tech: automated cross-tool reconciliation - Role: compare the same metric across Power BI / Tableau / BO - Trace: lineage back to the one governed definition - Finds: where a metric drifted - Cluster: serverless job over the semantic + lineage graph Metric Reconciliationcross-tool data investigation(Power BI / Tableau / BO parity) ServiceNow Ticket - Tech: ServiceNow (ITSM) - Opened by: the user request - Closed on: Business User approval - Integration: MCP ticket API -> ServiceNow ServiceNow Ticketopened by request; CLOSED on approval Data Governance (approval) - Tech: policy engine over the lineage catalog - Checks: policy / lineage / access on the change - Routes: Auto Approval (low-risk) or Human Approver (extract/access) Data Governance (approval)policy / lineage / access Auto Approval (low-risk) - Tech: automated governance rule - Approves: changes that do NOT alter an extract or access - Cluster: serverless rule Auto Approvallow-risk:no extract/access change Human Approver - Tech: manual sign-off step - Approves: changes that DO alter an extract or access - Action: Business User sign-off closes the ServiceNow ticket Human Approverextract /access change BI REPORTING TOOLS Power BI - Tech: Power BI (Desktop + Service) - Scripting: DAX measures / Power Query (M) - Source: governed extract / semantic layer - Refresh: REST API Power BIDAX measures (governed extract) Tableau - Tech: Tableau (Hyper API) - Artifact: .hyper extract (materialized view of requested fields + logic) - Source: the governed semantic layer / Data Extract Builder Tableaumaterialized view -> .hyper extract Business Objects - Tech: SAP BusinessObjects (WebI) - Model: universe over the gold facts - Scripting: governed join queries - Source: the governed semantic layer Business Objectsuniverse + governed joins LEGEND - arrow color = the box it comes OUT of (matches that box border) | hover any box for its tech stack (technology / DB / orchestration / scripting / cluster) Social app / user Chat / MCP self-serve Agentic AI + RAG + metadata governance S3 lake Warehouse / extract / report builders Governance / ServiceNow / BI reports SageMaker Feature Store + ML Batch ingest / Airflow Kafka live engagement Human approver gate