How chaboutiabdo/mybac works
THE SMART is an Arabic-first BAC exam-preparation app. Students sign in, use a personalized daily question, submit an answer for server-side grading, and build progress through practice and revision. Other major branches cover past papers, curriculum videos, flashcards, AI tutoring, progress reports, and leaderboards; administrators manage learning content and users. The README documents backend grading and AI behavior, while sampled source confirms selected auth, data-fetching, and edge-function paths; links for unsampled feature internals are therefore limited.
Main entry points: client.ts Supabase Client · App.tsx App Router · index.ts AI Edge Function · AuthContext.tsx Authentication
Components 21
Application
- App Router
src/App.tsx - Authentication
src/contexts/AuthContext.tsx - Login
src/pages/Login.tsx - Dashboard
src/pages/Dashboard.tsx
Study Features
- Daily Question
src/components/dashboard/DailyQuestionCard.tsx - Daily Question Hook
src/hooks/useDailyQuestion.ts - Quiz Practice
src/pages/Practice.tsx - BAC Papers
src/pages/Exams.tsx - Video Lessons
src/pages/Videos.tsx - Flashcards
src/pages/Flashcards.tsx - Daily Revision
src/hooks/useTodaysRevision.ts - AI Tutor
src/pages/LearnAI.tsx
Progress
- Mistake Review
src/pages/MyMistakes.tsx - Study Reports
src/pages/WeeklyReport.tsx - Leaderboard
src/pages/Leaderboard.tsx
Backend Services
- Supabase Client
src/integrations/supabase/client.ts - Supabase Platform
- AI Edge Function
supabase/functions/gemini-chat/index.ts
Administration
- Admin Management
src/pages/AdminDashboard.tsx
Other components
- Student
- Google Gemini
Connections 22
- Student → App Router: opens app
- App Router → Login: routes
- App Router → Dashboard: routes
- App Router → Authentication: provides auth
- Login → Authentication: signs in
- Authentication → Supabase Client: auth and profile
- Dashboard → Daily Question: renders
- Daily Question → Daily Question Hook: uses
- Daily Question Hook → Supabase Client: loads and submits
- Quiz Practice → Supabase Client: quiz data
- BAC Papers → Supabase Client: paper data
- Video Lessons → Supabase Client: lesson data
- Flashcards → Supabase Client: deck data
- Daily Revision → Supabase Client: loads and records
- Daily Revision → Mistake Review: combines review
- Study Reports → Supabase Client: report data
- Leaderboard → Supabase Client: ranking data
- AI Tutor → AI Edge Function: requests help
- AI Edge Function → Supabase Platform: reads and writes
- AI Edge Function → Google Gemini: generates answers
- Admin Management → Supabase Client: manages content
- Supabase Client → Supabase Platform: queries