How yaswanthkillampalli/mail-ops works
MailOps ingests support email through a Resend webhook, persists it, and runs Groq triage alongside Cerebras deep analysis. Supervisors then review live email and analysis data, reply or create tickets, manage assignments and ticket status, and monitor operational/model metrics. The graph preserves the documented product areas; some API routes and UI components are unsampled, so their internal connections are included only where the README or excerpts establish them.
Main entry points: api Dashboard APIs · realtime.ts Realtime refresh · supabase.ts Supabase database · page.tsx Email workspace
Components 25
Email ingestion
- Inbound webhook
app/api/webhook/route.ts - Email persistence
lib/emails.ts
AI analysis
- Analysis orchestrator
lib/email_analysis.ts - Groq triage
llm-components/groq/classify.ts - Cerebras analysis
llm-components/cerebras/analyze.ts - Staff suggestion
llm-components/groq/suggestStaff.ts
Supervisor operations
- Operations overview
app/dashboard/page.tsx - Email workspace
app/dashboard/emails/page.tsx - Email list
components/EmailList.tsx - Email detail
components/EmailDetail.tsx - Ticket kanban
app/dashboard/tickets/page.tsx - Kanban board
components/KanbanBoard.tsx - Replies log
app/dashboard/replies/page.tsx - Replies list
components/RepliesList.tsx - Reply detail
components/ReplyDetail.tsx - AI monitoring
app/dashboard/monitoring/page.tsx - Monitoring charts
components/PriorityDistributionChart.tsx - Monitoring stats
components/StatCards.tsx
Data and integrations
- Dashboard APIs
app/api - Domain queries
lib/queries.ts - Supabase database
lib/supabase.ts - Realtime refresh
lib/realtime.ts
Other components
- Support sender
- Resend inbound
- Resend mail API
Connections 33
- Support sender → Resend inbound: sends email
- Resend inbound → Inbound webhook: posts webhook
- Inbound webhook → Email persistence: saves email
app/api/webhook/route.ts - Email persistence → Supabase database: stores email
- Email persistence → Analysis orchestrator: starts analysis
- Analysis orchestrator → Groq triage: runs triage
lib/email_analysis.ts - Analysis orchestrator → Cerebras analysis: runs analysis
lib/email_analysis.ts - Groq triage → Supabase database: writes triage
- Cerebras analysis → Supabase database: writes results
- Operations overview → Dashboard APIs: fetches overview
app/dashboard/page.tsx - Operations overview → Realtime refresh: refreshes on changes
app/dashboard/page.tsx - Email workspace → Dashboard APIs: fetches emails
app/dashboard/emails/page.tsx - Email workspace → Realtime refresh: refreshes on changes
app/dashboard/emails/page.tsx - Email workspace → Email list: renders list
app/dashboard/emails/page.tsx - Email workspace → Email detail: renders detail
app/dashboard/emails/page.tsx - Email detail → Dashboard APIs: updates and acts
components/EmailDetail.tsx - Dashboard APIs → Domain queries: calls domain queries
app/api/tickets/route.ts - Dashboard APIs → Supabase database: updates email
app/api/emails/[id]/route.ts - Dashboard APIs → Resend mail API: sends reply
app/api/emails/[id]/reply/route.ts - Domain queries → Supabase database: reads and writes
lib/queries.ts - Ticket kanban → Dashboard APIs: fetches tickets
app/dashboard/tickets/page.tsx - Ticket kanban → Realtime refresh: refreshes on changes
app/dashboard/tickets/page.tsx - Ticket kanban → Kanban board: renders board
app/dashboard/tickets/page.tsx - Replies log → Realtime refresh: refreshes on changes
app/dashboard/replies/page.tsx - Replies log → Replies list: renders history
app/dashboard/replies/page.tsx - Replies log → Reply detail: renders detail
app/dashboard/replies/page.tsx - AI monitoring → Dashboard APIs: fetches metrics
app/dashboard/monitoring/page.tsx - AI monitoring → Realtime refresh: refreshes on changes
app/dashboard/monitoring/page.tsx - AI monitoring → Monitoring charts: renders charts
app/dashboard/monitoring/page.tsx - AI monitoring → Monitoring stats: renders metrics
app/dashboard/monitoring/page.tsx - Dashboard APIs → Staff suggestion: requests suggestion
app/api/ai/suggest-staff/route.ts - Staff suggestion → Domain queries: uses staff roster
- Realtime refresh → Supabase database: subscribes to changes