How priyanshu-baghel/bhasha-ai works
Project Type & Purpose
• Bhasha.ai is an AI-powered video translation platform aimed specifically at dubbing NPTEL courses into various Indian languages, generating subtitles, and creating lecture notes.
• It leverages a multi-component tech stack including a MERN-based web application (with React on the frontend, Node.js/Express.js on the backend), Python APIs for AI/ML tasks (using TTS, ASR, NLP), and a MongoDB database.
And Outline Main Components
a. Frontend (Client Side):
• Located in the “client” directory with React.js as the primary framework.
• Contains various pages and components for user interactions (e.g., Landing, Auth, Uploads, Profile, Payment, Courses, Chatbot, etc.).
• This layer manages the UI, routing, and connects to backend APIs using REST calls.
b. Backend (Server Side):
• Located in the “server” directory, built on Node.js with Express.js.
• Organized into controllers and routers for different functionalities such as authentication, admin operations, course management, media processing, email handling, payments, and user profiles.
• Contains middleware, validators, and models that facilitate business logic, data validation, and interaction with MongoDB.
c. Python-based API Services:
• Found in the “apis/uploads” directory.
• Handles AI/ML tasks such as dubbing (using deep learning for TTS), subtitle generation, and possibly note creation.
• File structure hints at separation between raw uploads, final dubbed outputs, and subtitles. This indicates a pipeline where videos are processed and outputs are stored in designated folders.
d. Database:
• MongoDB is used as the primary data store as indicated in the README and the project’s MERN architecture.
e. AI/ML Services:
• Although not explicitly named as a separate module in the file tree, the reference to deep learning models for ASR, TTS, and NLP should be clearly represented.
• This could be depicted as an “AI Processing Module” that interacts with the Python APIs as well as possibly the Node.js backend.
f. DevOps/Deployment Elements:
• Not in-depth in the file tree but the README references Docker, Kubernetes, and CI/CD. It’s useful to include an “Infrastructure” or “Deployment” component that touches on containerization and automated deployment pipelines.
Relationships & Data Flow
• The React frontend and the Node.js/Express backend (e.g., API calls for user authentication, course data, media uploads/downloads).
• The Node.js backend and MongoDB for data storage and retrieval.
• The backend and the Python APIs, which are called to process the video files (submission for dubbing, subtitle generation, and note extraction).
• External services (if applicable) such as payment gateways or email services should be represented as external integrations.
Architectural Patterns & Design Principles
• The project follows a modular and layered approach:
• Frontend and backend are clearly separated (MERN stack).
• A microservices-like separation exists for the Python APIs dedicated to media processing.
• The RESTful API design for backend routes with organized controllers and routers.
• Incorporate patterns such as MVC in the backend Node.js part (models, views/controllers, routes) and possibly a pipeline architecture for processing media assets in the Python API.
Technologies & Frameworks to Highlight
• Frontend: React.js (with components, state management, and routing).
• Backend: Node.js, Express.js; middleware for authentication and validation.
• Database: MongoDB.
• Python: Flask (or pure Python scripts, as suggested by the presence of app.py in the “apis/uploads” folder) for AI/ML processing.
• AI/ML: TTS, ASR, and NLP deep-learning modules for dubbing, subtitles, and notes.
• DevOps: Docker, Kubernetes, CI/CD (as per README) for deployment.
Elements
• Clearly labeled blocks for each component (e.g., "React Client", "Node.js/Express API", "Python AI Processing", "MongoDB Database", "External Services").
• From the client frontend to the backend (API calls).
• From the backend to the AI processing modules (for dubbing and subtitles).
• From the backend to the database.
• From the backend to external services (if applicable).
• Presentation (client-side UI)
• Business logic (backend controllers and services)
• Data storage (database)
• AI/ML processing units (Python modules)
• Infrastructure/deployment elements (CI/CD, Docker, etc.)
Detailed Representation
• Configuration nodes where necessary, such as “.env” files (for environment variables) and build configuration files (like package.json, vite.config.js) to indicate how the application layers are configured.
• That the Python API (located under “apis/uploads”) is a specialized component handling heavy media processing, working in tandem with the media-related controllers in the Node.js backend.