Build Basic AI Tutor / Q&A Chatbot#11
Open
NiteshBadgujar wants to merge 3 commits intoGDGC-MET:mainfrom
Open
Conversation
…messaging features - Added main App component with gradient background and ChatContainer integration. - Created ChatContainer component to manage chat UI and state. - Developed ChatInput component with quick suggestions and message sending functionality. - Implemented ChatMessage component for displaying individual messages with animations. - Built ChatWindow component to show messages and loading indicators. - Added SubjectSelector for selecting subjects with chip-style buttons. - Integrated AI service for handling chat responses and error management. - Established custom hooks for managing chat state and interactions. - Designed responsive styles using Tailwind CSS for a modern UI. - Included SVG assets and CSS for branding and visual effects. - Set up TypeScript types for messages, subjects, and API requests.
…I Tutor - Introduced PROJECT_OVERVIEW.md for project architecture and metrics. - Created README.md as a documentation index for easy navigation. - Added TESTING_GUIDE.md detailing backend, frontend, and performance tests. - Updated server environment configuration to integrate Google Gemini API. - Refactored aiService.js to utilize Google Gemini for AI responses. - Enhanced .gitignore for better security and organization. - Improved ChatMessage component with memoization for performance.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🧠 Pull Request: Build Basic AI Tutor / Q&A Chatbot
🔢 Related Issue
Closes #2 — Build Basic AI Tutor / Q&A Chatbot
📋 Summary
This PR adds the initial implementation of the AI Tutor / Question-Answer Bot as described in Issue #1.
The chatbot allows users to ask subject-based questions (e.g., Math, Biology) and get AI-generated explanations.
All relevant documentation and setup guides are now included inside the
/docsfolder for contributors and reviewers.🧩 Core Features Implemented
🔒 Security & Environment Setup
.env.examplefile for API key configuration.gitignoreto exclude.envand local configsUSE_MOCK=true) for contributors or CI to test without secrets/api/ask) handles all external LLM calls securely — no keys exposed in frontend⚙️ How to Run Locally
Copy .env.example to .env
bash
Copy code
cp .env.example .env
Add your API key inside .env (or set USE_MOCK=true to use mock responses).
Run the app:
bash
Copy code
npm install
npm run dev
Open http://localhost:3000 and test the chat interface.
💡 Tech Stack
Frontend: React / Next.js
Backend: Node.js + Express
AI Provider: OpenAI or Hugging Face API (through backend proxy)
🚀 Future Enhancements (Planned)
🔉 Voice input (speech-to-text)
💾 Save recent Q&A history
📚 Multi-subject support with dynamic models
🧱 Folder Structure (Simplified)
pgsql
Copy code
/frontend
├── components/
│ ├── ChatBox.jsx
│ └── Message.jsx
├── pages/
│ └── index.jsx
└── .env.example
/backend
├── server.js
└── package.json
🤝 Contribution Notes
If you’re contributing:
Fork the repository
Create a branch — feature/ai-tutor-bot
Commit your updates
Push and open a PR to main
Mention this issue in your PR description
✅ Checklist
Chat interface functional
Backend API integrated securely
Mock testing enabled
.env not committed
Documentation updated