How rajeshsingh241/edtechplatform works
Project type and purpose
• This is a full-stack EdTech web application (“EdTech Platform”) with a React-based client and a Node/Express backend.
• Purpose: enable students to browse and enroll in courses, track progress; enable instructors to author and manage courses.
File structure
• Top-level directories:
• src/ (React frontend)
• public/ (static HTML, manifest, robots)
• server/ (Express backend)
• dist/ (built CSS from Tailwind)
• Frontend:
• Components grouped by feature (core, common, ContactPage, Dashboard, etc.)
• Redux slices (authSlice, cartSlice, etc.) under src/slices/
• Services for API calls (apiconnector.js, operations folder)
• Backend:
• server/index.js (Express entrypoint)
• server/routes/ (route definitions) → server/controllers/ (controller logic) → server/models/ (Mongoose schemas)
• server/config/ (DB, Cloudinary, Razorpay configs)
• server/middlewares/ (JWT auth)
• server/utils/ (mailSender, imageUploader, helpers)
• server/mail/templates/ (email HTML)
README
• Tech stack: React, React Router, Tailwind CSS; Node.js, Express, JWT, Bcrypt; MongoDB; external services: Cloudinary (image storage), Razorpay (payments), email (SMTP or third-party).
• Features: CRUD on courses and users, authentication, route protection, password hashing, validation.
a. Main components
1. Client (Browser/SPA)
2. CDN or static asset host (Vercel/Netlify serving built React and Tailwind CSS)
3. API Gateway / Express Server
4. Authentication module (JWT issuance, Bcrypt password hashing)
5. Controllers & Services (Course, User, Payments, Mail)
6. Data layer (MongoDB via Mongoose)
7. External Services: Cloudinary, Razorpay, Email provider (SMTP or API)
b. Relationships & interactions
• Browser → (HTTPS) → CDN/static host → loads index.html, bundle.js, CSS
• Browser SPA → (HTTPS JSON) → Express REST API endpoints (/api/users, /api/courses, /api/payments, etc.)
• Express middlewares authenticate JWT on protected routes
• Controllers call model methods → CRUD operations on MongoDB
• Payment controller interacts with Razorpay API
• Image upload endpoints forward images to Cloudinary
• Mail templates dispatched via mailSender utility to email provider
c. Architectural patterns/design principles
• Frontend: Single-page application; component-driven UI; Redux for state management; service layer abstracts API calls
• Backend: MVC-style layering (Routes → Controllers → Models); separation of concerns; environment configs for credentials; middleware for cross-cutting concerns (auth, error handling)
• Secure practices: JWT tokens stored client-side (HTTP-only cookies or localStorage), Bcrypt hashing, route protection
d. Key technologies/frameworks
• React, React Router, Redux Toolkit (slices), Tailwind CSS
• Node.js, Express.js, Mongoose, JWT, Bcrypt
• Cloudinary SDK, Razorpay SDK, Nodemailer (or similar) for emails
Detail and thoroughness
• Middleware layer (JWT auth) sitting between routes and controllers
• Config files or environment variables as a configuration block feeding into the server
• Build/deploy pipeline, if desired, by adding a CI/CD block (e.g., Vercel build for frontend, Heroku/AWS build for backend)