How boomeshks/ai-powered-intelligent-sales-infosys works
SalesGenie AI is a FastAPI lead-intelligence and sales-assistance backend. Users create and manage leads, then request company analysis, scoring, and generated outreach; each API route owns its own database reads/writes and service calls. The graph includes the model-based conversion probability capability and the recommendation-generation branch. Source excerpts show the route and service relationships; training and recommendation helper implementations were not sampled, so no unsupported links to them are asserted.
Main entry points: database.py Database session and engine · main.py FastAPI application · scoring.py Scoring routes · analysis.py Company analysis route
Components 19
API workflows
- FastAPI application
app/main.py - Lead management
app/routers/leads.py - Company analysis route
app/routers/analysis.py - Outreach routes
app/routers/outreach.py - Scoring routes
app/routers/scoring.py - Request and response schemas
app/schemas.py
AI intelligence
- Company analysis
app/ai_service.py - Gemini response generation
app/ai_service.py - Email and strategy generation
app/services/ai_service.py - Recommendation helper
app/services/recommendation.py
Lead scoring
- Score and priority calculation
app/services/scoring_service.py - Conversion probability model
app/ml/predict.py - Model training
app/ml/train_model.py - Trained model artifact
app/ml/conversion_model.joblib
Persistence
- Database session and engine
app/database.py - Lead and result entities
app/models.py - SQL database
Other components
- API client
- Google Gemini API
Connections 28
- API client → FastAPI application: sends requests
app/main.py - FastAPI application → Lead management: registers routes
app/main.py - FastAPI application → Company analysis route: registers routes
app/main.py - FastAPI application → Outreach routes: registers routes
app/main.py - FastAPI application → Scoring routes: registers routes
app/main.py - FastAPI application → Database session and engine: creates tables
app/main.py - Lead management → Database session and engine: uses sessions
app/routers/leads.py - Company analysis route → Database session and engine: uses sessions
app/routers/analysis.py - Outreach routes → Database session and engine: uses sessions
app/routers/outreach.py - Scoring routes → Database session and engine: uses sessions
app/routers/scoring.py - Database session and engine → SQL database: connects
app/database.py - Lead and result entities → Database session and engine: inherits base
app/models.py - Lead management → Lead and result entities: reads and writes
app/routers/leads.py - Company analysis route → Lead and result entities: reads and writes
app/routers/analysis.py - Outreach routes → Lead and result entities: reads and writes
app/routers/outreach.py - Scoring routes → Lead and result entities: reads and writes
app/routers/scoring.py - Company analysis route → Company analysis: requests analysis
app/routers/analysis.py - Company analysis → Gemini response generation: generates response
app/ai_service.py - Outreach routes → Email and strategy generation: requests generation
app/routers/outreach.py - Email and strategy generation → Google Gemini API: calls model
- Scoring routes → Score and priority calculation: calculates score
app/routers/scoring.py - Scoring routes → Conversion probability model: predicts probability
app/routers/scoring.py - Score and priority calculation → Trained model artifact: loads model
- Model training → Trained model artifact: produces artifact
- Request and response schemas → Lead management: validates payloads
app/routers/leads.py - Request and response schemas → Company analysis route: shapes responses
app/routers/analysis.py - Request and response schemas → Outreach routes: shapes requests
app/routers/outreach.py - Request and response schemas → Scoring routes: shapes payloads
app/routers/scoring.py