Skip to content

VishnuPScodes/my-ai-assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Personal AI Voice Assistant

Frontend Backend Database Voice AI

A full-stack web application that provides an AI voice assistant experience using VAPI.ai technology. Features real-time voice interactions, call analytics, and a beautiful responsive interface.

🌟 Features

  • Voice AI Integration - Real-time voice conversations with AI using VAPI.ai
  • Call Analytics - Track and analyze conversation metrics
  • Modern UI/UX - Responsive design with smooth animations
  • Resume Management - Download functionality with progress tracking
  • Scalable Backend - Built with NestJS and MongoDB
  • Real-time Status - Live connection state indicators

🏗️ Architecture

/
├── frontend/           # React frontend application
│   ├── src/
│   │   ├── components/    # Reusable UI components
│   │   ├── configs/       # Configuration files
│   │   └── assets/       # Static resources
│   └── ...
│
└── backend/           # NestJS backend application
    ├── src/
    │   ├── calls/        # Call management module
    │   ├── app.module.ts # Root application module
    │   └── main.ts      # Application entry point
    └── ...

🚀 Quick Start

Prerequisites

  • Node.js (LTS version)
  • MongoDB
  • npm/yarn/pnpm
  • VAPI.ai API key

Environment Setup

  1. Backend (.env)
PORT=3000
MONGODB_URI=mongodb://localhost:27017/ai-assistant
FRONTEND_URL=http://localhost:5173
  1. Frontend (.env)
VITE_VAPI_API_KEY=your_vapi_key
VITE_CLIENT_ID=your_client_id
VITE_API_URL=http://localhost:3000

Installation & Running

Backend:

cd backend
npm install
npm run start:dev

Frontend:

cd frontend
npm install
npm run dev

💡 Key Components

Frontend Components

CallConnectButton

  • Manages VAPI.ai voice connections
  • Handles call lifecycle events
  • Provides real-time status feedback
  • Sends analytics to backend

UserAvatar

  • Displays AI assistant profile
  • Manages loading states
  • Shows online/offline status

ResumeButton

  • Handles document downloads
  • Shows progress indicators
  • Features hover animations

Backend Modules

Calls Module

  • Handles VAPI webhook events
  • Stores call analytics
  • Provides call summary endpoints
  • Manages MongoDB interactions

🔧 Technical Details

Frontend Stack

  • React 19 with Hooks
  • Vite 6 for building
  • TailwindCSS for styling
  • VAPI.ai SDK for voice
  • ESLint + PostCSS

Backend Stack

  • NestJS 11
  • MongoDB with Mongoose
  • Express platform
  • Jest for testing
  • TypeScript

📝 API Endpoints

Calls API

  • POST /calls/webhook - Handle VAPI events
  • GET /calls/connects - Get connection stats
  • GET /calls/summary - Get call analytics

🧪 Testing

Backend Tests:

# Unit tests
npm run test

# E2E tests
npm run test:e2e

# Test coverage
npm run test:cov

📚 Development Guidelines

  1. Code Style

    • Use ESLint rules
    • Follow component-based architecture
    • Maintain type safety
    • Write meaningful comments
  2. Git Workflow

    • Create feature branches
    • Write descriptive commits
    • Review before merging
  3. Error Handling

    • Implement proper error boundaries
    • Log errors appropriately
    • Provide user feedback

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


Built with ❤️ using React, NestJS, and VAPI.ai