How senthilsk10/rag-project works
Main Components
A. Frontend Layer:
• Web Interface (Flask Templates)
• Voice Input Processing
• Translation Interface
• Text-to-Speech Component
B. Backend Layer:
• Flask Web Server
• PDF Processing Service
• RAG Engine
• Voice Processing Service
C. Data Layer:
• MongoDB Database
• PDF Storage
• Extracted Text Storage
[User Interface Layer]
[Application Layer]
[Data Layer]
Detailed Component Breakdown
A. User Interface Layer (Top):
• HTML templates (index.html, data.html)
• Voice input/output interfaces
• Translation component
• Text-to-speech component
B. Application Layer (Middle):
• RAG Processing Engine (rag_final.py)
• PDF Monitor Service
• Voice Processing Service
• Translation Service
C. Data Layer (Bottom):
• MongoDB Database
• PDF Storage System
• Extracted Text Repository
Voice Query Flow
• Browser → Voice Input → Flask Server → RAG Engine → MongoDB → Results
PDF Processing Flow
• PDF Monitor → RAG Engine → MongoDB Storage
Translation Flow
• Selected Text → Translation Service → Translated Output
Additional Elements
Specific features:
• MongoDB data management interfaces
• Voice command processing system
• Result limitation mechanism
• Text selection and translation workflow
External Services
Connections to:
• Speech-to-text API
• Translation API
• Text-to-speech service
Notes
Annotations for:
• Port numbers (5000 for Flask)
• File locations
• API endpoints
• Database connections
Remember to include the credentials.py component but represent it as a secure configuration source without exposing sensitive details.
This system design should clearly show how the voice queries flow through the system, how PDFs are processed and stored, and how the translation and text-to-speech features integrate with the main application.