Skip to content

feat(chatbot): Add AI ChatBot module with backend services, frontend drawer component, and E2E tests - #1201

Open
sugrivapardhavaajith-alt wants to merge 4 commits into
vicharanashala:mainfrom
sugrivapardhavaajith-alt:ChatBot
Open

sugrivapardhavaajith-alt wants to merge 4 commits into
vicharanashala:mainfrom
sugrivapardhavaajith-alt:ChatBot

Conversation

@sugrivapardhavaajith-alt

@sugrivapardhavaajith-alt sugrivapardhavaajith-alt commented Jul 31, 2026 •

Copy link
Copy Markdown

Uploading Screenshot 2026-07-31 192000.png…
📌 Summary
This PR introduces the AI ChatBot feature to the platform. It integrates a dedicated chatbot backend module, a Python AI engine service, an interactive frontend UI component (ChatbotDrawer), and end-to-end automated tests.


🚀 Key Changes

⚙️ Backend & Infrastructure

  • ChatBot Module (backend/src/modules/chatbot/):
    • Implemented ChatbotController for handling API requests/responses.
    • Implemented ChatbotService and input validation (ChatbotValidators).
    • Added module container configuration and main exports.
  • Python AI Engine (backend/src/modules/chatbot/python/):
    • Integrated chatbot_service.py & main.py for handling AI processing.
  • Database & Auth Support:
    • Enhanced MongoDB provider and User Repository (MongoDatabase.ts, UserRepository.ts).
    • Adjusted BaseService, AI config, and Firebase Auth handling.
  • Dev Utilities:
    • Added backend/scripts/dev-with-memory-db.js for standalone development and testing.

🎨 Frontend & UI

  • ChatBot Interface (frontend/src/components/chatbot/ChatbotDrawer.tsx):
    • Built an interactive drawer interface for conversing with the AI assistant.
  • Navigation Integration (StudentSidebar.tsx):
    • Integrated the ChatBot launcher directly into the student navigation sidebar.
  • API Client & Firebase (api-client.ts, firebase.ts):
    • Configured client-side API routing and authentication header support for ChatBot endpoints.

🧪 Testing

  • E2E Test Suite (e2e/tests/chatbot.spec.ts):
    • Added Playwright automated tests to verify ChatBot UI interactions, message sending, and response rendering.

🔍 How to Test

  1. Backend: Run pnpm --filter backend dev (or node scripts/dev-with-memory-db.js). Verify that /api/v1/chatbot endpoints respond correctly.
  2. Frontend: Launch the student dashboard, open the sidebar, click on the ChatBot icon/button, and verify smooth message sending and response handling in ChatbotDrawer.
  3. Automated E2E Tests: Run npx playwright test e2e/tests/chatbot.spec.ts to verify integration tests pass cleanly.

@github-actions github-actions Bot added frontend Changes to the frontend of the project dependencies Modifications to any frontend or backend external dependencies backend labels Jul 31, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend dependencies Modifications to any frontend or backend external dependencies frontend Changes to the frontend of the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant