How modulyai-mvjexpo/modulyai works
This is a student-facing AI study application with authentication, onboarding, document-backed chat, study sets, exam practice, document management, and administration. The user journey is landing page or sign-in, profile setup, then dashboard-driven learning modes; serverless endpoints provide AI and document operations. Source excerpts establish several frontend calls and AI endpoint dependencies, but not the complete browser-to-endpoint wiring or unsampled document-processing behavior, so those links are omitted rather than inferred.
Main entry points: App.tsx App and routing · Dashboard.tsx Dashboard · chat.mts Chat endpoint · Chat.tsx Chat
Components 30
Student application
- App and routing
src/App.tsx - Sign-in and signup
src/components/AuthModal.tsx - Dashboard
src/pages/Dashboard.tsx - Onboarding
src/pages/Onboarding.tsx - Chat
src/pages/Chat.tsx - Study mode
src/pages/StudyMode.tsx - Exam mode
src/pages/ExamMode.tsx - Document library
src/pages/Library.tsx - Document upload
src/pages/UploadDocs.tsx - Admin panel
src/pages/AdminPanel.tsx - Document picker
src/components/DocumentPickerModal.tsx - Markdown rendering
src/lib/renderMarkdown.ts
Identity and profiles
- Authentication helpers
src/lib/auth.ts - Profile management
src/lib/profile.ts
AI services
- Server Supabase access
src/lib/ai/supabase-server.ts - LLM provider routing
src/lib/ai/llm.ts - Embedding providers
src/lib/ai/langchain-embeddings.ts - Embedding utilities
src/lib/ai/embedding.ts - Result reranking
src/lib/ai/reranker.ts - Document grounding
src/lib/docGrounding.ts
Backend and documents
- Supabase client
src/lib/supabase.ts - Chat endpoint
netlify/functions/chat.mts - Exam solve endpoint
netlify/functions/exam-solve.mts - Admin users endpoint
netlify/functions/admin-users.mts - Document processing
netlify/functions/process-document.mts - Background processing
netlify/functions/process-document-background.mts - Parsed document access
netlify/functions/get-parsed-doc.mts - Past-paper intelligence
netlify/functions/pyq-intelligence.mts - Study set storage
src/lib/studySets.ts
Other components
- Student
Connections 30
- Student → App and routing: opens
src/App.tsx - App and routing → Sign-in and signup: opens
src/App.tsx - App and routing → Dashboard: renders
src/App.tsx - App and routing → Onboarding: renders
src/App.tsx - App and routing → Profile management: loads profile
src/App.tsx - Sign-in and signup → Authentication helpers: calls
src/components/AuthModal.tsx - Sign-in and signup → Profile management: writes profile
src/components/AuthModal.tsx - Authentication helpers → Profile management: looks up username
src/lib/auth.ts - Authentication helpers → Supabase client: auth operations
src/lib/auth.ts - Profile management → Supabase client: reads and writes
src/lib/profile.ts - Dashboard → Chat: selects
src/pages/Dashboard.tsx - Dashboard → Document library: selects
src/pages/Dashboard.tsx - Dashboard → Document upload: selects
src/pages/Dashboard.tsx - Dashboard → Admin panel: selects
src/pages/Dashboard.tsx - Chat → Exam mode: renders
src/pages/Chat.tsx - Chat → Document picker: renders
src/pages/Chat.tsx - Chat → Markdown rendering: renders with
src/pages/Chat.tsx - Study mode → Document picker: renders
src/pages/StudyMode.tsx - Study mode → Markdown rendering: renders with
src/pages/StudyMode.tsx - Study mode → Study set storage: manages sets
src/pages/StudyMode.tsx - Admin panel → Admin users endpoint: requests
src/pages/AdminPanel.tsx - Chat endpoint → Server Supabase access: uses
netlify/functions/chat.mts - Chat endpoint → LLM provider routing: calls
netlify/functions/chat.mts - Chat endpoint → Embedding providers: calls
netlify/functions/chat.mts - Chat endpoint → Result reranking: calls
netlify/functions/chat.mts - Exam solve endpoint → Server Supabase access: uses
netlify/functions/exam-solve.mts - Exam solve endpoint → LLM provider routing: calls
netlify/functions/exam-solve.mts - Exam solve endpoint → Embedding utilities: calls
netlify/functions/exam-solve.mts - Admin users endpoint → Server Supabase access: uses
netlify/functions/admin-users.mts - Document grounding → Document processing