PatchWork
Inspiration
Support teams are drowning in tabs: Gmail, Discord, dashboards, ticket tools, and separate AI assistants. I built PatchWork to remove that fragmentation and give teams one secure workspace to triage, respond, and coordinate communication without losing context.
What it does
PatchWork is an AI-powered support operations workspace that:
- Ingests support signals from Gmail and Discord.
- Normalizes everything into one inbox with status, source, and query-type views.
- Classifies incoming requests into Technical, Billing, or General.
- Routes requests to specialized AI responders instead of a one-size-fits-all bot.
- Lets teams send coordinated outbound broadcasts across channels from one action.
How I built it
I built PatchWork as a full-stack TypeScript app with:
- Next.js App Router for product pages and API routes.
- Auth0 for secure login, connected accounts, and Token Vault-backed integration flows.
- Supabase/Postgres for operational data (signals, logs, broadcasts, workspace state).
- A modular agent pipeline for classification, routing, response generation, and escalation.
- NVIDIA NIM + Vercel AI SDK for model-powered responses and streaming chat.
- Pollers to process inbound Gmail/Discord messages into the workflow.
Challenges I ran into
- Handling OAuth and token lifecycle safely while keeping setup smooth.
- Normalizing different channel payloads into one consistent support schema.
- Balancing automation speed with response quality and escalation safety.
- Designing confidence/routing logic that avoids overconfident wrong answers.
Accomplishments that I'm proud of
- End-to-end support flow: ingest -> classify -> route -> respond/escalate -> track.
- Unified inbox UX for multi-channel support operations.
- Specialized-agent architecture with domain-specific behavior.
- Cross-channel broadcast workflow with clear sent/partial/failed feedback.
- Secure, organization-scoped onboarding and session handling.
What I learned
- Reliability and trust matter more than maximizing automation at all costs.
- Explicit routing and confidence thresholds improve real-world outcomes.
- Good product UX is as important as model quality for support teams.
- Observability and status feedback are critical for operator confidence.
What's next for Patchwork
- Add deeper integrations (ticketing/CRM/helpdesk systems).
- Expand analytics with trend detection and proactive issue alerts.
- Introduce configurable human approval queues for sensitive responses.
- Add per-workspace policy controls and richer agent customization.
- Harden production deployment with stronger monitoring and SLO tracking.
Bonus Blog Post : How PatchWork Used Auth0 Token Vault to Secure Multi-Channel AI Support
When I started building PatchWork, I thought the hardest part would be AI response quality. I was wrong. The real challenge was trust: how do you let an AI-enabled support workspace read and send messages in Gmail, and work across other providers, without turning token handling into a security liability? The biggest achievement in this project was making Auth0 Token Vault the center of the integration architecture so PatchWork could automate safely instead of just quickly.
The first design decision was to avoid building my own token storage layer. Instead of persisting third-party provider tokens in my app database, I wired PatchWork to request credentials through Auth0 Token Vault at execution time. In practice, this meant building connection wrappers for each provider context and scope requirement. For Gmail, I separated read and compose permissions so each workflow only requests what it actually needs. This made the authorization surface smaller and reduced accidental over-permissioning.
The second key decision was around user experience. Token safety is important, but support operators also need flow continuity. I implemented an interruption handler for Token Vault authorization prompts so when a required connection is missing, the product asks for consent in context instead of failing silently. The result is a better operator journey: clear message, clear action, and resume behavior once authorization completes.
Another useful pattern was treating authorization failures as first-class workflow events. If a required credential is unavailable, PatchWork emits a structured authorization-required state instead of masking the issue as a generic tool failure. This helped me separate true platform errors from expected consent gaps, and it made debugging and escalation logic far more predictable.
For the Auth0 community, the practical takeaway is this: Token Vault is not just a compliance checkbox. It can be an architectural boundary that simplifies your app. By moving token lifecycle concerns out of custom app code, you can focus on product behavior, better permission design, and safer multi-tenant workflows. In PatchWork, that translated into less credential risk, cleaner onboarding logic, and stronger confidence that AI automations would operate within explicit user-approved access.
The outcome is a support workspace that can ingest, classify, and respond across channels while maintaining a defensible token model. That balance between automation and security is what made PatchWork production-minded rather than demo-only.
Built With
- auth0
- auth0-token-vault
- nextjs
- pg-cron
- tailwind
- vercel-ai-sdk
Log in or sign up for Devpost to join the conversation.