How kshrr/nexus works
Nexus helps Malaysian students explore education pathways: users create a profile, assess interests and academic strengths, then explore careers, courses and scholarships, with recommendations and an optional AI advisory chat. Administrators manage catalog data and review scholarship discoveries produced by a separate scraper. The graph covers those product branches and the shared Supabase layer. Some feature implementations and Edge Functions were not excerpted, so their internal calls are omitted; documented and indexed relationships are retained where supported.
Main entry points: routes.jsx Route tree · api.js Function client · supabase.js Supabase client · main.py Scraper runner
Components 27
Student experience
- Route tree
src/routes.jsx - Profile setup
src/pages/student/ProfileSetup.jsx - RIASEC assessment
src/pages/student/RiasecAssessment.jsx - Academic analysis
src/pages/student/AcademicAnalysis.jsx - Recommendations
src/pages/student/Recommendations.jsx - Career explorer
src/pages/student/CareerDetail.jsx - Course explorer
src/pages/public/CourseList.jsx - Scholarship explorer
src/pages/public/ScholarshipList.jsx - Chat interface
src/hooks/useChat.js
Application services
- Function client
src/lib/api.js - RIASEC scoring
supabase/functions/score-riasec/index.ts - Recommendation engine
supabase/functions/recommend/index.ts - Scholarship matching
supabase/functions/match-scholarship/index.ts - Chat endpoint
api/chat.ts - Gemini service
supabase/functions/_shared/gemini.ts - Crawl trigger
supabase/functions/trigger-crawl/index.ts
Administration
- Admin operations
src/pages/admin/AdminHome.jsx - Discovery review
src/pages/admin/AdminScholarshipDiscovery.jsx
Scholarship discovery
- Scraper runner
scraper/main.py - Web discovery
scraper/discovery.py - Lead search
scraper/search.py - Provider parsers
scraper/parsers/base.py - Selected monitoring
scraper/monitor.py
Identity and data
- Auth provider
src/context/AuthContext.jsx - Supabase client
src/lib/supabase.js - Supabase database
scraper/db.py
Other components
- Student
Connections 30
- Student → Route tree: opens
src/routes.jsx - Route tree → Profile setup: routes to
src/routes.jsx - Route tree → RIASEC assessment: routes to
src/routes.jsx - Route tree → Academic analysis: routes to
src/routes.jsx - Route tree → Recommendations: routes to
src/routes.jsx - Route tree → Career explorer: routes to
src/routes.jsx - Route tree → Course explorer: routes to
src/routes.jsx - Route tree → Scholarship explorer: routes to
src/routes.jsx - Auth provider → Supabase client: reads session
src/context/AuthContext.jsx - Auth provider → Supabase client: loads profile
src/context/AuthContext.jsx - Chat interface → Function client: invokes
src/hooks/useChat.js - Function client → Supabase client: invokes functions
src/lib/api.js - RIASEC assessment → Function client: requests scoring
- Function client → RIASEC scoring: dispatches
- Recommendations → Function client: requests results
- Function client → Recommendation engine: dispatches
- Recommendations → Function client: requests matches
- Function client → Scholarship matching: dispatches
- Chat endpoint → Gemini service: calls
api/chat.ts - Admin operations → Crawl trigger: triggers crawl
- Admin operations → Supabase client: loads operations
- Discovery review → Supabase client: reviews records
- Scraper runner → Web discovery: runs discovery
scraper/main.py - Scraper runner → Selected monitoring: runs monitoring
scraper/main.py - Scraper runner → Supabase database: uses database
scraper/main.py - Web discovery → Lead search: searches leads
scraper/discovery.py - Web discovery → Supabase database: stages candidates
scraper/discovery.py - Selected monitoring → Supabase database: reads selected
scraper/monitor.py - Crawl trigger → Scraper runner: dispatches crawl
- Chat interface → Chat endpoint: requests chat
README.md