How ljiah/learning-english works
Learning English is an AI-driven English-learning platform: learners use the Vue app for AI chat, vocabulary practice, courses and account features, backed by separate business and AI NestJS services. The graph also shows shared infrastructure and the tracker SDK. README documents the broader feature set; source excerpts confirm selected call paths, so unsampled subsystem connections are shown only where documented.
Main entry points: App.vue App shell · index.vue Course learning · user.service.ts User and authentication · chat.service.ts Chat orchestration
Components 29
Web app
- App shell
apps/web/src/App.vue - Login and account UI
apps/web/src/components/Login/index.vue - User state
apps/web/src/stores/user.ts - AI chat UI
apps/web/src/views/Chat/index.vue - Vocabulary practice
apps/web/src/views/WordBook/index.vue - Course learning
apps/web/src/views/Course/index.vue - Course purchase UI
apps/web/src/views/Course/components/Pay.vue
Business service
- Business API
server/apps/server/src/main.ts - User and authentication
server/apps/server/src/user/user.service.ts - User request validation
server/apps/server/src/user/dto - Word-book service
server/apps/server/src/word-book/word-book.service.ts - Course service
server/apps/server/src/course/course.service.ts - Learning progress
server/apps/server/src/learn/learn.service.ts - Payment service
server/apps/server/src/pay/pay.service.ts - Payment notifications
server/apps/server/src/socket/socket.gateway.ts - Tracker API
server/apps/server/src/tracker/tracker.controller.ts - Tracker ingestion
server/apps/server/src/tracker/tracker.service.ts
AI service
- AI API
server/apps/ai/src/chat/chat.controller.ts - Chat orchestration
server/apps/ai/src/chat/chat.service.ts - Chat modes and prompts
server/apps/ai/src/prompt/prompt.mode.ts - LLM configuration
server/apps/ai/src/llm/llm.config.ts - Daily word reports
server/apps/ai/src/digest/digest.service.ts
Shared services
- PostgreSQL
- MinIO object storage
- SMTP email
Usage tracking
- Tracker SDK
apps/tracker/index.ts - Visitor fingerprint
apps/tracker/src/uv/index.ts - PV, events, errors, vitals
apps/tracker/src
Other components
- Learner
Connections 27
- Learner → App shell: uses
- App shell → Login and account UI: opens
apps/web/src/App.vue - Login and account UI → User and authentication: registers or logs in
- User and authentication → User request validation: validates requests
server/apps/server/src/user/user.controller.ts - App shell → User state: tracks user state
apps/web/src/App.vue - Learner → AI chat UI: chats
- AI chat UI → AI API: streams chat
- AI API → Chat orchestration: calls
server/apps/ai/src/chat/chat.controller.ts - Chat orchestration → Chat modes and prompts: uses modes
server/apps/ai/src/chat/chat.service.ts - Chat orchestration → LLM configuration: uses model config
server/apps/ai/src/chat/chat.service.ts - Learner → Vocabulary practice: practices vocabulary
- Vocabulary practice → Word-book service: loads words and progress
- Learner → Course learning: learns courses
- Course learning → Course service: loads courses
- Course learning → Learning progress: records learning progress
- Learner → Course purchase UI: purchases courses
- Course purchase UI → Payment service: creates orders
- Payment service → Payment notifications: notifies payment success
server/apps/server/src/pay/pay.service.ts - Business API → PostgreSQL: uses Prisma data
- User and authentication → MinIO object storage: stores avatars
- Daily word reports → SMTP email: sends daily reports
- Learner → App shell: triggers tracking
apps/web/src/App.vue - App shell → Tracker SDK: initializes
apps/web/src/App.vue - Tracker SDK → Visitor fingerprint: gets visitor ID
apps/tracker/index.ts - Tracker SDK → PV, events, errors, vitals: starts collectors
apps/tracker/index.ts - PV, events, errors, vitals → Tracker API: reports events
- Tracker API → Tracker ingestion: delegates ingestion
server/apps/server/src/tracker/tracker.controller.ts