Skip to content
This repository was archived by the owner on Jan 24, 2026. It is now read-only.

kartavya4874/MeetingBot

Repository files navigation

AI Meeting Attendant System

A production-ready, multi-user AI Meeting Attendant system with real-time transcription, live Q&A during meetings, and intelligent meeting analysis powered by Google Gemini API.

🌟 Features

Core Capabilities

  • Multi-User Support - JWT authentication with user isolation
  • Meeting Scheduling - Schedule future meetings with automated joining
  • Browser Automation - Join Zoom/Google Meet/Teams meetings automatically
  • 🚧 Real-Time Transcription - Live audio capture and AI transcription via Gemini
  • 🚧 Live Q&A - Answer questions in meeting chat based on current discussion
  • Meeting Analytics - Extract action items, decisions, and key points
  • Semantic Search - ChromaDB-powered search across meeting history
  • Export Functionality - Download summaries as PDF/DOCX
  • Concurrent Meetings - Handle multiple simultaneous meetings per user

Security & Production Features

  • 🔒 Secure Authentication - Bcrypt password hashing + JWT tokens
  • 🔐 Data Encryption - Meeting URLs and credentials encrypted at rest
  • Rate Limiting - Per-user API rate limits
  • 📊 Structured Logging - JSON logs with user/meeting context
  • 🎯 User Quotas - Configurable meeting and API quotas
  • 🔄 Connection Pooling - Optimized MongoDB connections
  • 🚀 Async Architecture - FastAPI with Motor for high concurrency

📋 System Requirements

  • Python: 3.10+
  • MongoDB: 5.0+ (or Docker)
  • Operating System: Windows (initial audio capture support)
  • RAM: 4GB minimum, 8GB recommended
  • Browser: Chrome/Chromium (for Playwright automation)

🔧 Installation

1. Clone the Repository

cd c:\Users\karta\MeetingBot

2. Create Virtual Environment

python -m venv venv
.\venv\Scripts\Activate.ps1

3. Install Dependencies

pip install -r requirements.txt

4. Install Playwright Browsers

playwright install chromium

5. Set Up MongoDB

Option A: Local MongoDB

# Install MongoDB Community Edition from https://www.mongodb.com/try/download/community
# Start MongoDB service
net start MongoDB

Option B: Docker

docker run -d -p 27017:27017 --name mongodb mongo:6.0

6. Configure Environment Variables

# Copy example env file
cp .env.example .env

# Edit .env with your favorite editor
# REQUIRED: Set GEMINI_API_KEY=your-api-key
notepad .env

Critical Settings:

  • GEMINI_API_KEY - Get from https://makersuite.google.com/app/apikey
  • JWT_SECRET_KEY - Generate with: python -c "import secrets; print(secrets.token_urlsafe(32))"
  • ENCRYPTION_KEY - Generate with: python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"

7. Initialize Database

python scripts/init_db.py

🚀 Running the Application

Start Backend API

# Navigate to backend directory
cd backend

# Run with Uvicorn
uvicorn main:app --reload --host 0.0.0.0 --port 8000

Backend API will be available at: http://localhost:8000 API Documentation (Swagger): http://localhost:8000/docs

Start Frontend Dashboard

Open a new terminal:

# Navigate to frontend directory
cd frontend

# Run Streamlit
streamlit run app.py

Frontend dashboard will open automatically at: http://localhost:8501

📚 Project Structure

