# sudamala07/zeedone architecture

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

- Interactive diagram: https://gitdiagram.com/sudamala07/zeedone
- Repository: https://github.com/sudamala07/zeedone

## Overview

Zeedone is a web e-learning platform: users access video lessons, enroll in courses, track progress, and use subscriptions to unlock paid classes. Registration and login establish accounts; authenticated API routes support profile, course, tutor, subscription, and notification functions. The README also describes social discussion/comment interactions, but their implementation is not evident in the sampled files, so no discussion flow is drawn. The frontend and notification route are represented from the tree; their internal behavior was not sampled.

Main entry points: [`server.js`](https://github.com/sudamala07/zeedone/blob/main/server.js) (Express app), [`routes/courses.js`](https://github.com/sudamala07/zeedone/blob/main/routes/courses.js) (Course routes), [`routes/auth.js`](https://github.com/sudamala07/zeedone/blob/main/routes/auth.js) (Auth routes), [`middleware/auth.js`](https://github.com/sudamala07/zeedone/blob/main/middleware/auth.js) (Auth middleware)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web entry"]
  node_browser["Browser UI<br/>[index.html]"]
  node_app["Express app<br/>[server.js]"]
end

subgraph group_learning["Learning"]
  node_courses["Course routes<br/>[courses.js]"]
  node_tutors["Tutor routes<br/>[tutors.js]"]
end

subgraph group_accounts["Accounts"]
  node_auth["Auth routes<br/>[auth.js]"]
  node_authmw["Auth middleware<br/>[auth.js]"]
  node_subscriptions["Subscription routes<br/>[subscriptions.js]"]
  node_notifications["Notification routes<br/>[notifications.js]"]
end

subgraph group_persistence["Persistence"]
  node_user["User model<br/>[User.js]"]
  node_course["Course model<br/>[Course.js]"]
  node_enrollment["Enrollment model<br/>[Enrollment.js]"]
  node_subscription["Subscription model<br/>[Subscription.js]"]
  node_tutor["Tutor model<br/>[Tutor.js]"]
  node_notification["Notification model<br/>[Notification.js]"]
  node_connector["Mongo connector<br/>[mongodb.js]"]
end

node_learner(("Learner"))
node_mongo[("MongoDB Atlas")]
node_youtube(("YouTube videos"))

node_learner -->|"uses"| node_browser
node_app -->|"serves"| node_browser
node_browser -->|"requests API"| node_app
node_app -->|"dispatches"| node_auth
node_app -->|"dispatches"| node_courses
node_app -->|"dispatches"| node_subscriptions
node_app -->|"dispatches"| node_tutors
node_app -->|"dispatches"| node_notifications
node_app -->|"connects via"| node_connector
node_auth -->|"guards routes"| node_authmw
node_courses -->|"guards routes"| node_authmw
node_subscriptions -->|"guards routes"| node_authmw
node_tutors -->|"guards routes"| node_authmw
node_authmw -->|"connects via"| node_connector
node_authmw -->|"loads user"| node_user
node_auth -->|"reads/writes"| node_user
node_auth -->|"counts enrollments"| node_enrollment
node_auth -->|"reads status"| node_subscription
node_auth -->|"counts/creates"| node_notification
node_courses -->|"reads/writes"| node_course
node_courses -->|"reads/writes"| node_enrollment
node_courses -->|"checks access"| node_subscription
node_courses -->|"creates alerts"| node_notification
node_subscriptions -->|"reads/writes"| node_subscription
node_subscriptions -->|"creates alerts"| node_notification
node_tutors -->|"reads/writes"| node_tutor
node_notifications -->|"manages alerts"| node_notification
node_connector -->|"connects"| node_mongo
node_browser -.->|"plays lesson videos"| node_youtube

click node_browser "https://github.com/sudamala07/zeedone/blob/main/public/index.html"
click node_app "https://github.com/sudamala07/zeedone/blob/main/server.js"
click node_auth "https://github.com/sudamala07/zeedone/blob/main/routes/auth.js"
click node_authmw "https://github.com/sudamala07/zeedone/blob/main/middleware/auth.js"
click node_courses "https://github.com/sudamala07/zeedone/blob/main/routes/courses.js"
click node_subscriptions "https://github.com/sudamala07/zeedone/blob/main/routes/subscriptions.js"
click node_tutors "https://github.com/sudamala07/zeedone/blob/main/routes/tutors.js"
click node_notifications "https://github.com/sudamala07/zeedone/blob/main/routes/notifications.js"
click node_user "https://github.com/sudamala07/zeedone/blob/main/models/User.js"
click node_course "https://github.com/sudamala07/zeedone/blob/main/models/Course.js"
click node_enrollment "https://github.com/sudamala07/zeedone/blob/main/models/Enrollment.js"
click node_subscription "https://github.com/sudamala07/zeedone/blob/main/models/Subscription.js"
click node_tutor "https://github.com/sudamala07/zeedone/blob/main/models/Tutor.js"
click node_notification "https://github.com/sudamala07/zeedone/blob/main/models/Notification.js"
click node_connector "https://github.com/sudamala07/zeedone/blob/main/db/mongodb.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_browser,node_app toneBlue
class node_courses,node_tutors,node_mongo toneAmber
class node_auth,node_authmw,node_subscriptions,node_notifications toneMint
class node_user,node_course,node_enrollment,node_subscription,node_tutor,node_notification,node_connector toneRose
class node_learner,node_youtube toneIndigo
```

## Components

### Web entry

- [Browser UI](https://github.com/sudamala07/zeedone/blob/main/public/index.html): `public/index.html`
- [Express app](https://github.com/sudamala07/zeedone/blob/main/server.js): `server.js`

### Learning

- [Course routes](https://github.com/sudamala07/zeedone/blob/main/routes/courses.js): `routes/courses.js`
- [Tutor routes](https://github.com/sudamala07/zeedone/blob/main/routes/tutors.js): `routes/tutors.js`

### Accounts

- [Auth routes](https://github.com/sudamala07/zeedone/blob/main/routes/auth.js): `routes/auth.js`
- [Auth middleware](https://github.com/sudamala07/zeedone/blob/main/middleware/auth.js): `middleware/auth.js`
- [Subscription routes](https://github.com/sudamala07/zeedone/blob/main/routes/subscriptions.js): `routes/subscriptions.js`
- [Notification routes](https://github.com/sudamala07/zeedone/blob/main/routes/notifications.js): `routes/notifications.js`

### Persistence

- [User model](https://github.com/sudamala07/zeedone/blob/main/models/User.js): `models/User.js`
- [Course model](https://github.com/sudamala07/zeedone/blob/main/models/Course.js): `models/Course.js`
- [Enrollment model](https://github.com/sudamala07/zeedone/blob/main/models/Enrollment.js): `models/Enrollment.js`
- [Subscription model](https://github.com/sudamala07/zeedone/blob/main/models/Subscription.js): `models/Subscription.js`
- [Tutor model](https://github.com/sudamala07/zeedone/blob/main/models/Tutor.js): `models/Tutor.js`
- [Notification model](https://github.com/sudamala07/zeedone/blob/main/models/Notification.js): `models/Notification.js`
- [Mongo connector](https://github.com/sudamala07/zeedone/blob/main/db/mongodb.js): `db/mongodb.js`

### Other components

- **Learner**
- **MongoDB Atlas**
- **YouTube videos**

## Connections

- Learner → Browser UI: uses
- Express app → Browser UI: serves
- Browser UI → Express app: requests API
- Express app → Auth routes: dispatches
- Express app → Course routes: dispatches
- Express app → Subscription routes: dispatches
- Express app → Tutor routes: dispatches
- Express app → Notification routes: dispatches
- Express app → Mongo connector: connects via
- Auth routes → Auth middleware: guards routes
- Course routes → Auth middleware: guards routes
- Subscription routes → Auth middleware: guards routes
- Tutor routes → Auth middleware: guards routes
- Auth middleware → Mongo connector: connects via
- Auth middleware → User model: loads user
- Auth routes → User model: reads/writes
- Auth routes → Enrollment model: counts enrollments
- Auth routes → Subscription model: reads status
- Auth routes → Notification model: counts/creates
- Course routes → Course model: reads/writes
- Course routes → Enrollment model: reads/writes
- Course routes → Subscription model: checks access
- Course routes → Notification model: creates alerts
- Subscription routes → Subscription model: reads/writes
- Subscription routes → Notification model: creates alerts
- Tutor routes → Tutor model: reads/writes
- Notification routes → Notification model: manages alerts
- Mongo connector → MongoDB Atlas: connects
- Browser UI → YouTube videos: plays lesson videos
