How ashik-khan-atul/learning-zone-client works
Learning Zone is a role-based coaching-management frontend. Users register or sign in, apply for student or teacher status, and admins review applications; role-aware dashboard routes then expose user management and routine workflows. The product also offers public learning activities, including a timed math game with a leaderboard, quizzes, and mini tools. The graph combines the documented capabilities with sampled routing, auth, role-check, and routine code; backend behavior is shown only where documented or directly referenced.
Main entry points: router.jsx Route registry · useAuth.jsx Auth hook · useAxiosSecure.jsx Authenticated API client · Home.jsx Home and public pages
Components 26
Navigation and access
- Route registry
src/Router/router.jsx - Dashboard shell
src/Layout/DashboardLayout/DashboardLayout.jsx - Role route guards
src/Routes
Identity and roles
- Auth provider
src/Provider/AuthProvider.jsx - Firebase auth
src/Firebase/firebase.init.js - Auth hook
src/Hooks/useAuth.jsx - Login and registration
src/Components/Login/Login.jsx - Google sign-in
src/Shared/SocialLogin/SocialLogin.jsx - Role lookup
src/Hooks/useUserRole.jsx - Authenticated API client
src/Hooks/useAxiosSecure.jsx - Public API client
src/Hooks/userAxiosPublic.jsx
Coaching management
- Student application
src/Components/BecomeStudent/BecomeStudent.jsx - Teacher application
src/Components/BecomeTeacher/BecomeTeacher.jsx - Application review
src/Pages/DashboardPages/AdminDashPage - Member management
src/Pages/DashboardPages/AdminDashPage - Routine manager
src/Pages/DashboardPages/Shared/Routine/RoutineManager.jsx - Routine views
src/Pages/DashboardPages/Shared/Routine - Profile
src/Pages/DashboardPages/Profile/Profile.jsx
Learning activities
- Math challenge
src/Components/MathChallenge/MathChallenge.jsx - Math leaderboard
src/Components/MathGameLeaderBoard/MathGameLeaderBoard.jsx - Knowledge quiz
src/Components/QuizSection/QuizSection.jsx - Mini learning tools
src/Components/MiniLearningTools/MiniLearningTools.jsx
Public site
- Home and public pages
src/Pages/Home/Home.jsx - About, services, contact
src/Pages
Other components
- Visitor or user
- Learning Zone backend
Connections 36
- Visitor or user → Route registry: opens pages
src/Router/router.jsx - Route registry → Home and public pages: routes to
src/Router/router.jsx - Route registry → About, services, contact: routes to
src/Router/router.jsx - Route registry → Login and registration: routes to
src/Router/router.jsx - Route registry → Dashboard shell: routes to
src/Router/router.jsx - Route registry → Student application: routes to
src/Router/router.jsx - Route registry → Teacher application: routes to
src/Router/router.jsx - Route registry → Role route guards: wraps protected pages
src/Router/router.jsx - Dashboard shell → Role lookup: checks role
src/Hooks/useUserRole.jsx - Role route guards → Role lookup: checks access
src/Routes/AdminRoutes.jsx - Role lookup → Authenticated API client: requests role
src/Hooks/useUserRole.jsx - Authenticated API client → Auth hook: gets credentials
src/Hooks/useAxiosSecure.jsx - Auth hook → Auth provider: reads context
src/Hooks/useAuth.jsx - Auth provider → Firebase auth: uses Firebase auth
src/Provider/AuthProvider.jsx - Login and registration → Auth hook: uses auth
src/Components/Login/Login.jsx - Login and registration → Google sign-in: offers Google sign-in
src/Components/Login/Login.jsx - Google sign-in → Auth hook: uses auth
src/Shared/SocialLogin/SocialLogin.jsx - Student application → Auth hook: uses auth
src/Components/BecomeStudent/BecomeStudent.jsx - Teacher application → Auth hook: uses auth
src/Components/BecomeTeacher/BecomeTeacher.jsx - Student application → Public API client: submits application
src/Components/BecomeStudent/BecomeStudent.jsx - Teacher application → Public API client: submits application
src/Components/BecomeTeacher/BecomeTeacher.jsx - Application review → Authenticated API client: reviews applications
src/Pages/DashboardPages/AdminDashPage/AppliedStudent/AppliedStudent.jsx - Member management → Authenticated API client: manages members
src/Pages/DashboardPages/AdminDashPage/AllStudent/AllStudent.jsx - Routine manager → Authenticated API client: saves routines
src/Pages/DashboardPages/Shared/Routine/RoutineManager.jsx - Routine views → Authenticated API client: loads routines
src/Pages/DashboardPages/Shared/Routine/ShowRoutine.jsx - Routine manager → Learning Zone backend: creates routine
src/Pages/DashboardPages/Shared/Routine/RoutineManager.jsx - Application review → Learning Zone backend: updates approval status
README.md - Member management → Learning Zone backend: activates or deactivates
README.md - Routine views → Learning Zone backend: reads routines
README.md - Profile → Public API client: loads profile data
src/Pages/DashboardPages/Profile/Profile.jsx - Home and public pages → Math challenge: features game
README.md - Home and public pages → Knowledge quiz: features quiz
README.md - Home and public pages → Mini learning tools: features tools
README.md - Math challenge → Math leaderboard: records scores
README.md - Math leaderboard → Public API client: loads leaderboard
src/Components/MathGameLeaderBoard/MathGameLeaderBoard.jsx - Math challenge → Learning Zone backend: persists scores
README.md