# dhruvaop/logic-labs-ed-project architecture

> Architecture diagram of the GitHub repository dhruvaop/logic-labs-ed-project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dhruvaop/logic-labs-ed-project
- Repository: https://github.com/dhruvaop/logic-labs-ed-project

## Overview

##### External Services Integration
- Razorpay Payment Gateway
- Cloudinary (for media storage)
- MongoDB Database
- Email Service

##### Data Flow Representation

- REST API calls between frontend and backend
- Database operations
- External service interactions
- Authentication flow
- File upload/download streams

##### Special Features to Highlight

a) Course Management System:
- Course creation flow
- Content organization (Sections/SubSections)
- Course enrollment process

b) User Role System:
- Student features
- Instructor features
- Authentication boundaries

c) Payment System:
- Razorpay integration
- Payment flow
- Course purchase process

##### Important Details

- File upload/storage flow with Cloudinary
- Email notification system
- Progress tracking mechanism
- Search functionality
- Dashboard analytics flow

##### Notes Section

Notes for:
- Security implementations
- Scalability considerations
- Third-party service dependencies
- Critical business logic flows

This structure will effectively communicate the architecture of Logic Labs Ed, highlighting its EdTech-specific features while maintaining clarity about the system's overall organization and data flow.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Frontend
        direction TB
        PublicComp["Public Components"]
        AuthComp["Auth Components"]
        ProtectedComp["Protected Components"]
        ReduxStore["Redux Store"]
        ReduxSlices["Redux Slices"]
        APIServices["API Services"]
        
        PublicComp --> ReduxStore
        AuthComp --> ReduxStore
        ProtectedComp --> ReduxStore
        ReduxStore --- ReduxSlices
        ReduxSlices --> APIServices
    end

    subgraph Middleware
        direction TB
        AuthMiddleware["JWT Auth Middleware"]
        APIRoutes["API Routes"]
        
        APIServices --> AuthMiddleware
        AuthMiddleware --> APIRoutes
    end

    subgraph Backend
        direction TB
        Controllers["Controllers"]
        Models["Database Models"]
        Services["Services"]
        
        APIRoutes --> Controllers
        Controllers --> Models
        Controllers --> Services
    end

    subgraph ExternalServices
        direction TB
        Razorpay["Razorpay Gateway"]
        Cloudinary["Cloudinary Storage"]
        MongoDB["MongoDB Database"]
        EmailService["Email Service"]
    end

    Controllers --> Razorpay
    Controllers --> Cloudinary
    Models --> MongoDB
    Services --> EmailService

    %% Click Events
    click PublicComp "https://github.com/dhruvaop/Logic-Labs-Ed-Project/tree/ninjas/frontend/src/components/core/HomePage/"
    click AuthComp "https://github.com/dhruvaop/Logic-Labs-Ed-Project/tree/ninjas/frontend/src/components/core/Auth/"
    click ProtectedComp "https://github.com/dhruvaop/Logic-Labs-Ed-Project/tree/ninjas/frontend/src/components/core/Dashboard/"
    click ReduxStore "https://github.com/dhruvaop/Logic-Labs-Ed-Project/blob/ninjas/frontend/src/redux/store.js"
    click ReduxSlices "https://github.com/dhruvaop/Logic-Labs-Ed-Project/tree/ninjas/frontend/src/redux/slices/"
    click APIServices "https://github.com/dhruvaop/Logic-Labs-Ed-Project/tree/ninjas/frontend/src/services/"
    click AuthMiddleware "https://github.com/dhruvaop/Logic-Labs-Ed-Project/blob/ninjas/backend/middlewares/auth.js"
    click Controllers "https://github.com/dhruvaop/Logic-Labs-Ed-Project/tree/ninjas/backend/controllers/"
    click Models "https://github.com/dhruvaop/Logic-Labs-Ed-Project/tree/ninjas/backend/models/"
    click APIRoutes "https://github.com/dhruvaop/Logic-Labs-Ed-Project/tree/ninjas/backend/routes/"
    click Cloudinary "https://github.com/dhruvaop/Logic-Labs-Ed-Project/blob/ninjas/backend/config/cloudinaryConnect.js"
    click Razorpay "https://github.com/dhruvaop/Logic-Labs-Ed-Project/blob/ninjas/backend/config/razorpayInstance.js"
    click EmailService "https://github.com/dhruvaop/Logic-Labs-Ed-Project/tree/ninjas/backend/mail/"
    click MongoDB "https://github.com/dhruvaop/Logic-Labs-Ed-Project/blob/ninjas/backend/config/database.js"

    %% Styling
    classDef frontend fill:#2374ab
    classDef middleware fill:#ff7f50
    classDef backend fill:#2ecc71
    classDef external fill:#9b59b6
    
    class PublicComp,AuthComp,ProtectedComp,ReduxStore,ReduxSlices,APIServices frontend
    class AuthMiddleware,APIRoutes middleware
    class Controllers,Models,Services backend
    class Razorpay,Cloudinary,MongoDB,EmailService external

    %% Legend
    subgraph Legend
        Frontend_L["Frontend"]:::frontend
        Middleware_L["Middleware"]:::middleware
        Backend_L["Backend"]:::backend
        External_L["External Services"]:::external
    end
```
