How hamsaraj875-del/learn-flow works
LearnFlow is an Android study app backed by an Express/MongoDB server. The server workflow routes authentication, chat, document, test, and study-session requests to controllers; those controllers persist data and invoke AI services where shown. Android source paths indicate corresponding chat, session, test, focus, and account capabilities, but their wiring to one another or to the API is not established by the supplied excerpts. The graph therefore omits those speculative links; some server internals are also unsampled.
Main entry points: controller.js Chat and sessions · app.js API routes · aiResponseController.js Chat and documents · testController.js Test controller
Components 27
Android app
- Android app
App/app/src/main/java/com/example/learnflow/LearnFlowApp.kt - Chat screens
App/app/src/main/java/com/example/learnflow/chat - Study sessions
App/app/src/main/java/com/example/learnflow/session - Tests and quizzes
App/app/src/main/java/com/example/learnflow/test - Focus blocking
App/app/src/main/java/com/example/learnflow/focus - Account screens
App/app/src/main/java/com/example/learnflow/account/AccountDetails.kt
Server routing
- API routes
Server/routes/app.js - Login routes
Server/routes/login.js
Accounts
- Account controller
Server/controllers/loginController.js
Learning services
- Chat and sessions
Server/controllers/controller.js - Chat and documents
Server/controllers/aiResponseController.js - Test controller
Server/controllers/testController.js - Document responses
Server/services/ragAi.js - Question generation
Server/services/testAi.js - Answer evaluation
Server/services/testResultAi.js
Persistence
- User records
Server/models/database.js - Messages
Server/models/messages.js - MCQ records
Server/models/mcqTest.js - Written-test records
Server/models/questionTest.js - Study sessions
Server/models/studySession.js - Conversations
Server/models/conversation.js - Documents
Server/models/documents.js - Document chunks
Server/models/textChunk.js
Other components
- Learner
- AI providers
- Supabase storage
- Email service
Connections 25
- API routes → Login routes: mounts
Server/routes/app.js - API routes → Chat and sessions: routes requests
Server/routes/app.js - API routes → Chat and documents: routes requests
Server/routes/app.js - API routes → Test controller: routes requests
Server/routes/app.js - Login routes → Account controller: dispatches
Server/routes/login.js - Login routes → User records: imports model
Server/routes/login.js - Account controller → User records: reads and writes
Server/controllers/loginController.js - Account controller → Email service: sends OTP
Server/controllers/loginController.js - Chat and sessions → User records: checks users
Server/controllers/controller.js - Chat and sessions → Messages: reads and writes
Server/controllers/controller.js - Chat and sessions → Conversations: reads and writes
Server/controllers/controller.js - Chat and sessions → Study sessions: reads and writes
Server/controllers/controller.js - Chat and sessions → MCQ records: reads tests
Server/controllers/controller.js - Chat and documents → Messages: stores messages
Server/controllers/aiResponseController.js - Chat and documents → Documents: stores documents
Server/controllers/aiResponseController.js - Chat and documents → Document chunks: stores and searches chunks
Server/controllers/aiResponseController.js - Chat and documents → Document responses: requests answers
Server/controllers/aiResponseController.js - API routes → Supabase storage: uploads PDFs
Server/routes/app.js - Test controller → MCQ records: creates and updates
Server/controllers/testController.js - Test controller → Written-test records: creates and updates
Server/controllers/testController.js - Test controller → Question generation: generates questions
Server/controllers/testController.js - Test controller → Answer evaluation: evaluates answers
Server/controllers/testController.js - Document responses → AI providers: generates responses
Server/services/ragAi.js - Question generation → AI providers: generates questions
Server/services/testAi.js - Learner → Android app