Loading scaffold…
Loading scaffold…
WhatsApp Cloud API + AI qualifier + agent inbox + Meta CAPI + CRM sync — yours to fork into automotive, real-estate, education, healthcare funnels. The code is yours. Forever.
Same WhatsApp-first qualification UX. Different ownership model. Four things that scale against you once leads start flowing.
| Comparison axis | Patagon AI / Wati | Need for Build scaffold |
|---|---|---|
| Pricing | Per-seat plus per-conversation pricing that grows with your lead volume. | Free forever. You pay only Meta's conversation fee and your own API usage. |
| Data ownership | Your leads and chat history live in their cloud. | Your Supabase project. Contacts, conversations, qualification data — in your Postgres. |
| Privacy | Their compliance posture covers your customers' chats. | RLS-scoped per workspace. pgcrypto-encrypted tokens. LGPD/GDPR data inventory included. |
| Extensibility | The CRM connectors and rules they ship. Custom logic costs extra. | Full Inngest + Drizzle source. Any CRM, any rule, any model — today. |
Every file the scaffold ships, with size and one-line description. Download once, build forever.
CLAUDE.md4.5 KBProject config for Claude Code — tech stack, commands, code style, critical rules. Under 100 lines, read first.
ARCHITECTURE.md12.0 KBDrizzle schema for workspaces + WhatsApp accounts + contacts + conversations + messages + qualification_rules + integrations + events. Webhook ingress flow + Inngest functions + OAuth flows.
PRD.md9.6 KB13 features including 5-step onboarding, WhatsApp Cloud API integration, AI qualifier, rule engine, agent inbox, Meta CAPI, CRM connectors, Calendar booking, lifecycle drips.
SECURITY.md9.8 KBSTRIDE threat model + OWASP 2025 + GDPR + LGPD compliance + prompt injection defense + WhatsApp 24h window + pgcrypto vault.
MARKETING.md9.5 KBPositioning vs Patagon AI + Wati + Take Blip. LATAM-native persona Diego + GTM ES/PT/EN + LATAM channel strategy.
PROMPT.md8.9 KB7 sequential prompts: foundation → auth + onboarding + RLS → WhatsApp Cloud API + webhook ingress + inbox → AI qualifier + rule engine → CRM + Calendar + CAPI integrations → reports + lifecycle drips + billing → i18n + audit + GDPR + tests + ship.
ARCHITECTURE_CROSSCHECK.md25.9 KBSecond-opinion architecture review: GPT + Gemini independently critique the plan, consolidated into confirmations, corrections, and concrete diffs.
api-guide.html7.5 KBZero-jargon visual guide (opens in your browser): create accounts, get API keys, fill .env, push to GitHub, deploy on Vercel.
lib/mock/index.ts0.6 KBTyped mock dataset — click through the full UI with realistic data before connecting real services.
assets/manifest.json0.3 KBMachine-readable package inventory with generation timestamps.
WhatsApp Cloud API + Claude qualifier + Inngest durable jobs — sub-second webhook acks.
Agent inbox SSR-fast. Webhook ingress on Edge runtime for sub-500ms ack to Meta.
Multi-tenant data isolation. CDC powers live agent inbox with sub-200ms message updates.
Typed queries with workspace_id scope. OAuth + WhatsApp tokens encrypted at rest with workspace-derived keys.
Conversational qualifier with sub-5s response. Multi-language ES/PT/EN with regional dialect tuning.
Durable execution for qualifier-runner + CAPI-pusher + lifecycle-drip + oauth-refresh + cron jobs.
LATAM-warm palette + WhatsApp green accent. Multi-language UI via i18next.
Start from lead qualification, end up shipping automotive, real-estate, education, healthcare intake.
qualifier asks vehicle model + budget + timeline → HubSpot + Google Calendar test-drive booking · per-location attribution
qualifier asks property type + region + budget → routing to top-performing agent · CRM + Calendar tour booking
qualifier asks program + start-date + payment-readiness → CRM lead + WhatsApp welcome drip
qualifier asks insurance + specialty + urgency → calendar slot + reminder drip · LGPD redaction for PHI
one workspace per client · agency dashboard aggregates attribution across all funnels · white-label optional
Every directory, every route, every migration. What you'll see right after `unzip`.
patagon/
├── CLAUDE.md
├── PROMPT.md
├── README.md
├── ARCHITECTURE.md
├── PRD.md
├── SECURITY.md
├── MARKETING.md
├── design-tokens.css
├── logo.svg
├── .env.example
├── next.config.ts
├── tailwind.config.ts
├── drizzle.config.ts
├── tsconfig.json
├── package.json
├── app/
│ ├── layout.tsx
│ ├── (auth)/login/page.tsx
│ ├── (dashboard)/
│ │ ├── page.tsx (overview)
│ │ ├── inbox/{page.tsx,[conversationId]/page.tsx}
│ │ ├── rules/page.tsx
│ │ ├── reports/page.tsx
│ │ ├── integrations/page.tsx
│ │ ├── lifecycle/page.tsx
│ │ └── settings/{team,billing,whatsapp,audit}/page.tsx
│ ├── onboarding/page.tsx
│ └── api/
│ ├── trpc/[trpc]/route.ts
│ ├── webhooks/whatsapp/[workspaceId]/route.ts (HMAC verified)
│ ├── webhooks/stripe/route.ts
│ ├── oauth/[provider]/{authorize,callback}/route.ts
│ └── inngest/route.ts
├── components/
│ ├── inbox/{list,conversation-pane,message-list,agent-composer,ai-suggestion-tray,take-over-button}.tsx
│ ├── qualification/{panel,rule-builder,rule-simulator}.tsx
│ ├── reports/{kpi-cards,attribution-chart,funnel-chart,campaign-table}.tsx
│ ├── integrations/{grid,card,whatsapp-verifier}.tsx
│ └── onboarding/{stepper,workspace-form,whatsapp-step,integrations-step,rule-quickstart}.tsx
├── server/
│ ├── api/routers/{workspace,whatsapp,conversation,message,rule,integration,report,billing}.ts
│ ├── services/{qualifier,rule-evaluator,whatsapp,capi,crm,calendar,integration-vault}.ts
│ ├── integrations/{meta,hubspot,salesforce,pipedrive,google}/{oauth,api,upsert}.ts
│ └── inngest/functions/{qualifier-runner,capi-pusher,lifecycle-drip,crm-sync,oauth-refresh,monthly-quota-reset,report-aggregation,whatsapp-window-monitor}.ts
├── lib/
│ ├── env.ts
│ ├── supabase/{client,server,admin}.ts
│ ├── auth/{helpers,middleware,roles}.ts
│ ├── rate-limit.ts
│ ├── crypto/{kdf,encrypt}.ts
│ ├── i18n/{client,server,locales/es,pt,en}.ts
│ └── prompt/{qualifier-system-prompt,fallback-templates}.ts
├── hooks/
├── types/
├── middleware.ts
├── tests/e2e/
└── supabase/migrations/
├── 0001_initial.sql
├── 0002_rls_policies.sql
├── 0003_indexes.sql
└── 0004_pgcrypto_setup.sqlEach one ships the same way: paste PROMPT.md into Claude Code and ship.
Notion-inspired
Notion-style workspace, code-owned. Fork into wiki, KB, CRM, recipe vault, project hub.
View scaffold →Slack-inspired
Channels + DM + threads + realtime presence. Fork into customer chat, community platform, internal team tool.
View scaffold →Cal.com-inspired
Cal.com-style scheduling, code-owned. Self-host multi-host bookings + Stripe payments. Fork into consultations, classes, restaurant reservations.
View scaffold →Linktree-inspired
Personalized bio page + click tracking + UTM + theme presets. Fork into creator landing, portfolio, event page, app smart-link.
View scaffold →Gorgias-inspired
Gorgias-style e-com helpdesk, code-owned. Widget + agent inbox + Shopify order context + AI replies. Fork into support, sales chat, onboarding bot.
View scaffold →Mailchimp-inspired
List management + drag-drop editor + automation triggers. Fork into newsletter, drip campaigns, transactional service.
View scaffold →Zapier-inspired
Zapier-style automation builder, code-owned. Trigger nodes + action nodes + run history. Fork into approval flows, lead routing, sync jobs.
View scaffold →Loom-inspired
Loom-style async video, code-owned. Record + chunked upload + share link + viewer analytics. Fork into tutorial vault, sales demos, internal training.
View scaffold →Hubspot-inspired
Contacts + deals + pipeline stages + email tracking + activity log. Fork into B2B CRM, partner pipeline, investor relations.
View scaffold →