How vishalgunjalswe/ed-tech works
Project Type & Overall Purpose
• StudyNotion is a full-stack ed-tech application built using the MERN stack (MongoDB, Express.js, React.js, Node.js).
• It serves multiple user groups (students, instructors, admins), facilitating course creation, consumption, ratings, reviews, and secure transactions.
Major Components and Their Roles
a. Frontend:
• Located in the "src" and "public" directories.
• Built with React.js and styled with Tailwind CSS.
• Uses Redux for state management.
• Handles all user interactions, routing (pages like Home, Login, Signup, CourseDetails, Dashboard, etc.), and UI rendering.
b. Backend:
• Found in the "server" directory.
• Built with Node.js and Express.js.
• Contains configuration files for cloud services and payment processing (e.g., cloudinary.js, razorpay.js, database.js).
• Implements controllers (for Auth, Courses, Payments, etc.), models (for Users, Courses, Ratings, etc.), and routes through RESTful endpoints.
• Uses JWT for secure authentication.
c. Database:
• Although not directly in the file tree, the README mentions MongoDB.
• Data is modeled in the backend via the Mongoose schemas (e.g., defined in server/models).
d. External & Third-Party Services:
• Cloud Storage: Cloudinary (see server/config/cloudinary.js).
• Payment Gateway: Razorpay integration (server/config/razorpay.js).
• Email Services: Mail templates and utilities for notifications are in the server/mail folder.
• Deployment: Frontend hosted on Vercel; backend deployed on Render/Railway; Database on MongoDB Atlas.
e. Documentation & Design Artifacts:
• Postman collection provided for API documentation.
Relationships & Interactions
• The Frontend sends HTTP requests (via RESTful APIs) to the Backend.
• The Backend processes requests, interacts with the MongoDB database, and communicates with external services such as Cloudinary for media and Razorpay for payments.
• JWT is used as a middleware for authentication, ensuring secure transactions between the client and server.
• Modular design in the client (components, pages) and server (controllers, routes, models) reflects separation of concerns.
Architectural Patterns and Design Principles
• MVC/MVVM: The backend follows an MVC-like structure with clear separation of models, controllers, and routes.
• Component-based architecture in React for high reusability.
• RESTful API design for client-server communication.
• Secure authentication using JWT, which is implemented as middleware in the server.