How alen-saji-05/elearn works
LearnHub supports student learning, mentor course authoring, and administration. The principal journey is course discovery, enrollment/payment, then lesson access and progress; identity, chat, reviews, search, and notifications are supporting capabilities. Sampled frontend code establishes routing, auth API calls, and WebSocket use; sampled payment code establishes Stripe’s payment-to-enrollment flow. Other feature links reflect README capabilities and app boundaries, not inspected call wiring.
Main entry points: services.py Payment service · App.jsx App routing · axios.js HTTP API client · chat Real-time Q&A
Components 23
Web client
- App routing
frontend/src/App.jsx - Auth context
frontend/src/context/AuthContext.jsx - Course pages
frontend/src/pages/CourseList.jsx - Lesson player
frontend/src/pages/LessonPlayer.jsx - Checkout page
frontend/src/pages/Checkout.jsx - HTTP API client
frontend/src/api/axios.js - Chat socket hook
frontend/src/hooks/useWebSocket.js
Learning domain
- Courses and lessons
backend/apps/courses - Enrollment and progress
backend/apps/enrollments - Course search
backend/apps/search
Identity and commerce
- Users and roles
backend/apps/users - Payment service
backend/apps/payments/services.py - Payment records
backend/apps/payments/models.py
Engagement
- Real-time Q&A
backend/apps/chat - Ratings and reviews
backend/apps/reviews - Notifications
backend/apps/notifications
Other components
- Learner / mentor / admin
- PostgreSQL
- Redis
- Elasticsearch
- Stripe
- PayPal
- Email service
Connections 26
- Learner / mentor / admin → App routing: uses
- App routing → Auth context: provides auth
- App routing → Course pages: routes to
- App routing → Lesson player: routes to
- App routing → Checkout page: routes to
- Auth context → HTTP API client: calls
- HTTP API client → Users and roles: auth requests
- Course pages → HTTP API client: requests data
- Lesson player → HTTP API client: requests data
- Checkout page → HTTP API client: requests payment
- Payment service → Payment records: creates and updates
- Payment service → Stripe: creates sessions
- Payment service → Stripe: verifies and refunds
- Payment service → Enrollment and progress: creates enrollment
- Payment service → Courses and lessons: updates enrollment count
- Chat socket hook → Real-time Q&A: opens socket
- Course search → Elasticsearch: searches index
- Real-time Q&A → Redis: uses channel layer
- Notifications → Email service: sends email
- Users and roles → PostgreSQL: persists data
- Courses and lessons → PostgreSQL: persists data
- Enrollment and progress → PostgreSQL: persists data
- Payment records → PostgreSQL: persists data
- Ratings and reviews → PostgreSQL: persists data
- Real-time Q&A → PostgreSQL: persists messages
- Notifications → PostgreSQL: persists notices