# yashkumar14/udemy_clone architecture

> Architecture diagram of the GitHub repository yashkumar14/udemy_clone, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yashkumar14/udemy_clone
- Repository: https://github.com/yashkumar14/udemy_clone

## Overview

This repository is a Udemy-style course-learning application with a Vue frontend and an Express backend. The visible backend workflow covers account registration and login, OTP email delivery and verification, and Google sign-in/sign-up; verified users receive authentication results. The frontend includes course browsing and course-page features, dashboards, and account screens, but the README is empty and sampled sources do not establish most view-to-API connections. The graph therefore preserves those product areas without guessing their runtime links.

Main entry points: [`Backend/controllers/main.js`](https://github.com/yashkumar14/udemy_clone/blob/main/Backend/controllers/main.js) (Authentication handlers), [`Backend/app.js`](https://github.com/yashkumar14/udemy_clone/blob/main/Backend/app.js) (Express server), [`Backend/db_connections/connections.js`](https://github.com/yashkumar14/udemy_clone/blob/main/Backend/db_connections/connections.js) (PostgreSQL database), [`Frontend/src/main.ts`](https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/main.ts) (Application bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_app["Vue application shell<br/>[App.vue]"]
  node_router["Route configuration<br/>[index.ts]"]
  node_state["Frontend state<br/>[vueStore.js]"]
  node_entry["Application bootstrap<br/>[main.ts]"]
end

subgraph group_learning["Course experience"]
  node_home["Home and discovery<br/>[HomePage.vue]"]
  node_coursepage["Course page<br/>[CoursePage.vue]"]
  node_courseparts["Course components<br/>[CourseSideBar.vue]"]
  node_incentives["Course incentives"]
  node_subscriptions["Subscription content"]
  node_catalog["Course cards<br/>[CoursesCards.vue]"]
  node_cardtips["Course-card details"]
  node_dashboard["Learner dashboard<br/>[DashboardPage.vue]"]
  node_cart["Cart<br/>[Cart.vue]"]
  node_courseapi["Course data access<br/>[courseFetchApi.js]"]
end

subgraph group_identity["Identity and access"]
  node_authpages["Account screens<br/>[LoginPage.vue]"]
  node_signup["Registration screen<br/>[SignupPage.vue]"]
  node_otpview["OTP verification screen<br/>[VerifyOtpPage.vue]"]
  node_googleauth["Google authentication<br/>[useGoogleAuth.js]"]
  node_authcontroller["Authentication handlers<br/>[main.js]"]
  node_users["User and role utilities<br/>[util.js]"]
  node_mailtemplate["OTP email template<br/>[mailTemplate.js]"]
end

subgraph group_backend["Backend services"]
  node_server["Express server<br/>[app.js]"]
  node_routes["API routes<br/>[routers.js]"]
  node_postgres[("PostgreSQL database<br/>[connections.js]")]
  node_otpjobs["OTP expiry jobs<br/>[otpCronJobs.js]"]
  node_errors["API error handling<br/>[errorHandler.js]"]
  node_errorclasses["API error types<br/>[index.js]"]
end

node_learner(("Learner"))
node_emailservice["Transactional email service"]

node_learner -->|"uses"| node_app
node_entry -->|"mounts"| node_app
node_entry -->|"installs"| node_router
node_entry -->|"installs"| node_state
node_app -->|"renders routes"| node_router
node_coursepage -.->|"uses"| node_courseparts
node_courseparts -->|"uses"| node_incentives
node_courseparts -->|"uses"| node_subscriptions
node_catalog -->|"uses"| node_cardtips
node_courseapi -->|"updates"| node_state
node_server -->|"mounts"| node_routes
node_server -->|"initializes"| node_postgres
node_server -->|"loads"| node_otpjobs
node_server -->|"registers"| node_errors
node_routes -->|"routes to"| node_authcontroller
node_authcontroller -->|"queries"| node_postgres
node_authcontroller -->|"calls"| node_users
node_authcontroller -->|"renders"| node_mailtemplate
node_authcontroller -->|"sends email"| node_emailservice
node_users -->|"queries"| node_postgres
node_otpjobs -->|"updates OTPs"| node_postgres
node_errors -->|"checks types"| node_errorclasses

click node_app "https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/App.vue"
click node_router "https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/router/index.ts"
click node_home "https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/views/HomePage.vue"
click node_coursepage "https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/views/CoursePage.vue"
click node_courseparts "https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/components/CourseSideBar.vue"
click node_incentives "https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/components/CourseIncentives.vue"
click node_subscriptions "https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/components/SubscriptionContent.vue"
click node_catalog "https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/components/CoursesCards.vue"
click node_cardtips "https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/components/CardsTooltipComponent.vue"
click node_dashboard "https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/views/DashboardPage.vue"
click node_cart "https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/views/Cart.vue"
click node_authpages "https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/views/LoginPage.vue"
click node_signup "https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/views/SignupPage.vue"
click node_otpview "https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/views/VerifyOtpPage.vue"
click node_googleauth "https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/composables/useGoogleAuth.js"
click node_state "https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/utils/vueStore.js"
click node_courseapi "https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/utils/courseFetchApi.js"
click node_entry "https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/main.ts"
click node_server "https://github.com/yashkumar14/udemy_clone/blob/main/Backend/app.js"
click node_routes "https://github.com/yashkumar14/udemy_clone/blob/main/Backend/routes/routers.js"
click node_authcontroller "https://github.com/yashkumar14/udemy_clone/blob/main/Backend/controllers/main.js"
click node_users "https://github.com/yashkumar14/udemy_clone/blob/main/Backend/utils/util.js"
click node_postgres "https://github.com/yashkumar14/udemy_clone/blob/main/Backend/db_connections/connections.js"
click node_otpjobs "https://github.com/yashkumar14/udemy_clone/blob/main/Backend/cron-jobs/otpCronJobs.js"
click node_mailtemplate "https://github.com/yashkumar14/udemy_clone/blob/main/Backend/emailTemplate/mailTemplate.js"
click node_errors "https://github.com/yashkumar14/udemy_clone/blob/main/Backend/middleware/errorHandler.js"
click node_errorclasses "https://github.com/yashkumar14/udemy_clone/blob/main/Backend/errors/index.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_router,node_state,node_entry toneBlue
class node_home,node_coursepage,node_courseparts,node_incentives,node_subscriptions,node_catalog,node_cardtips,node_dashboard,node_cart,node_courseapi toneAmber
class node_authpages,node_signup,node_otpview,node_googleauth,node_authcontroller,node_users,node_mailtemplate toneMint
class node_server,node_routes,node_postgres,node_otpjobs,node_errors,node_errorclasses toneRose
class node_learner,node_emailservice toneIndigo
```

## Components

### Web application

- [Vue application shell](https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/App.vue): `Frontend/src/App.vue`
- [Route configuration](https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/router/index.ts): `Frontend/src/router/index.ts`
- [Frontend state](https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/utils/vueStore.js): `Frontend/src/utils/vueStore.js`
- [Application bootstrap](https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/main.ts): `Frontend/src/main.ts`

### Course experience

- [Home and discovery](https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/views/HomePage.vue): `Frontend/src/views/HomePage.vue`
- [Course page](https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/views/CoursePage.vue): `Frontend/src/views/CoursePage.vue`
- [Course components](https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/components/CourseSideBar.vue): `Frontend/src/components/CourseSideBar.vue`
- [Course incentives](https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/components/CourseIncentives.vue): `Frontend/src/components/CourseIncentives.vue`
- [Subscription content](https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/components/SubscriptionContent.vue): `Frontend/src/components/SubscriptionContent.vue`
- [Course cards](https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/components/CoursesCards.vue): `Frontend/src/components/CoursesCards.vue`
- [Course-card details](https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/components/CardsTooltipComponent.vue): `Frontend/src/components/CardsTooltipComponent.vue`
- [Learner dashboard](https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/views/DashboardPage.vue): `Frontend/src/views/DashboardPage.vue`
- [Cart](https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/views/Cart.vue): `Frontend/src/views/Cart.vue`
- [Course data access](https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/utils/courseFetchApi.js): `Frontend/src/utils/courseFetchApi.js`

### Identity and access

- [Account screens](https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/views/LoginPage.vue): `Frontend/src/views/LoginPage.vue`
- [Registration screen](https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/views/SignupPage.vue): `Frontend/src/views/SignupPage.vue`
- [OTP verification screen](https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/views/VerifyOtpPage.vue): `Frontend/src/views/VerifyOtpPage.vue`
- [Google authentication](https://github.com/yashkumar14/udemy_clone/blob/main/Frontend/src/composables/useGoogleAuth.js): `Frontend/src/composables/useGoogleAuth.js`
- [Authentication handlers](https://github.com/yashkumar14/udemy_clone/blob/main/Backend/controllers/main.js): `Backend/controllers/main.js`
- [User and role utilities](https://github.com/yashkumar14/udemy_clone/blob/main/Backend/utils/util.js): `Backend/utils/util.js`
- [OTP email template](https://github.com/yashkumar14/udemy_clone/blob/main/Backend/emailTemplate/mailTemplate.js): `Backend/emailTemplate/mailTemplate.js`

### Backend services

- [Express server](https://github.com/yashkumar14/udemy_clone/blob/main/Backend/app.js): `Backend/app.js`
- [API routes](https://github.com/yashkumar14/udemy_clone/blob/main/Backend/routes/routers.js): `Backend/routes/routers.js`
- [PostgreSQL database](https://github.com/yashkumar14/udemy_clone/blob/main/Backend/db_connections/connections.js): `Backend/db_connections/connections.js`
- [OTP expiry jobs](https://github.com/yashkumar14/udemy_clone/blob/main/Backend/cron-jobs/otpCronJobs.js): `Backend/cron-jobs/otpCronJobs.js`
- [API error handling](https://github.com/yashkumar14/udemy_clone/blob/main/Backend/middleware/errorHandler.js): `Backend/middleware/errorHandler.js`
- [API error types](https://github.com/yashkumar14/udemy_clone/blob/main/Backend/errors/index.js): `Backend/errors/index.js`

### Other components

- **Learner**
- **Transactional email service**

## Connections

- Learner → Vue application shell: uses
- Application bootstrap → Vue application shell: mounts (evidence: `Frontend/src/main.ts`)
- Application bootstrap → Route configuration: installs (evidence: `Frontend/src/main.ts`)
- Application bootstrap → Frontend state: installs (evidence: `Frontend/src/main.ts`)
- Vue application shell → Route configuration: renders routes (evidence: `Frontend/src/App.vue`)
- Course page → Course components: uses
- Course components → Course incentives: uses (evidence: `Frontend/src/components/CourseSideBar.vue`)
- Course components → Subscription content: uses (evidence: `Frontend/src/components/CourseSideBar.vue`)
- Course cards → Course-card details: uses (evidence: `Frontend/src/components/CoursesCards.vue`)
- Course data access → Frontend state: updates (evidence: `Frontend/src/utils/courseFetchApi.js`)
- Express server → API routes: mounts (evidence: `Backend/app.js`)
- Express server → PostgreSQL database: initializes (evidence: `Backend/app.js`)
- Express server → OTP expiry jobs: loads (evidence: `Backend/app.js`)
- Express server → API error handling: registers (evidence: `Backend/app.js`)
- API routes → Authentication handlers: routes to (evidence: `Backend/routes/routers.js`)
- Authentication handlers → PostgreSQL database: queries (evidence: `Backend/controllers/main.js`)
- Authentication handlers → User and role utilities: calls (evidence: `Backend/controllers/main.js`)
- Authentication handlers → OTP email template: renders (evidence: `Backend/controllers/main.js`)
- Authentication handlers → Transactional email service: sends email (evidence: `Backend/controllers/main.js`)
- User and role utilities → PostgreSQL database: queries (evidence: `Backend/utils/util.js`)
- OTP expiry jobs → PostgreSQL database: updates OTPs (evidence: `Backend/cron-jobs/otpCronJobs.js`)
- API error handling → API error types: checks types (evidence: `Backend/middleware/errorHandler.js`)
