An intelligent study companion that transforms how students learn through AI-powered content generation, RAG-based Q&A, and comprehensive learning analytics.
- π API Documentation: OpenAPI Specification
- π Public URL: studdybuddy.me
- π₯ Demo Video: Watch Demo
- ποΈ Code Structure Video: Watch Code Structure Video
# Clone the repository
git clone <repository-url>
cd StudyBuddy
# Start all services
docker compose up --builddocker compose up --build backendcd frontend
npm install
npm run devor
docker compose up --build frontend# Run all backend tests with coverage
docker compose -f backend/docker-compose.test.yml up --build --abort-on-container-exitcd backend
pip install -r requirements.txt
pytest
# With coverage
pytest --cov=app --cov-report=htmlcd frontend
npm test
# With coverage
npm run coveragecd e2e
npm test
# Specific test suite
npm run test:demo:auth
npm run test:demo:chat
npm run test:demo:billing# Backend - specific test file
pytest tests/chat/test_chat_service.py
# Backend - specific test method
pytest tests/chat/test_chat_service.py::test_create_chat_session
# Frontend - specific component
npm test -- --testNamePattern="ChatInterface"
# E2E - specific feature
npx playwright test chat --headedWe maintain 80%+ test coverage across all components:
- Backend: 80%+ (Unit + Integration tests)
- Frontend: 75%+ (Component + UI tests)
- E2E: 60%+ (End-to-end scenarios)
StudyBuddy/
βββ π API_DOCUMENTATION/ # OpenAPI specifications
βββ π Database/ # SQL schemas and migrations
βββ π Design/ # System design documents
β βββ BPMN/ # Business process models
β βββ Class Diagram/ # UML diagrams
β βββ Layered Architecture/ # Architecture documentation
βββ π backend/ # FastAPI backend service
β βββ app/ # Application code
β β βββ ai/ # AI service integrations
β β βββ auth/ # Firebase authentication
β β βββ billing/ # Payment processing
β β βββ chat/ # Chat functionality
β β βββ content_generator/ # AI content generation
β β βββ document_upload/ # File processing & RAG
β β βββ quiz_generator/ # Quiz creation
β β βββ rag/ # Retrieval-Augmented Generation
β β βββ core/ # Database & vector DB
β βββ tests/ # Comprehensive test suite
β βββ docker-compose.test.yml # Test configuration
βββ π frontend/ # React + TypeScript frontend
β βββ src/
β β βββ components/ # UI components
β β β βββ admin/ # Admin dashboard
β β β βββ auth/ # Authentication
β β β βββ billing/ # Payment UI
β β β βββ chatbot/ # Chat interface
β β β βββ content/ # Content management
β β β βββ quiz/ # Quiz interface
β β βββ pages/ # Route components
β β βββ lib/ # Utilities & API calls
β βββ tests/ # Frontend test suite
βββ π e2e/ # Playwright E2E tests
βββ docker-compose.yml # Main orchestration
StudyBuddy is a comprehensive AI-powered learning platform that revolutionizes education through intelligent content generation, advanced document processing, and personalized learning experiences.
- Advanced document processing with text chunking and embedding generation
- Vector database integration (ChromaDB + PostgreSQL)
- Semantic search for intelligent content retrieval
- Context-aware question answering
- Google Gemini: Primary chat and content generation
- OpenAI-compatible models: Extensible AI service architecture
- Dynamic model switching based on use case
- Intelligent prompt engineering and response formatting
- AI-powered flashcard creation from documents
- Automatic quiz generation with multiple difficulty levels
- Slide presentation generation
- Content versioning and history tracking
- QDRANT Cloud integration for semantic similarity search
- PostgreSQL for structured data storage
- Hybrid search capabilities combining vector and traditional queries
- Efficient document embedding and retrieval
- Docker containerization for scalable deployment
- PostgreSQL database with advanced indexing
- File upload and processing pipeline
- Firebase
- Automated backup and migration systems
- Secure payment gateway integration
- Subscription management
- Usage-based billing for AI features
- Admin billing controls and monitoring
- Premium content access controls
- AI generation credits system
- Tiered subscription models
- Payment success/failure handling
- Secure user authentication and authorization
- Role-based access control (Admin/User)
- JWT token management
- Email verification and password reset
- Encrypted data transmission
- Secure file upload and storage
- User data privacy compliance
- Content moderation system
- Quiz performance tracking
- Content engagement metrics
- User progress monitoring
- AI usage analytics
- User management interface
- Content moderation tools
- System health monitoring
- Billing and payment oversight
- Framework: FastAPI with async/await support
- Database: PostgreSQL with SQLAlchemy ORM
- Vector DB: QDRANT for semantic search
- AI Services: Google Gemini integration
- Authentication: Firebase Admin SDK
- Testing: Pytest with 80%+ coverage
- Framework: React 18 with TypeScript
- Styling: Tailwind CSS + Shadcn/ui components
- State Management: React Query for server state
- Routing: React Router for SPA navigation
- Testing: Vitest + Testing Library
- Containerization: Docker with multi-stage builds
- Orchestration: Docker Compose for local development
- E2E Testing: Playwright with comprehensive scenarios
- CI/CD: GitHub Actions
- Smart Document Processing: Upload PDFs, generate embeddings, create searchable knowledge base
- Intelligent Chat System: Context-aware conversations with document-based responses
- Automated Content Creation: Generate flashcards, quizzes, and presentations from documents
- Real-time Collaboration: Live chat with AI tutoring capabilities
- Progress Tracking: Comprehensive analytics for learning outcomes
- Multi-tenant Architecture: Support for multiple users with data isolation
- Responsive Design: Mobile-first UI with cross-platform compatibility
- Docker & Docker Compose
- Node.js 18+ (for local frontend development)
- Python 3.9+ (for local backend development)
- Copy
.env.exampleto.envin backend directory - Configure Firebase credentials in
backend/keys/firebaseKey.json - Set up database connection strings
- Configure AI service API keys
- Start services:
docker compose up --build - Backend runs on:
http://localhost:8000 - Frontend runs on:
http://localhost:3000 - API docs available at:
http://localhost:8000/docs
- Fork the repository
- Create feature branch:
git checkout -b feature/amazing-feature - Write tests for your changes
- Ensure all tests pass:
npm test/pytest - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue in the repository
- Contact the development team
- Check the API documentation for implementation details
Built with β€οΈ by the StudyBuddy team - Transforming education through AI