- Go to Firebase Console
- Create a new project
- Enable Authentication with Email/Password
- Create a Firestore database
- Generate a service account key and download as
firebase-key.json - Update Firestore security rules:
rules_version = '2'; service cloud.firestore { match /databases/{database}/documents { match /chats/{chatId} { allow read, write: if request.auth != null && request.auth.uid == resource.data.uid; } } }
- Get an API key from OpenAI
- Add it to your backend
.envfile - Ensure you have sufficient credits for API usage
- Sign Up/Login: Create an account or sign in with existing credentials
- Upload Materials: Click the upload area to add PDF study materials
- Enable Webcam: Allow camera access for emotion detection
- Start Chatting: Ask questions about your study materials
- View History: Access previous conversations from the sidebar
- The webcam automatically detects your emotional state every 5 seconds
- AI responses adapt based on detected emotions
- Webcam window is draggable and can be hidden
- New Chat: Start fresh conversations
- Chat History: View and restore previous conversations
- Clear History: Delete all chat history
- Individual Deletion: Remove specific conversations
- Supports PDF documents
- Automatic processing and indexing
- Secure storage in Firebase
POST /api/upload-pdf- Upload and process PDF documentsPOST /api/ask- Send questions to AI with emotion contextPOST /api/detect-emotion- Analyze webcam image for emotion detection
// Upload PDF
const formData = new FormData();
formData.append('file', pdfFile);
fetch('/api/upload-pdf', { method: 'POST', body: formData });
// Ask Question
fetch('/api/ask', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ question: 'Your question', emotion: 'happy' })
});- Authentication: Firebase Authentication for user management
- Data Protection: Firestore security rules ensure user data isolation
- API Security: Backend validates all requests
- Privacy: User data is encrypted and stored securely
- Clean Design: Minimalistic white theme
- Responsive Layout: Works on all device sizes
- ChatGPT-like Interface: Familiar chat experience
- Smooth Animations: Professional transitions and effects
- Accessibility: Screen reader friendly with proper ARIA labels
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI for providing the AI capabilities
- Firebase for authentication and database services
- React and Flask communities for excellent documentation
- Computer vision libraries for emotion detection
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue with detailed information
- Contact the development team
- v1.0.0 - Initial release with basic chat functionality
- v1.1.0 - Added emotion detection
- v1.2.0 - Implemented chat history and user authentication
- v1.3.0 - Redesigned UI with ChatGPT-like interface
- Frontend: Optimized React components with lazy loading
- Backend: Efficient API responses with caching
- Database: Indexed queries for fast data retrieval
- Emotion Detection: Real-time processing with minimal latency
Made with ❤️ by the EmoTutor Team
Empowering education through emotion-aware AI technology