How shiva-74/leadlens works
LeadLens is a real-estate sales copilot whose main workflow turns a form, pasted enquiry, or audio recording into a reviewed lead, AI analysis and explainable priority, then a follow-up action. The frontend provides queue and lead workspaces; the Express API orchestrates transcription, extraction, analysis, call preparation/debrief, chat, and persistence. PostgreSQL stores leads and activity. The README documents provider integrations and several product capabilities not visible in the sampled implementation; those are included as documented subsystems, with evidence limits reflected in the edges.
Main entry points: api.ts Lead API · LeadDetailPage.tsx Lead workspace · App.tsx App routing · index.ts AI workflows
Components 25
Sales workspace
- App routing
src/App.tsx - Workspace navigation
src/components/Layout.tsx - Lead capture
src/pages/NewLeadPage.tsx - Audio recorder
src/components/VoiceRecorder.tsx - Today's queue
src/pages/QueuePage.tsx - Lead list
src/pages/AllLeadsPage.tsx - Lead workspace
src/pages/LeadDetailPage.tsx - Scoring display
src/components/ui.tsx - Follow-up links
src/lib/actions.ts
Lead services
- Lead API
server/routes/api.ts - Anonymous sessions
server/lib/session.ts - Request limiting
server/lib/rateLimit.ts
AI and voice
- AI workflows
server/ai/index.ts - AI prompts
server/ai/prompts.ts - Provider selection
server/ai/provider.ts - Structured outputs
server/ai/schemas.ts - Priority scoring
server/ai/scoring.ts - Audio transcription
server/voice/index.ts
Persistence and follow-up
- PostgreSQL
server/db/index.ts - Sample leads
server/db/seed.ts
Other components
- Sales team
- Text AI services
- Speech services
- Google Calendar
Connections 32
- Sales team → App routing: uses
README.md - App routing → Workspace navigation: renders
src/App.tsx - App routing → Today's queue: routes to
src/App.tsx - App routing → Lead list: routes to
src/App.tsx - App routing → Lead capture: routes to
src/App.tsx - App routing → Lead workspace: routes to
src/App.tsx - Lead capture → Audio recorder: renders
src/pages/NewLeadPage.tsx - Lead capture → Lead API: submits enquiry
README.md - Audio recorder → Lead API: sends audio
README.md - Lead API → Audio transcription: transcribes audio
server/routes/api.ts - Audio transcription → Speech services: uses speech service
README.md - Lead API → AI workflows: requests extraction
server/routes/api.ts - Lead API → AI workflows: requests analysis
server/routes/api.ts - AI workflows → Provider selection: generates outputs
server/ai/index.ts - AI workflows → Structured outputs: validates outputs
server/ai/index.ts - AI workflows → AI prompts: builds prompts
server/ai/index.ts - AI workflows → Priority scoring: computes priority
server/ai/index.ts - Provider selection → Text AI services: calls providers
README.md - Lead API → PostgreSQL: reads and writes
server/routes/api.ts - Lead API → Sample leads: creates samples
server/routes/api.ts - Lead API → Anonymous sessions: uses session
server/routes/api.ts - Lead API → Request limiting: limits requests
server/routes/api.ts - Today's queue → Lead API: loads priorities
README.md - Lead list → Lead API: loads leads
README.md - Lead workspace → Lead API: manages lead
server/routes/api.ts - Lead workspace → Scoring display: renders scores
src/pages/LeadDetailPage.tsx - Lead workspace → Lead API: requests call brief
README.md - Lead workspace → Lead API: submits debrief
server/routes/api.ts - Lead workspace → Lead API: asks lead chat
server/routes/api.ts - Follow-up links → Google Calendar: creates visit link
src/lib/actions.ts - Follow-up links → WhatsApp: opens follow-up
src/lib/actions.ts - Lead workspace → Follow-up links: offers follow-up
README.md