How karanverma-lgtm/xmonksb2b works
This is a browser-based sales CRM covering prospect outreach, lead-pipeline management, billing and delivery, email, document handling, analytics, and integrations. The principal workflow spans prospecting and outreach into tracked pipeline deals, then billing and delivery follow-through. Sampled evidence supports several service and component calls, but the README is only the generic Next.js starter README and page-level routing was not sampled; the graph therefore preserves major tree-visible product areas without guessing their wiring.
Main entry points: emailService.ts Email campaigns · firebase.ts Firebase services · leadsService.ts Lead records · r2.ts Object storage
Components 24
Sales workflow
- Prospect management
src/components/AddColdClientModal.tsx - Outreach records
src/lib/outreachService.ts - Lead pipeline
src/components/MigratePipelineLeadModal.tsx - Lead records
src/lib/leadsService.ts - Pipeline stages
src/constants/stages.ts
Outreach and email
- Email composition
src/components/AIEmailComposerModal.tsx - Email campaigns
src/lib/emailService.ts - Attachment manager
src/components/EmailAttachmentManager.tsx - Email dispatch
src/app/api/email/send/route.ts - Email templates
src/lib/templatesService.ts
Billing and delivery
- Billing records
src/lib/billingService.ts - Delivery management
src/lib/deliveryService.ts - Proposal import
src/app/api/delivery/parse-proposal/route.ts
Shared services
- Document library
src/lib/libraryService.ts - Object storage
src/lib/r2.ts - Approach notes
src/lib/approachNoteService.ts - Financial documents
src/lib/financialDocumentService.ts - Firebase services
src/lib/firebase.ts
Insights and integrations
- Sales analytics
src/components/AnalyticsCharts.tsx - Sales prospecting
src/components/ProspectorTab.tsx - SalesQL enrichment
src/app/api/salesql/enrich-person/route.ts - SalesQL server helper
src/lib/salesqlServerHelper.ts - Google Sheets sync
src/app/api/integrations/google-sheets/route.ts
Other components
- Sales user
Connections 21
- Prospect management → Outreach records: updates records
src/components/AddColdClientModal.tsx - Prospect management → Email campaigns: sends campaigns
- Email composition → Email campaigns: uses service
src/components/AIEmailComposerModal.tsx - Email composition → Attachment manager: renders manager
src/components/AIEmailComposerModal.tsx - Attachment manager → Email campaigns: uploads attachments
src/components/EmailAttachmentManager.tsx - Email campaigns → Firebase services: stores campaign data
src/lib/emailService.ts - Email dispatch → Email campaigns: dispatches email
src/app/api/email/send/route.ts - Email campaigns → Email templates: uses templates
src/lib/emailService.ts - Lead pipeline → Billing records: migrates won deals
- Lead records → Firebase services: reads and writes
src/lib/leadsService.ts - Lead records → Approach notes: deletes note files
src/lib/leadsService.ts - Billing records → Firebase services: reads and writes
src/lib/billingService.ts - Proposal import → Delivery management: parses proposal data
- Google Sheets sync → Lead records: uses lead service
src/app/api/integrations/google-sheets/route.ts - Google Sheets sync → Firebase services: accesses database
src/app/api/integrations/google-sheets/route.ts - SalesQL enrichment → SalesQL server helper: enriches person
src/app/api/salesql/enrich-person/route.ts - SalesQL server helper → Firebase services: uses database
src/lib/salesqlServerHelper.ts - Document library → Firebase services: stores metadata
- Object storage → Document library: stores files
- Financial documents → Object storage: stores documents
- Approach notes → Object storage: stores notes