Toast AI — Architecture Map

Interactive reference for how everything connects. Click folders to expand/collapse.

Auto-generated from git repository structure. Last built:

Local Files
GitHub Repos
Cloud Services
Data Flow
Google Docs
Folder
Context (CLAUDE.md)
Memory
Skill
Code / Config

toast-ai-context

znshields/toast-ai-context
Company context, department agents, skills, and memory. The non-code brain of your AI system.
Contains: company/ + departments/ folders — auto-updates this architecture map on every push

toast-ai-ops

znshields/toast-ai-ops
AI operations platform. Gmail auto-reply pipeline, HubSpot sidebar assistant, auto-learning engine. Deploys to Railway.
Contains: Node.js app (src/), CLAUDE.md, GUIDELINES.md, HubSpot UI Extension, schema bundle

toast-finance-dashboard

znshields/toast-finance-dashboard
Financial dashboard pulling live HubSpot data with manual cost inputs. Runs locally.
Contains: Express server, HubSpot API routes, Chart.js frontend, HubSpot CMS template version

toast-pricing-refinement

znshields/toast-pricing-refinement
Package builder / pricing calculator. HTML template for HubSpot CMS.
Contains: HubSpot CMS template, standalone HTML version, CLAUDE.md

Railway

Hosts toast-ai-ops. Auto-deploys from GitHub main branch. Runs 24/7.

toast-ai-ops-production.up.railway.app

Supabase

Operational database. Threads, drafts, events, feedback, auto-learned rules, finance data.

Project: lpdokiygbjhowfasesqi

HubSpot

Source of truth for ALL business data. 23 objects, 4,591+ properties.

Portal 5708986 · Private App for custom objects

Claude API (Haiku)

Powers all AI features in production — email drafting, classification, distillation, sidebar commands.

Gmail API

OAuth-connected. Monitors inboxes, creates drafts, detects outcomes.

Active: zachary@toastweddings.com

GCP Secret Manager

All API keys and tokens. Railway loads at startup.

toastweddingfilms-737df

Google Docs (Rules)

Live communication rules read at runtime via Apps Script proxy.

Apps Script Proxy

Bridge between Railway and Google Docs. No code changes needed to update rules.

GitHub

4 repos. Push to main deploys to Railway. Actions sync docs and build this map.

Email comes in

Gmail API

Scheduler polls every 5 min

Classify & gather context

HubSpot API

Contact, deal, project, engagements, line items

Google Doc Rules

Brand voice, pricing, draft rules

Supabase draft_rules

7 auto-learned rules

Generate draft

Claude Haiku

Rules + learned rules + CRM context → draft reply

Draft posted for review (never auto-sent)

Gmail Draft / HubSpot Comment

Team reviews, edits, sends or deletes

Auto-learning loop

Outcome Detection (10 min)

Sent → +0.1 · Deleted → -0.15 · Refined → highest signal

Nightly Distillation (2 AM)

Analyze outcomes → extract rules → store in Supabase

↑ feeds back into next draft ↑

Toast AI - Live Communication Rules

LIVE — READ AT RUNTIME

The brain of your AI pipeline. Brand voice, pricing, exclusion rules, draft instructions, urgency signals, tier classification. Edits take effect immediately.

Toast AI - Development Guidelines

AUTO-SYNCED FROM GITHUB

Development philosophy and rules. Auto-updated by GitHub Action when GUIDELINES.md changes.