How fahamidanimra173/learniqe-learning-website works
1. This repo is a React single-page frontend for LearnIQ.
The architecture is client-side UI focused, with routing, auth, dashboards, payment screens, and content discovery. There is no backend implementation in this tree, so the app is designed to consume external APIs/services rather than host server logic itself.
2. The app shell is split into route layouts.
src/Router/Router.jsx coordinates navigation, while src/LayOuts/Root.jsx, src/LayOuts/AuthLayout/*, and src/LayOuts/DashBoard.jsx separate the public site, auth pages, and dashboard area. This is the main structural boundary in the UI.
3. Authentication and user state are centralized in context.
src/Context/AuthProvider.jsx and src/Context/AuthContext.jsx provide global auth state, likely wrapping Firebase auth and/or JWT-backed session info. Protected routes are enforced through src/Routes/PrivateRoute.jsx, which gates student/teacher/admin-only sections.
4. Data access is isolated through an Axios wrapper.
src/Axios/AxiosSecure.jsx is the main boundary for authenticated API calls. This suggests the app talks to a separate backend for users, courses, enrollments, teacher requests, and dashboards, while attaching auth credentials where needed.
5. The public experience is organized around discovery and marketing pages.
src/Pages/Home/Home.jsx composes many sections such as banners, platform discovery, categories, testimonials, enrolled-course highlights, newsletter, and “become an instructor” prompts. Other public pages include About, Contact, Explore, Privacy Policy, Terms, All Teachers, Free Courses, and All Approved Classes.
6. LearnIQ’s LMS flow is represented by course discovery, enrollment, and payment pages.
src/Pages/AllApprovedClasses/* appears to be the catalog of approved courses, with CourceDetails.jsx as the detail view. src/Pages/Payment/* handles paid enrollment, and Stripe is the external payment boundary implied by the README. This is the transition from marketing/discovery into transactional LMS usage.
7. Role-based dashboards are the core application subsystem.
The src/DashBoard/* tree is split by role: student, teacher, and admin. Each area has its own feature pages and analytics widgets, such as class requests, teacher requests, enrolled classes, class management, and user analytics. This is the main business-logic surface of the frontend.
8. Student dashboard focuses on enrolled learning activity.
src/DashBoard/StudentDashBoard/* contains enrolled class views and class detail pages, indicating the student flow is centered on tracking enrolled courses and accessing related information, likely including assignments or progress tied to backend data.
9. Teacher dashboard supports course authoring and class management.
src/DashBoard/TeacherDashBoard/AddClass/* and src/DashBoard/TeacherDashBoard/MyClass/* indicate teachers can submit new classes, manage their own courses, and inspect class details. src/DashBoard/TeacherRequests/TeacherRequests.jsx suggests a workflow where users request teacher status or approvals.
10. Admin/dashboard analytics are visualized with chart components.
src/DashBoard/AllUsers/* includes charts for role distribution, category enrollment, student assignments, and teacher class counts. This shows the admin view is not just CRUD; it also aggregates platform usage into visual insights.
11. Shared UI and presentation components are heavily reused across pages.
src/Shared/*, src/components/ui/*, src/components/etheral-shadow.jsx, and src/Pages/Home/Component/* provide reusable visual building blocks. The presence of Flowbite/shadcn-style component configs, Tailwind CSS, and utility helpers indicates a component-driven UI layer rather than page-specific styling.
12. Static assets and curated datasets are part of the content layer.
public/data/globe.json, dataset_10min_ostad_alison_khan.json, and the PDF/font assets under public/ support homepage visuals and platform/course discovery content. These assets help the frontend render rich marketing sections and educational platform references without requiring live content for every view.
13. Firebase is part of the deployment and likely auth/runtime integration.
Firebase.init.js, .firebaserc, and firebase.json indicate Firebase is used operationally, most likely for authentication and/or hosting. The public/404 Page not found.json and hosting cache files reinforce that this app is deployed as a hosted SPA.
14. The app is built as a modern React frontend stack.
vite.config.js, main.jsx, App.jsx, Tailwind-related config, Axios, and React component organization point to a Vite-based React build. The architecture is therefore: browser UI → routed layouts/pages → context/auth layer → secure API calls/payment/auth providers → role-specific dashboards and course workflows.
Main entry points: DashBoard.jsx Dashboard layout · AxiosSecure.jsx Secure API · App.jsx App · Router.jsx Router
Components 19
App Shell
Routing, layouts, and auth gating for the SPA
- main · Vite React entrypoint
src/main.jsx - App · Top-level application composition
src/App.jsx - Router · Central route map
src/Router/Router.jsx - Root layout · Public-site shell
src/LayOuts/Root.jsx - Auth layout · Login and registration shell
src/LayOuts/AuthLayout/Login.jsx - Dashboard layout · Protected dashboard shell
src/LayOuts/DashBoard.jsx
Public Experience
Marketing, discovery, and transactional user flows
- Home · Homepage composition and discovery
src/Pages/Home/Home.jsx - Public pages · About, contact, explore, policy, and teacher listing pages
src/Pages/ExtraRoutes/Explore.jsx - Approved classes · Course discovery and detail view
src/Pages/AllApprovedClasses/AllApprovedClasses.jsx - Payment · Paid enrollment flow
src/Pages/Payment/Payment.jsx
Dashboards
Role-based student, teacher, and admin areas
- Student area · Enrolled classes and class details
src/DashBoard/StudentDashBoard/MyEnrollmentClass/MyEnrollmentClass.jsx - Teacher area · Add class and manage own classes
src/DashBoard/TeacherDashBoard/AddClass/AddClass.jsx - Teacher requests · Teacher-role request handling
src/DashBoard/TeacherRequests/TeacherRequests.jsx - Admin analytics · Users, roles, class requests, and charts
src/DashBoard/AllUsers/AllUsers.jsx
Shared & Infra
Reusable UI, auth/session, API access, and deployment/runtime support
- Auth context · Global authentication and user state
src/Context/AuthProvider.jsx - Private route · Role-based access gate
src/Routes/PrivateRoute.jsx - Secure API · Authenticated backend requests
src/Axios/AxiosSecure.jsx - Shared UI · Reusable buttons, nav, footer, loaders, and custom UI
src/Shared/Navbar.jsx - Firebase · Deployment and runtime integration
Firebase.init.js
Connections 24
- main → App: boots · React mounts the application
- App → Router: wires routes · App delegates navigation to the router
- Router → Root layout: public shell · Public routes render through the root layout
- Router → Auth layout: auth shell · Login and register pages use the auth layout
- Router → Dashboard layout: protected shell · Dashboard routes render through the protected layout
- Dashboard layout → Private route: guards · Dashboard access is gated by route protection
- Private route → Auth context: reads session · Guard logic depends on current auth state
- App → Auth context: provides state · Auth provider wraps the SPA
- Auth context → Secure API: attaches creds · Authenticated requests use the secure client
- Root layout → Home: renders · Homepage is the main public landing view
- Root layout → Public pages: renders · Informational pages live in the public area
- Root layout → Approved classes: renders · Course discovery is exposed publicly
- Approved classes → Payment: starts checkout · Selected classes transition into payment
- Payment → Secure API: submits · Checkout and enrollment talk to the backend
- Dashboard layout → Student area: routes · Student learning views live inside the dashboard
- Dashboard layout → Teacher area: routes · Teacher authoring tools live inside the dashboard
- Dashboard layout → Teacher requests: routes · Teacher approval workflow is part of dashboard admin flow
- Dashboard layout → Admin analytics: routes · Admin analytics and management views live here
- Student area → Secure API: loads data · Student enrollment data is fetched from the backend
- Teacher area → Secure API: manages data · Teachers create and inspect classes through API calls
- Teacher requests → Secure API: processes · Teacher request approvals use backend data
- Admin analytics → Secure API: aggregates · Analytics charts summarize backend platform data
- App → Shared UI: reuses · Common UI elements support many pages
- App → Firebase: integrates · Firebase supports hosting and/or auth runtime