MeetingBot/
├── backend/                    # FastAPI backend
│   ├── api/                   # API route handlers
│   ├── core/                  # Core utilities (config, security, exceptions)
│   ├── db/                    # Database layer (MongoDB, ChromaDB)
│   │   └── repositories/      # Data access repositories
│   ├── models/                # Pydantic models
│   ├── services/              # Business logic services
│   ├── bot/                   # Meeting bot components
│   │   ├── browser_automation/    # Platform-specific bots
│   │   ├── audio_capture/         # Audio recording
│   │   └── transcription/         # Gemini transcription
│   ├── ai/                    # AI processing modules
│   ├── utils/                 # Utility functions
│   ├── middleware/            # FastAPI middleware
│   └── main.py               # FastAPI app entry point
├── frontend/                  # Streamlit dashboard
│   ├── pages/                # Multi-page app
│   ├── components/           # Reusable UI components
│   └── utils/                # Frontend utilities
├── scripts/                   # Setup and utility scripts
├── tests/                     # Test suite
├── docker/                    # Docker configuration
├── .env.example              # Environment template
├── requirements.txt          # Python dependencies
└── README.md                 # This file

🔐 Authentication Flow

  1. User Registration: POST /auth/register

    • Email, password, full name
    • Password hashed with bcrypt
    • Email verification token generated (currently mock)
  2. Login: POST /auth/login

    • Returns JWT access token + refresh token
    • Tokens stored in frontend session
  3. Protected Routes:

    • All meeting endpoints require Authorization: Bearer <token> header
    • User context extracted from JWT for data isolation

📅 Meeting Workflow

Schedule a Meeting

POST /meetings
{
  "title": "Team Standup",
  "platform": "google_meet",
  "meeting_url": "https://meet.google.com/abc-defg-hij",
  "scheduled_time": "2026-01-15T10:00:00Z",
  "duration_minutes": 30
}

Automated Join

  • APScheduler triggers bot at scheduled time
  • Playwright opens meeting URL in headless browser
  • Bot joins with mic/camera off
  • Audio capture starts (system audio loopback)
  • Transcription begins (chunks sent to Gemini)
  • Chat monitor watches for @mentions

Live Q&A

  • Participant posts: "@AI Bot what did we decide on the budget?"
  • Bot detects trigger phrase
  • Retrieves current meeting transcript from memory
  • Sends question + context to Gemini
  • Posts answer in chat within 3 seconds

Post-Meeting

  • Transcript saved to MongoDB
  • Chunks embedded in ChromaDB
  • AI analyzes for action items, decisions
  • Summary generated and stored
  • User can query via chatbot or download PDF

🤖 API Endpoints

Authentication

  • POST /auth/register - Register new user
  • POST /auth/login - Login and get tokens
  • POST /auth/verify-email - Verify email address
  • POST /auth/forgot-password - Request password reset
  • POST /auth/reset-password - Complete password reset
  • GET /auth/me - Get current user info

Meetings

  • POST /meetings - Schedule meeting
  • GET /meetings - List user's meetings (paginated)
  • GET /meetings/{id} - Get meeting details
  • PUT /meetings/{id} - Update meeting
  • DELETE /meetings/{id} - Cancel meeting
  • GET /meetings/upcoming - Get upcoming meetings
  • GET /meetings/{id}/transcript - Get transcript
  • GET /meetings/{id}/summary - Get AI summary
  • GET /meetings/{id}/download - Download PDF/DOCX

Chat

  • POST /chat/query - Query past meetings
  • GET /chat/history - Get chat history

Admin

  • GET /admin/users - List all users (admin only)
  • GET /admin/stats - System statistics

🎨 Streamlit Dashboard Pages

  • Login / Register - Authentication
  • Dashboard - Overview with upcoming meetings & stats
  • Schedule Meeting - Form to schedule new meeting
  • Meeting Detail - View transcript, summary, action items
  • Chat - Query past meetings with natural language

🧪 Testing

# Run all tests
pytest

# Run with coverage
pytest --cov=backend tests/

# Run specific test file
pytest tests/unit/test_auth.py -v

🐳 Docker Deployment

# Build and run with Docker Compose
docker-compose up --build

# Run in detached mode
docker-compose up -d

# Stop services
docker-compose down

Services:

⚙️ Configuration

Environment Variables

