How parbatnilbera/majorproject works
Project type and purpose
• This is a front-end Single Page Application (SPA) built with React and bundled by Vite.
• It provides an educational management platform:
• A public landing for visitors
• Admin portal (accounting, registration)
• Teacher portal (courses, live sessions, scheduling)
• Student portal (courses, assessments, live, chat)
• Real-time chat & video-call features
• Payment processing
File structure
• Top‐level config: vite.config.js, eslint.config.js, package.json, vercel.json.
• Public assets in /public.
• Entry point /src/main.jsx with ReactDOM and Router mount.
• /src/components is subdivided by domain:
• Admin, Teachers, Student, LandingPage, Courses, Chat, videoCall, Payment, etc.
• Context in /src/context/ChatProvider.jsx for real-time chat state.
• Routing components: <DisplaySetup/>, <Error404/>, layouts & protected routes.
README for technical stack
• Uses Vite + React plugin (Babel or SWC) for HMR.
• ESLint for linting rules.
• No back-end code here—expects external REST/WebSocket services.
Main components & boundaries
a. Front-end SPA (React + Vite)
• Public Landing Module
• Admin Module
• Teacher Module
• Student Module
• Chat Module (WebSocket)
• Video Call Module (WebRTC or signaling server)
• Payment Module (e.g., Stripe)
• Shared UI: Header, Footer, Navbar
• React Context: ChatProvider
• React Router for navigation & ProtectedRoutes
• Authentication Service (JWT/OAuth)
• REST API Gateway (Courses, Users, Accounting, Registration, Grades, etc.)
• WebSocket Chat Server (e.g., Socket.io)
• Video Call Signaling Server (e.g., PeerJS or custom)
• Payment Gateway (Stripe/PayPal)
• Database (PostgreSQL/MongoDB)
Relationships & data flow
• Browser > loads React SPA via Vite build
• SPA > Auth Service (login/signup) > receives JWT
• SPA > REST API calls (CRUD on courses, registration, salaries, etc.)
• SPA > WebSocket Chat server (real-time messages)
• SPA > Video signaling for live class
• SPA > Payment gateway API for semester/course fees
• SPA uses React Context & component props to pass live data
Architectural patterns & principles
• Single Page Application (SPA)
• Component-based UI with domain separation
• Container/Layout + Presentational/page components
• Protected Routes for role-based access
• Context API for cross-cutting state (chat)
• Modular lazy loading (Vite code splitting)