Inspiration

Sales teams manage millions of dollars in active pipeline, yet deals often go silent long before anyone realizes they're at risk. I wanted to build a system that could surface those warning signs early and help sales managers prioritize which deals needed immediate attention. The idea behind Pulse was to create an "early warning system" for revenue risk.

What it does

Pulse is an AI-powered pipeline risk dashboard that analyzes sales deals and identifies which opportunities are most likely to slip. Deals are scored based on factors like customer inactivity, stage stagnation, overdue next steps, and limited stakeholder engagement.

Managers can quickly understand why a deal is at risk and generate AI-powered re-engagement emails directly from the dashboard to help revive stalled conversations.

How I built it

  • Frontend: React + Vite dashboard UI with real-time filtering and interactive drill-downs
  • Backend: Python for RESTful endpoints, and for serving scored deal data and AI-generated content
  • Deployment: Railway (backend) + Railway/Vercel (frontend)
  • AI: Groq API (Llama 3.3 70B) for the re-engagement email generation

The Scoring Engine

The core value of Pulse is transparency. Each deal is evaluated against five business-risk signals, with each rule returning both a point value (0-30) and a human-readable explanation:

def rule_customer_silence(deal):
    days = _days_between(deal["last_customer_activity_date"])

    if days is None:
        return {"points": 30, "reason": "No record of customer activity"}

    points = min(30, max(0, days))
    return {
        "points": points,
        "reason": f"Customer last replied {days} days ago",
    }

The modular rule architecture makes the system extensible and auditable:

RULES = [
    ("customer_silence", rule_customer_silence),
    ("stage_stagnation", rule_stage_stagnation),
    ("stale_next_step", rule_stale_next_step),
    ("single_threading", rule_single_threading),
    ("close_date_slipped", rule_close_date_slipped),
]

Each rule generates explainable output like:

"In Negotiation for 63 days (3.5x the 18-day team median)"

This means managers get to see why a deal is flagged.

Realistic Data Generation

I generated a synthetic CRM dataset of 200 deals with intentional business patterns rather than random values. For example, high-risk deals were modeled with specific behavioral signatures:

if profile == "red":
    days_since_customer = random.randint(25, 60)  # Long silence
    next_step_offset = random.randint(-25, -5)    # Overdue next steps
    contacts = 1                                   # Single-threaded relationship

This approach made the dashboard feel realistic and allowed me to validate that my scoring logic correctly identified at-risk deals.

AI-Powered Email Drafts

When a manager clicks into a flagged deal, Pulse drafts an email using the deal's risk breakdown, recent email history, and stage information:

prompt = f"""You are a sales rep writing a brief, warm re-engagement email.

Deal context:
- Account: {deal['account_name']}
- Stage: {deal['stage']}
- Why it's at risk: {'; '.join(risk_reasons[:3])}

Recent email thread:
{recent_context}

Write a 3-4 sentence email that acknowledges the silence without being pushy..."""

The LLM receives structured context and returns a professional, deal-specific, outreach email.

Challenges I ran into

One of the biggest challenges was determining how to realistically evaluate deal risk. I spent significant time deciding which signals should contribute to the scoring and how heavily each factor should be weighted to create believable results.

Generating realistic CRM-style JSON data was more difficult than expected because the dashboard required relationships between stages, timelines, customer activity, and deal health to feel authentic.

On the technical side, I ran into deployment and integration issues while setting up the Groq API, including environment variable configuration errors across local and production environments. I also encountered CORS configuration problems while connecting the deployed Railway services.

Another challenge was prompt engineering for the AI-generated emails. I had to carefully determine what deal context and activity history to provide to the LLM to generate professional and context-aware messages.

Accomplishments that I'm proud of

I'm especially proud of the scoring logic and the AI-generated re-engagement workflow. Instead of producing a generic "risk score," Pulse can accurately explain the why behind the score.

I'm also proud that the final product feels like a realistic SaaS platform with a deployed infrastructure, and a complete end-to-end workflow from risk detection to AI-assisted outreach.

What I learned

I learned a lot about designing and balancing product intuition with technical implementation. Building the scoring engine taught me how important it is for AI-driven tools to justify their outputs clearly rather than acting like black boxes.

I also gained hands-on experience with:

  • Full-stack deployment workflows (Railway, environment variable management, CORS)
  • API integration and prompt engineering for LLM-powered features
  • Designing modular, extensible backend architectures
  • Creating realistic datasets that model business behavior

What's next for Pulse

Next, I'd like to integrate Pulse directly with real CRM platforms like Salesforce or HubSpot instead of relying on generated datasets.

I also want to improve the intelligence of the scoring engine by incorporating additional signals such as email sentiment analysis, meeting frequency, and historical deal outcome patterns. Longer term, I envision Pulse becoming a proactive revenue intelligence platform that helps sales teams identify and recover opportunities before they're lost.

Project includes live demo link, github repos for frontend and backend (mainly separated for easier railway deployment), presentation link with architectural diagrams and a video demo link of the process. API Documentation is also attached.

Built With

Share this project:

Updates