Variable Description Default Required
MONGODB_URI MongoDB connection string mongodb://localhost:27017 No
MONGODB_DB_NAME Database name meetingbot No
GEMINI_API_KEY Google Gemini API key - Yes
JWT_SECRET_KEY Secret for JWT signing Auto-generated Recommended
ENCRYPTION_KEY Fernet key for data encryption Auto-generated Recommended
CORS_ORIGINS Allowed CORS origins http://localhost:8501 No
MAX_CONCURRENT_MEETINGS_PER_USER Meeting limit per user 3 No
LOG_LEVEL Logging level INFO No

User Quotas

Default quotas per user (configurable in .env):

  • Monthly meetings: 100
  • Concurrent meetings: 3
  • API calls per month: 10,000

🛠️ Development Status

✅ Completed Components

  1. Core Infrastructure

    • Configuration management with Pydantic Settings
    • Structured JSON logging with user context
    • Encryption utilities for sensitive data
    • Comprehensive exception hierarchy
    • Input validation utilities
  2. Security & Authentication

    • Password hashing with bcrypt
    • JWT token generation/validation
    • Email verification tokens
    • Password reset tokens
  3. Database Layer

    • MongoDB connection with Motor (async)
    • Connection pooling
    • Automatic index creation
    • User repository (full CRUD)
    • Meeting repository (CRUD + transcripts/summaries)
    • ChromaDB client for semantic search
  4. Data Models

    • User models (registration, login, profile)
    • Meeting models (scheduling, transcripts, summaries)
    • Pydantic validation schemas
    • Role-based access control

🚧 In Progress

  1. Authentication Service & API

    • FastAPI routes for auth
    • Middleware for JWT validation
    • Rate limiting per user
  2. Meeting Service & Scheduler

    • APScheduler integration
    • Meeting lifecycle management
    • Bot orchestration
  3. Meeting Bot

    • Google Meet automation (Playwright)
    • Windows audio capture (PyAudioWPatch)
    • Gemini transcription integration
    • Chat monitoring & Q&A
  4. AI Services

    • Gemini client wrapper
    • Meeting summarization
    • Action item extraction
    • Q&A engine
  5. Streamlit Frontend

    • Multi-page dashboard
    • Meeting management UI
    • Chat interface
    • Export functionality

📝 TODO

  • Docker configuration files
  • Database initialization script
  • Comprehensive test suite
  • Additional platform support (Zoom, Teams)
  • Cross-platform audio capture
  • CI/CD pipeline
  • Production deployment guide

🤝 Contributing

This is a production-ready foundation. To extend:

  1. Add new meeting platforms: Create new bot class in backend/bot/browser_automation/
  2. Extend AI features: Add processors in backend/ai/
  3. Add UI pages: Create in frontend/pages/
  4. Improve concurrency: Implement task queues (Celery/RabbitMQ)

📄 License

MIT License - see LICENSE file for details

🆘 Troubleshooting

MongoDB Connection Fails

# Check MongoDB is running
sc query MongoDB
# Start if stopped
net start MongoDB

Playwright Browser Not Found

playwright install chromium

Import Errors

# Ensure you're in virtual environment
.\venv\Scripts\Activate.ps1
# Reinstall dependencies
pip install -r requirements.txt

Audio Capture Issues (Windows)

  • Ensure no other audio applications are running
  • Check Windows audio settings (stereo mix enabled)
  • Pyaudiowpatch requires Windows 10+

📞 Support

For issues and questions:

  • Check the troubleshooting guide above
  • Review API documentation at http://localhost:8000/docs
  • Check logs in structured JSON format

🎯 Next Steps

  1. Complete backend API routes (in progress)
  2. Implement meeting bot core
  3. Build Streamlit frontend
  4. Add comprehensive tests
  5. Create Docker deployment
  6. Production deployment guide

Built with: Python • FastAPI • Streamlit • MongoDB • ChromaDB • Google Gemini • Playwright

Status: 🚧 Foundation Complete - Active Development

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages