Bongolipi is a powerful web application designed to simplify the conversion of Banglish (Bengali text written in the English alphabet) into Bangla. Alongside seamless Banglish-to-Bangla translation, the application offers features like content management, user analysis through a dashboard, chatbot integration, search functionality, PDF export, real-time collaboration, and continuous learning to enhance translation accuracy over time.
- Real-time or on-demand Banglish-to-Bangla conversion.
- Allows users to correct translation errors.
- Utilizes a custom model to ensure accurate and contextually relevant translations.
- Understands Banglish or Bangla queries and provides responses in Bangla.
- Offers answers based on user-uploaded PDFs or saved data.
- We have implemented a multi-query approach in RAG (Retrieval-Augmented Generation) to ensure more accurate and contextually relevant results.
- Manage and organize your uploaded content, including PDFs and text data.
- Easily edit, update, or delete your stored content for efficient handling.
- Provides insights into user behavior and usage patterns.
- Tracks Banglish-to-Bangla translation performance.
- Visualizes user activity with detailed metrics and charts.
- Search uploaded PDFs or profiles using Banglish or Bangla text.
- Browse and discover publicly available content with advanced filters.
- Write or edit Banglish or Bangla text and export it as a PDF document.
- AI-generated titles and descriptions for PDFs to save time.
- Enables multiple users to work on a document simultaneously.
- Built using Yjs and Lexical for smooth real-time editing.
- Incorporates user feedback to improve Banglish-to-Bangla translation accuracy.
- Enhances the model’s capabilities over time by analyzing user-provided data.
- Banglish to Bangla Conversion: Users input Banglish text, and the app converts it into Bangla using a custom-trained model.
- Chatbot: Answers user queries in Bangla, powered by intelligent processing of Banglish and Bangla inputs.
- Content Management: Organize and edit your text or PDF data efficiently.
- User Analysis Dashboard: Gain insights into user activity and translation performance.
- Search Functionality: Locate specific content easily using Banglish or Bangla keywords.
- PDF Export: Write and edit text and save it as a PDF document.
- Real-Time Collaboration: Collaborate with other users on the same document in real time.
- Continuous Learning: Reviews and incorporates data to enhance the translation model’s performance over time.
- Frontend: React, Next.js, Lexical
- Backend: Node.js, Yjs
- Database: MongoDB (or any NoSQL database)
- Real-Time Collaboration: Yjs, PubNub WebSocket
- Analytics & Dashboard: Chart.js, D3.js (or similar tools)
- PDF Generation: Custom PDF export functionality
- Machine Learning: Custom-trained Banglish-to-Bangla translation model
-
Route:
POST /api/generate -
Request Body:
{ "inputText": "onek din dhore ononto tar babar sathe bibhinno science fair-e jay." } -
Response:
{ "translatedText": "অনেক দিন ধরে অনন্ত তার বাবার সাথে বিভিন্ন সায়েন্স ফেয়ারে যায়।" } -
Generate Caption and Title: Request Body:
{ "inputText": "অনেক দিন ধরে অনন্ত তার বাবার সাথে বিভিন্ন সায়েন্স ফেয়ারে যায়, যেখানে নানা ধরনের আবিষ্কার দেখতে পায়। একবার একটি রকেট দেখে অনন্ত আরও বেশি উত্তেজিত হয়ে বলে, \u201cওয়াও, এটা তো অনেক বড় রকেট! আমি কি এমন রকেট ওড়াতে পারবো?\u201d তার বাবা হেসে বলেন, \u201cহ্যাঁ রে অনন্ত, তুমি যদি মন দিয়ে পড়াশোনা করো, তবে একদিন যখন বড় হবে, তুমি পাইলট বা প্রকৌশলী—যেটা ইচ্ছে তাই হতে পারবে।\u201d" }Response:
{ "title": "অনন্তের রকেট সপনা", "caption": "একটি সায়েন্স ফেয়ারে রকেট দেখে অনন্ত উত্তেজিত হয়ে ওঠে এবং তার বাবা তাকে পাইলট বা প্রকৌশলী হওয়ার সম্ভাবনা সম্পর্কে বলেন।" }
- Route:
POST /generate-pdf - Request Body:
{ "title": "আজকের গল্প", "caption": "আজকের গল্পটি অনন্তের স্বপ্ন নিয়ে।", "content": "আজকের গল্পটি অনন্তের স্বপ্ন নিয়ে।" } - Response: Returns a downloadable PDF.
-
Route:
POST /rag-query -
Request Body:
{ "question": "অনন্তের স্বপ্ন কী ছিল?" } -
Response:
{ "answer": "অনন্ত পাইলট হতে চেয়েছিল।" }
- Status Code:
200 OK - Response Body (example):
{ "totalUsers": 1200, "totalContents": 350, "totalPendingContributions": 45, "totalApprovedContributions": 200 }
- Status Code:
500 Internal Server Error - Response Body (example):
{ "error": "Internal server error" }
- Status Code:
200 OK - Response Body (example):
[ { "userId": "user_123", "sessionId": "abc123", "createdAt": "2025-01-04T14:00:00Z", "role": "user", "content": "Hello, how can I help you?" }, { "userId": "assistant_456", "sessionId": "abc123", "createdAt": "2025-01-04T14:01:00Z", "role": "assistant", "content": "Hi, I need help with my order." } ]
- Status Code:
401 Unauthorized- Response Body (example):
{ "error": "SessionId was not provided" }
- Response Body (example):
- Status Code:
500 Internal Server Error- Response Body (example):
{ "error": "Something went wrong. Please try again later." }
- Response Body (example):
This endpoint retrieves all unique session IDs associated with a specific user. It is useful for fetching the list of sessions a user has participated in.
- Method:
GET - Authentication: Requires authentication via Clerk. The
userIdis fetched using theClerk.getAuth()function, ensuring the request is made by an authenticated user. - Headers:
Authorization: Bearer <user_jwt_token>
- Status Code:
200 OK - Response Body (example):
{ "sessions": [ "session123", "session456", "session789" ] }
- Status Code:
500 Internal Server Error - Response Body (example):
{ "error": "Something went wrong. Please try again later." }
This endpoint allows a user to send a message in an existing session. The request includes the session ID, message content, and the role (either user or assistant).
- Method:
POST - Authentication: Requires authentication via Clerk. The
userIdis fetched using theClerk.getAuth()function. - Headers:
Authorization: Bearer <user_jwt_token> - Request Body:
{ "sessionId": "session123", "role": "user", "content": "How can I help you today?" }
- Status Code:
200 OK - Response Body (example):
{ "userId": "user_123", "sessionId": "session123", "createdAt": "2025-01-04T14:05:00Z", "role": "user", "content": "How can I help you today?" }
- Status Code:
401 Unauthorized- Response Body (example):
{ "error": "SessionId or message was not provided" }
- Response Body (example):
- Status Code:
500 Internal Server Error- Response Body (example):
{ "error": "Something went wrong. Please try again later." }
- Response Body (example):
-
Clone the repository:
git clone https://github.com/your-username/bongolipi.git cd bongolipi -
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Navigate to
http://localhost:3000in your browser to access the application.