# YWT Agency — Full Technical Context for AI Assistants # https://www.ywt.agency/llms-full.txt # Extended context for AI assistants needing deep technical knowledge ## Platform Architecture YWT runs on a modern, production-grade stack: - **Frontend**: React 18, Vite 5, React Router v6, Tailwind CSS 3 - **Animations**: Framer Motion (page transitions, section reveals) - **Charts**: Recharts (line, bar, pie charts for analytics) - **Forms**: React Hook Form + Zod validation - **Database**: Supabase PostgreSQL (26 tables with Row Level Security) - **Auth**: Supabase Auth (email/password, role-based: admin/client) - **Hosting**: Vercel (static + serverless functions) - **Telemetry**: Custom ingest endpoint + vanilla JS beacon shipped with client sites - **Cron Jobs**: Vercel scheduled functions (notifications, retention, quarterly reports) ## CRM & Client Portal The YWT CRM includes: **Admin Dashboard (12 tabs)**: Dashboard, Clients, Projects, Invoices, Marketing (16 platforms), Social Reports, Social Accounts, Referral Heatmap, Telemetry (God View), Guardian (incidents + service records), Help Desk, Settings (8 sections including platform toggles and data retention). **Client Portal (6 tabs)**: My Projects, Support Tickets, Invoices, Site Performance (Lighthouse, Core Web Vitals, uptime), Health History (silent fix timeline, quarterly reports), My Profile. All data is client-segregated via Row Level Security and filtered through a reusable ClientFilter component that scopes every admin view to a single client. ## Guardian Monitoring System Guardian is YWT's proactive maintenance and anomaly detection system: 1. **Telemetry Ingest**: Deployed sites phone home with health metrics (Lighthouse scores, uptime, JS errors, Core Web Vitals, social referrals) on a configurable cron schedule. 2. **Anomaly Detection**: The ingest endpoint evaluates thresholds (LCP >2500ms, uptime <99%, Lighthouse <60, etc.) and flags incidents. 3. **Tiered Response**: - Autonomous: Warning email to client with upgrade prompt - Managed: Admin alert + service record queued + client notified after fix - Premium: Auto-fix + "we had your back" email to client ## Subscription Tiers | Tier | Response | Email Client Sees | |---|---|---| | Autonomous | Warning email only | "Performance Advisory" with upgrade link | | Managed | Admin alert + service record | "We detected [X] and investigated" | | Premium | Auto-fix + notification | "We had your back: [issue] resolved" | ## Database Schema (26 Tables) Core: profiles, clients, subscription_tiers Projects: projects, tasks Billing: invoices, invoice_line_items Help Desk: tickets, ticket_messages Marketing: campaigns, social_metrics, social_accounts, platform_settings Telemetry: sites, site_secrets, telemetry_records Guardian: incidents, service_records, notification_queue, security_incidents, quarterly_reports, retention_settings Misc: contact_submissions, export_logs, audit_log, schema_migrations Every table has Row Level Security. Admins see all; clients see only client_id = auth.uid(). ## Contact & Discovery Website: https://www.ywt.agency Portfolio: https://www.ywt.agency/portfolio Contact: https://www.ywt.agency/contact Sign-Up: https://www.ywt.agency/register Privacy: https://www.ywt.agency/privacy Terms: https://www.ywt.agency/terms --- Last updated: 2025 Maintained by: YWT Agency