Project Info
π CalHacks Revenue Optimization Platform
AI-powered revenue optimization platform with intelligent voice calling and real-time analytics
π What Is This?
An intelligent B2B revenue optimization platform that:
- π Tracks user behavior on your e-commerce site in real-time
- π€ Uses Claude AI to decide when to intervene with at-risk customers
- π Makes realistic voice calls via Vapi with natural-sounding AI agents
- π¬ AI Chat Interface powered by Claude for instant business insights
- π Beautiful dashboards with real-time metrics and analytics
β‘ Quick Start
Prerequisites
- Node.js 18+
- API Keys: Vapi, Anthropic Claude, OpenAI
1. Clone & Install
git clone https://github.com/a-khandel/calhacks-demo.git
cd calhacks-demo
npm install
cd frontend02 && npm install && cd ..
cd dummy_website && npm install && cd ..
2. Configure Environment
cp .env.example .env
# Add your API keys to .env
3. Start Everything
# Terminal 1 - Backend
node src/index.js
# Terminal 2 - Dashboard
cd frontend02 && npm run dev
# Terminal 3 - Demo E-commerce Site
cd dummy_website && npm run dev
π Full Setup Guide: docs/setup/QUICKSTART.md
π Project Structure
calhacks-demo/
βββ π src/ # Backend (Node.js + Express)
β βββ index.js # Main server
β βββ services/
β β βββ aiChatService.js # Claude AI chat integration
β β βββ claudeService.js # AI decision engine
β β βββ vapiService.js # Voice calling via Vapi
β β βββ engagementDetector.js # User behavior analysis
β β βββ metricsAggregator.js # Real-time analytics
β βββ config/
β βββ vapi.config.js # Voice agent configuration
β
βββ π frontend02/ # Main Dashboard (React + Vite)
β βββ src/
β β βββ components/
β β β βββ app/
β β β βββ AIChatPanel.tsx # Claude AI chat interface
β β β βββ EngagementMonitor.tsx # User monitoring
β β βββ contexts/
β β βββ MetricsContext.tsx # Real-time metrics
β βββ package.json
β
βββ π dummy_website/ # Demo E-commerce Site (React + Vite)
β βββ src/
β β βββ services/
β β β βββ analyticsTracker.js # Sends metrics to backend
β β βββ pages/ # E-commerce pages
β βββ package.json
β
βββ π docs/ # Documentation
β βββ deployment/ # Deployment guides
β β βββ QUICK_DEPLOY.md # 15-min deploy guide
β β βββ DEPLOYMENT.md # Full deployment docs
β β βββ GITHUB_SETUP.md # GitHub setup
β βββ setup/ # Setup instructions
β β βββ QUICKSTART.md # Quick start guide
β β βββ SETUP_INSTRUCTIONS.md # Detailed setup
β βββ guides/ # Feature guides
β β βββ DEMO_GUIDE.md # How to demo the app
β β βββ AUTO_CALL_TRIGGER_GUIDE.md
β βββ technical/ # Technical docs
β βββ PROJECT_STRUCTURE.md # Architecture details
β
βββ π scripts/ # Utility scripts
β βββ START_BACKEND.sh # Quick backend starter
β βββ test-quick.js # Test script
β
βββ π config/ # Configuration files
β βββ railway.json # Railway deployment config
β
βββ .env.example # Environment variables template
βββ package.json # Backend dependencies
βββ README.md # This file
π― Key Features
1. Real-Time User Tracking
- Monitors user behavior on e-commerce site
- Tracks cart actions, page views, engagement
- Detects abandonment patterns
2. AI-Powered Decision Making
- Claude AI analyzes user behavior
- Intelligent intervention timing
- Personalized outreach strategies
3. Realistic Voice Calls
- Natural-sounding AI agent (Sarah)
- Office background sounds for realism
- Context-aware conversation scripts
- Handles objections and questions
4. AI Chat Interface (OptiPanel AI)
- Ask questions about your data
- Get instant insights and visualizations
- Generate charts automatically
- Save graphs to dashboard
5. Beautiful Dashboards
- Real-time metrics visualization
- User engagement monitoring
- Executive dashboard with custom widgets
π Deployment
Quick Deploy (15 minutes)
- Backend β Deploy to Railway
- Frontend Dashboard β Deploy to Vercel
- Demo Site β Deploy to Vercel (separate project)
π Step-by-Step: docs/deployment/QUICK_DEPLOY.md
Cost: $0/month
- Railway: FREE ($5 credits)
- Vercel: FREE (unlimited for personal projects)
π Documentation
Getting Started
- Quick Start Guide - Get running in 5 minutes
- Setup Instructions - Detailed setup
- Demo Guide - How to demo the platform
Deployment
- Quick Deploy (15 min) - Fast deployment
- Full Deployment Guide - All options
- GitHub Setup - Repository setup
Technical
- Project Structure - Architecture details
- Frontend Integration - Frontend docs
- What's New - Recent updates
π οΈ Tech Stack
Backend
- Runtime: Node.js + Express
- AI: Claude 3.5 Sonnet (Anthropic)
- Voice: Vapi.ai + ElevenLabs + OpenAI GPT-4
- Real-time: WebSocket-like polling
Frontend
- Framework: React + TypeScript + Vite
- UI: Tailwind CSS + Radix UI + shadcn/ui
- Charts: Recharts
- State: React Context API
Deployment
- Backend: Railway
- Frontend: Vercel
- Demo Site: Vercel
π¬ How It Works
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 1. User browses demo e-commerce site β
β - Adds items to cart β
β - Removes items (showing hesitation) β
βββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 2. Analytics tracker sends metrics to backend β
β - Cart actions, page views, engagement β
βββββββββββββββ¬βββββββββββββββββββββββββββββββοΏ½οΏ½ββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 3. Backend analyzes behavior with Claude AI β
β - Detects 3rd cart removal = critical risk β
β - AI decides: "Call now!" β
βββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 4. Vapi makes realistic voice call β
β - Natural AI agent with office background sounds β
β - Personalized script based on user behavior β
β - Offers help, discount, or assistance β
βββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 5. Dashboard shows everything in real-time β
β - User metrics, call status, engagement trends β
β - AI chat for instant insights β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π Environment Variables
# Vapi (Voice Calling)
VAPI_API_KEY=your_vapi_api_key
VAPI_PHONE_NUMBER_ID=your_phone_number_id
DEFAULT_CALL_NUMBER=+1234567890
# Anthropic Claude (AI)
CLAUDE_API_KEY=your_claude_api_key
# OpenAI (used by Vapi)
OPENAI_API_KEY=your_openai_api_key
# Server
PORT=3001
NODE_ENV=development
COMPANY_NAME=YourCompany
Get API keys:
- Vapi: https://vapi.ai
- Claude: https://console.anthropic.com
- OpenAI: https://platform.openai.com
π§ͺ Testing
Test the Call Trigger
- Visit demo e-commerce site: http://localhost:5173
- Add items to cart
- Remove items from cart 3 times
- Check backend console - should see:
π¨ THIRD CART REMOVAL DETECTED - Voice call will be initiated!
π Full Test Guide: docs/guides/TEST_AUTO_TRIGGER.md
π€ Contributing
This is a CalHacks demo project. Feel free to fork and experiment!
π License
MIT
π Links
- Repository: https://github.com/a-khandel/calhacks-demo
- Deployment Guides: docs/deployment/
- Technical Docs: docs/technical/
π‘ Need Help?
Built for CalHacks π
Analysis
View
Metric
- 3
- 2
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- AnthropicIn code
- CSSIn code
- ExpressIn code
- HTMLIn code
- JavaScriptIn code
- ReactIn code
- Tailwind CSSIn code
- TypeScriptIn code
- DockerClaimed
- FastAPIClaimed
- PythonClaimed
- RedisClaimed
8 of 12 appear in the indexed code. 4 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
- Claude CodeCommits
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
1.3 MB
Source files
217
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
aneshkondor/optipanelv2
230 files Β· 1.8 MB Β· @ e1abcd0
Structure
Interface
147 files Β· 64%Screens, components and styles rendered to the user.
Application logic
29 files Β· 13%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here β open the file browser to check anything the diagram implies.
Languages
- TypeScript59%
- Markdown17%
- CSS15%
- JavaScript9%
- HTML0%
- Shell0%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
frontend-rev-opt/package.json
npm Β· 48- @radix-ui/react-accordion
- @radix-ui/react-alert-dialog
- @radix-ui/react-aspect-ratio
- @radix-ui/react-avatar
- @radix-ui/react-checkbox
- @radix-ui/react-collapsible
- @radix-ui/react-context-menu
- @radix-ui/react-dialog
- @radix-ui/react-dropdown-menu
- @radix-ui/react-hover-card
- @radix-ui/react-label
- @radix-ui/react-menubar
- @radix-ui/react-navigation-menu
- @radix-ui/react-popover
- @radix-ui/react-progress
- @radix-ui/react-radio-group
- @radix-ui/react-scroll-area
- @radix-ui/react-select
- +30 more
package.json
npm Β· 46- @anthropic-ai/sdk
- @radix-ui/react-accordion
- @radix-ui/react-alert-dialog
- @radix-ui/react-avatar
- @radix-ui/react-checkbox
- @radix-ui/react-collapsible
- @radix-ui/react-dialog
- @radix-ui/react-dropdown-menu
- @radix-ui/react-hover-card
- @radix-ui/react-label
- @radix-ui/react-popover
- @radix-ui/react-progress
- @radix-ui/react-radio-group
- @radix-ui/react-select
- @radix-ui/react-separator
- @radix-ui/react-slider
- @radix-ui/react-switch
- @radix-ui/react-tabs
- +28 more
website-demo/package.json
npm Β· 46- @radix-ui/react-accordion
- @radix-ui/react-alert-dialog
- @radix-ui/react-aspect-ratio
- @radix-ui/react-avatar
- @radix-ui/react-checkbox
- @radix-ui/react-collapsible
- @radix-ui/react-context-menu
- @radix-ui/react-dialog
- @radix-ui/react-dropdown-menu
- @radix-ui/react-hover-card
- @radix-ui/react-label
- @radix-ui/react-menubar
- @radix-ui/react-navigation-menu
- @radix-ui/react-popover
- @radix-ui/react-progress
- @radix-ui/react-radio-group
- @radix-ui/react-scroll-area
- @radix-ui/react-select
- +28 more
Declared in the repositoryβs manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This projectβs features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.