Transform static educational content into dynamic, AI-powered interactive lessons
Features β’ Tech Stack β’ Getting Started β’ Architecture β’ API Documentation
GnyanSetu (Bridge to Knowledge) is an advanced AI-powered learning platform that revolutionizes education by converting static study materials into interactive, personalized learning experiences. The platform combines cutting-edge AI technology with real-time visualization and adaptive learning mechanisms.
- π Interactive AI Teaching - Not just content, but a virtual teacher that explains step-by-step
- π¨ Visual Learning - Dynamic whiteboard with animations, diagrams, and real-time drawing
- π Smart Assessment - AI-generated quizzes that adapt to your learning pace
- π Intelligent Notes - Auto-generated, organized notes with key concepts highlighted
- β‘ Real-time Interaction - WebSocket-powered live learning experience
- π Progress Tracking - Comprehensive analytics to monitor learning journey
- Drag-and-drop interface for easy file upload
- Supports PDFs up to 50MB
- Intelligent text extraction with PyMuPDF
- OCR support for scanned documents
- Automatic content structuring
- Google Gemini AI integration for content analysis
- Breaks complex topics into digestible steps
- Context-aware explanations
- Adaptive difficulty levels
- Multi-format content support (PDF, text, images)
- Real-time Canvas Rendering with Konva.js
- Dynamic text animation (typewriter effect)
- Shape drawing (rectangles, circles, arrows, lines)
- Color-coded elements for better understanding
- Step-by-step progression with visual cues
- Fullscreen mode for immersive learning
- Export whiteboard content as images
- Automatic question generation from lesson content
- Multiple question types (MCQ, True/False, Fill blanks, Short answer)
- Instant feedback with explanations
- Score tracking and analytics
- Adaptive difficulty system
- AI-generated summaries of lessons
- Key points extraction
- Downloadable PDF with formatting
- Searchable note database
- Highlighting and annotations support
- Google OAuth 2.0 integration
- Email/password authentication with JWT
- User profiles and dashboards
- Learning history tracking
- Microservices architecture
- API Gateway (Port 8000)
- WebSocket real-time communication
- MongoDB database
- RESTful APIs
- Comprehensive logging
| Service | Technology | Port | Purpose |
|---|---|---|---|
| API Gateway | Flask 2.3 | 8000 | Request routing, load balancing |
| User Service | Django 4.2 + DRF | 8002 | Authentication, user management |
| Lesson Service | Django 4.2 + DRF | 8003 | PDF processing, AI lesson generation |
| Teaching Service | Django 4.2 + Channels | 8004 | WebSocket, real-time teaching |
| Quiz Service | FastAPI (Planned) | 8005 | Quiz generation and management |
| Notes Service | FastAPI (Planned) | 8006 | Notes generation and storage |
- Django 4.2.16 - Web framework with ORM
- Django REST Framework - RESTful API development
- Channels & Daphne - WebSocket and ASGI server
- Flask 2.3 - Lightweight API gateway
- FastAPI (Planned) - Modern, fast API framework for Quiz/Notes services
- Google Generative AI (Gemini Pro) - Content generation and analysis
- LangChain - AI orchestration and prompt management
- OpenAI API - Alternative AI model support
- MongoDB 4.4+ - Primary NoSQL database
- Motor - Async MongoDB driver
- PyMongo - Sync MongoDB driver
- Redis - Caching and session storage
- Celery - Distributed task queue
- React 18 - Component-based UI library
- Tailwind CSS 3 - Utility-first styling
- Framer Motion - Smooth animations
- Konva.js - Canvas rendering for whiteboard
- jsPDF - Client-side PDF generation
- Lucide React - Modern icon library
- Axios - HTTP client
- Git - Version control
- Docker (Planned) - Containerization
- Nginx (Planned) - Reverse proxy
- pytest - Testing framework
- ESLint - JavaScript linting
- Black - Python code formatting
GnyanSetu/
β
βββ microservices/ # Backend microservices
β β
β βββ api-gateway/ # Port 8000 - Flask API Gateway
β β βββ app.py # Main gateway application
β β βββ config.py # Service registry configuration
β β βββ requirements.txt # Gateway dependencies
β β βββ README.md # Gateway documentation
β β
β βββ user-service-django/ # Port 8002 - User Management
β β βββ accounts/ # User authentication app
β β β βββ models.py # User models
β β β βββ views.py # Auth endpoints
β β β βββ serializers.py # DRF serializers
β β β βββ urls.py # URL routing
β β βββ manage.py # Django management
β β βββ settings.py # Django configuration
β β βββ requirements.txt # Service dependencies
β β βββ .env.example # Environment variables template
β β
β βββ lesson-service/ # Port 8003 - Lesson Generation
β β βββ lessons/ # Lesson app
β β β βββ views.py # API endpoints
β β β βββ models.py # Lesson models
β β β βββ ai_engine.py # AI lesson generator
β β βββ pdf_processor/ # PDF extraction module
β β βββ manage.py
β β βββ requirements.txt
β β βββ celery_config.py # Async task configuration
β β
β βββ teaching-service/ # Port 8004 - Real-time Teaching
β β βββ teaching/ # Teaching app
β β β βββ consumers.py # WebSocket consumers
β β β βββ views.py # API endpoints
β β β βββ models.py # Teaching models
β β β βββ routing.py # WebSocket routing
β β βββ manage.py
β β βββ requirements.txt
β β
β βββ quiz-service/ # Port 8005 - Quiz Management (Planned)
β β βββ main.py # FastAPI application
β β βββ models.py # Pydantic models
β β βββ quiz_generator.py # AI quiz generation
β β βββ routes/ # API routes
β β βββ requirements.txt
β β
β βββ notes-service/ # Port 8006 - Notes Generation (Planned)
β β βββ main.py # FastAPI application
β β βββ models.py # Pydantic models
β β βββ notes_generator.py # AI notes generation
β β βββ pdf_export.py # PDF export functionality
β β βββ requirements.txt
β β
β βββ requirements.txt # Microservices dependencies
β βββ start_project.bat # All services startup script
β βββ logs/ # Service logs directory
β
βββ virtual_teacher_project/ # Legacy Django Project
β βββ teacher_app/ # Core teaching application
β β βββ views.py # API endpoints
β β βββ consumers.py # WebSocket handlers
β β βββ models.py # Django models
β β βββ mongo.py # MongoDB integration
β β βββ urls.py # URL routing
β β
β βββ UI/ # Frontend applications
β β β
β β βββ landing_page/ # Landing & Auth (Port 3000)
β β β βββ src/
β β β β βββ App.jsx # Main landing component
β β β β βββ components/
β β β β β βββ Hero.jsx
β β β β β βββ Features.jsx
β β β β β βββ LoginModal.jsx
β β β β β βββ SignupModal.jsx
β β β β βββ index.js
β β β βββ public/
β β β βββ package.json
β β β βββ tailwind.config.js
β β β
β β βββ Dashboard/ # Main Dashboard (Port 3001)
β β βββ Dashboard/
β β βββ src/
β β β βββ App.jsx
β β β βββ components/
β β β β βββ Whiteboard.jsx # Interactive canvas
β β β β βββ TeachingCanvas.jsx # Drawing engine
β β β β βββ UploadBox.jsx # PDF upload
β β β β βββ Quiz.jsx # Quiz component
β β β β βββ Notes.jsx # Notes viewer
β β β β βββ ChatHistory.jsx # Conversation history
β β β β βββ SessionManager.jsx # State management
β β β βββ utils/
β β β β βββ api.js # API client
β β β β βββ websocket.js # WebSocket client
β β β βββ index.js
β β βββ public/
β β βββ package.json
β β βββ tailwind.config.js
β β
β βββ virtual_teacher_project/ # Django project settings
β β βββ settings.py # Configuration
β β βββ urls.py # Main URL routing
β β βββ asgi.py # ASGI application
β β βββ wsgi.py # WSGI application
β β
β βββ manage.py
β βββ requirements.txt
β βββ .env.example
β
βββ requirements.txt # Consolidated project dependencies
βββ .gitignore # Git ignore rules
βββ .env.example # Environment variables template
βββ README.md # This file
βββ LICENSE # MIT License
βββ CONTRIBUTING.md # Contribution guidelines
βββ docker-compose.yml # Docker configuration (Planned)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Client Layer β
β ββββββββββββββββββ ββββββββββββββββββ β
β β Landing Page β β Dashboard β β
β β (Port 3000) β β (Port 3001) β β
β β - Auth UI β β - Whiteboard β β
β β - Google OAuthβ β - Quiz UI β β
β ββββββββββ¬ββββββββ βββββββββ¬βββββββββ β
βββββββββββββΌββββββββββββββββββββββββββΌβββββββββββββββββ
β β
βΌ βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β API Gateway (Port 8000) β
β - Request Routing β
β - Load Balancing β
β - Service Discovery β
β - Health Checks β
ββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
β
ββββββββββββΌβββββββββββ¬βββββββββββ¬βββββββββββ
βΌ βΌ βΌ βΌ βΌ
βββββββββββββββ ββββββββββ ββββββββββ ββββββββ ββββββββ
βUser Service β βLesson β βTeachingβ βQuiz β βNotes β
β(Port 8002) β βService β βService β βSvc β β Svc β
β β β(8003) β β(8004) β β(8005)β β(8006)β
β- Auth β β β β β β β β β
β- Google β β- PDF β β- WS β β- Gen β β- Gen β
β OAuth β β Uploadβ β- Real β β- Evalβ β- PDF β
β- JWT β β- AI Genβ β time β β β β β
β- Users CRUD β β- Store β β- Teach β β β β β
ββββββββ¬βββββββ βββββ¬βββββ βββββ¬βββββ βββββ¬βββ βββββ¬βββ
β β β β β
ββββββββββββββ΄βββββββββββ΄βββββββββββ΄βββββββββ
β
βΌ
ββββββββββββββββββββββββββ
β MongoDB β
β - users β
β - lessons β
β - conversations β
β - quizzes β
β - notes β
β - progress β
ββββββββββββββββββββββββββ
β
ββββββββββββββ΄βββββββββββββ
β β
βΌ βΌ
βββββββββββββββ ββββββββββββββββ
β Redis β β Celery β
β Cache β β Task Queue β
βββββββββββββββ ββββββββββββββββ
Ensure you have the following installed:
- Python 3.8+ - Download
- Node.js 16+ - Download
- MongoDB 4.4+ - Download
- Git - Download
- Google API Key - Get Key
# 1. Clone the repository
git clone https://github.com/AaryaKhatate/GnyanSetu.git
cd GnyanSetu
# 2. Run the automated startup script
cd microservices
start_project.batThis will automatically:
- β Install all Python dependencies
- β Install all Node.js dependencies
- β Start MongoDB
- β Start all microservices (Ports 8000-8004)
- β Start React applications (Ports 3000, 3001)
- β Open browser to landing page
git clone https://github.com/AaryaKhatate/GnyanSetu.git
cd GnyanSetu# Create and activate virtual environment
python -m venv venv
# Windows
venv\Scripts\activate
# Linux/Mac
source venv/bin/activate
# Install dependencies
pip install -r requirements.txtCreate .env files in each service directory:
microservices/user-service-django/.env
SECRET_KEY=your-django-secret-key-here
DEBUG=True
MONGODB_URI=mongodb://localhost:27017/gnyansetu
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
JWT_SECRET_KEY=your-jwt-secret-keymicroservices/lesson-service/.env
GOOGLE_API_KEY=your-gemini-api-key
MONGODB_URI=mongodb://localhost:27017/gnyansetu
CELERY_BROKER_URL=redis://localhost:6379/0microservices/teaching-service/.env
MONGODB_URI=mongodb://localhost:27017/gnyansetu
REDIS_URL=redis://localhost:6379/1Open 4 separate terminals:
# Terminal 1 - API Gateway (Port 8000)
cd microservices/api-gateway
python app.py
# Terminal 2 - User Service (Port 8002)
cd microservices/user-service-django
python manage.py runserver 8002
# Terminal 3 - Lesson Service (Port 8003)
cd microservices/lesson-service
python manage.py runserver 8003
# Terminal 4 - Teaching Service (Port 8004)
cd microservices/teaching-service
daphne -b 0.0.0.0 -p 8004 teaching_service.asgi:applicationOpen 2 more terminals:
# Terminal 5 - Landing Page (Port 3000)
cd virtual_teacher_project/UI/landing_page/landing_page
npm install
npm start
# Terminal 6 - Dashboard (Port 3001)
cd virtual_teacher_project/UI/Dashboard/Dashboard
npm install
set PORT=3001 && npm start # Windows
PORT=3001 npm start # Linux/Mac- π Landing Page: http://localhost:3000
- π Dashboard: http://localhost:3001
- π§ API Gateway: http://localhost:8000/health
| Method | Endpoint | Description | Request Body |
|---|---|---|---|
| POST | /api/v1/auth/signup/ |
Register new user | {full_name, email, password, password_confirm, username} |
| POST | /api/v1/auth/login/ |
User login | {email, password} |
| POST | /api/v1/auth/logout/ |
User logout | - |
| POST | /api/v1/auth/google/ |
Google OAuth login | {credential} |
| GET | /api/v1/users/profile/ |
Get user profile | Headers: Authorization: Bearer <token> |
| PUT | /api/v1/users/profile/ |
Update profile | {full_name, email} |
| GET | /api/v1/health/ |
Health check | - |
| Method | Endpoint | Description | Request Body |
|---|---|---|---|
| POST | /api/upload/ |
Upload PDF file | FormData: {file: <pdf>} |
| POST | /api/generate-lesson/ |
Generate AI lesson | {topic, pdf_text, difficulty} |
| GET | /api/lessons/ |
Get all lessons | Query: ?user_id=<id> |
| GET | /api/lessons/<id>/ |
Get specific lesson | - |
| DELETE | /api/lessons/<id>/ |
Delete lesson | - |
| GET | /health |
Health check | - |
| Method | Endpoint | Description | Request Body |
|---|---|---|---|
| GET | /api/conversations/ |
Get conversations | Query: ?user_id=<id> |
| POST | /api/conversations/create/ |
Create conversation | {user_id, lesson_id, topic} |
| DELETE | /api/conversations/<id>/ |
Delete conversation | - |
| GET | /api/teaching/<session_id>/ |
Get teaching session | - |
| WS | /ws/teaching/<session_id>/ |
WebSocket connection | - |
| GET | /health |
Health check | - |
| Method | Endpoint | Description | Request Body |
|---|---|---|---|
| POST | /api/quizzes/generate/ |
Generate quiz | {lesson_id, question_count, difficulty} |
| GET | /api/quizzes/<lesson_id>/ |
Get quizzes | - |
| POST | /api/quizzes/<quiz_id>/submit/ |
Submit answers | {answers: [{question_id, answer}]} |
| GET | /api/quizzes/<quiz_id>/results/ |
Get quiz results | - |
| GET | /api/quizzes/<quiz_id>/review/ |
Review quiz with answers | - |
| Method | Endpoint | Description | Request Body |
|---|---|---|---|
| POST | /api/notes/generate/ |
Generate notes | {lesson_id, format, detail_level} |
| GET | /api/notes/<lesson_id>/ |
Get notes | - |
| GET | /api/notes/<note_id>/download/ |
Download as PDF | Query: ?format=pdf |
| PUT | /api/notes/<note_id>/ |
Update notes | {content, highlights} |
| POST | /api/notes/<note_id>/export/ |
Export notes | `{format: 'pdf' |
Connection URL: ws://localhost:8004/ws/teaching/<session_id>/
Client β Server Messages:
// Start lesson
{
"type": "start_lesson",
"lesson_id": "12345",
"user_id": "user_abc"
}
// Request next step
{
"type": "next_step"
}
// Pause lesson
{
"type": "pause"
}Server β Client Messages:
// Lesson step
{
"type": "step",
"step": 1,
"total_steps": 10,
"speech_text": "Let's learn about...",
"drawing_commands": [
{
"type": "text",
"text": "Hello World",
"x": 100,
"y": 50,
"fontSize": 24,
"color": "#000000"
}
]
}
// Lesson complete
{
"type": "lesson_complete",
"quiz_available": true,
"notes_available": true
}- Microservices architecture
- PDF upload and processing
- AI lesson generation (Gemini 2.0)
- Real-time whiteboard with WebSocket
- User authentication (Google OAuth + JWT)
- Interactive teaching canvas
- Visualization service with percentage-based coordinates
- Quiz system improvements
- Notes generation enhancements
- Performance optimization
- Mobile responsiveness
- Mobile application
- Video integration
- Advanced analytics
- Multi-language support
- Gamification
- Docker containerization
- Cloud deployment
- Performance optimization
- Security audits
We welcome contributions! Here's how:
- Fork the repository
- Create a branch:
git checkout -b feature/YourFeature - Make your changes
- Commit:
git commit -m 'Add YourFeature' - Push:
git push origin feature/YourFeature - Open a Pull Request
- Follow PEP 8 for Python
- Use ESLint for JavaScript
- Write meaningful commit messages
- Add tests for new features
- Update documentation
This project is licensed under the MIT License - see the LICENSE file for details.
- Aarya Khatate - @AaryaKhatate
- Vinay Gone - @VinayGone2006
- Yashraj Patil - @Yashrajpatil22
- Email: [email protected]
- Issues: Report Bug
- Features: Request Feature
- Google Gemini AI for language models
- MongoDB for database solutions
- React and Django communities
- All contributors and supporters
Made with β€οΈ for Education
GnyanSetu - Building Bridges to Knowledge
β Star this repository if you find it helpful!