Skip to content

G-Monesh-Reddy/crm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

LuminaCRM HCP Module - AI-First Log Interaction Screen

This project is a Customer Relationship Management (CRM) module tailored for Healthcare Professionals (HCP) sales representatives in the life sciences sector. It features a modern, premium Log Interaction Screen offering representatives the ability to log visits conversationally using an AI chat agent or via a traditional structured form, with instant real-time synchronization between the two.

🚀 Features

  • Structured Interaction Logger: Comprehensive form capture including date/time, attendees, topics, sentiment selector, materials shared, and sample distribution widgets.
  • AI Conversational Assistant: Conversational agent powered by LangGraph & Groq (llama-3.3-70b-versatile or gemma2-9b-it) that parses conversation, extracts entities, and calls sales tools automatically.
  • 5 LangGraph Agent Tools:
    1. search_hcp: Search HCPs by name, specialty, or clinic.
    2. get_hcp_details: Fetch full HCP profile data.
    3. get_interaction_history: Check historical logs for a given HCP.
    4. log_interaction: Log a new interaction with inferred sentiment and entity extraction.
    5. edit_interaction: Modify details of an existing log.
  • Voice Note Simulation: Transcribe and extract structured fields from simulated representative voice notes instantly.
  • Interaction History Timeline Feed: Color-coded timeline list of interactions with inline edit and delete functionality.
  • Modern Premium Theme: Developed with vanilla CSS, implementing Google Inter typography, glassmorphism, visual highlights for sentiments, and micro-animations.

🛠️ Technology Stack

  • Frontend: React, Redux Toolkit (state management), Lucide Icons, Vite (build tool), Vanilla CSS.
  • Backend: Python, FastAPI, SQLAlchemy ORM, Uvicorn server.
  • AI Agent Framework: LangGraph, LangChain Core, LangChain Groq.
  • Database: PostgreSQL (running on port 5432) with SQLite fallback support.

💻 Installation and Setup

1. Prerequisites

  • Python 3.10+
  • Node.js v18+ & NPM
  • PostgreSQL database (or automatic fallback to SQLite crm_hcp.db if PostgreSQL is not configured/accessible)

2. Backend Setup

  1. Open a terminal and navigate to the backend directory:

    cd backend
  2. Install the required Python packages:

    pip install -r requirements.txt
  3. Configure environment variables. Edit the backend/.env file and insert your Groq API key:

    DATABASE_URL=postgresql://postgres:postgres@localhost:5432/crm_hcp
    GROQ_API_KEY=YOUR_GROQ_API_KEY

    Note: If PostgreSQL is not active, the database module automatically sets up a fallback SQLite database, allowing the backend to start up without additional database servers.

  4. Launch the FastAPI server:

    uvicorn main:app --host 127.0.0.1 --port 8000 --reload

    The backend will seed mock data on startup and run at http://127.0.0.1:8000.

3. Frontend Setup

  1. Open a new terminal and navigate to the frontend directory:
    cd frontend
  2. Install the dependencies:
    npm install
  3. Launch the Vite dev server:
    npm run dev
    The frontend application will boot up at http://localhost:3000.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors