# praveenkumarsuggula/click2learn architecture

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

- Interactive diagram: https://gitdiagram.com/praveenkumarsuggula/click2learn
- Repository: https://github.com/praveenkumarsuggula/click2learn

## Overview

Click2Learn is a browser-based course-learning and purchasing application. Students enter through the Angular client, authenticate through its authentication service and backend, browse courses, and manage a cart; the README also describes secure payment, though no payment implementation appears in the supplied tree. The repository contains a separate ASP.NET Core identity/data-service setup, including startup seeding. Edges reflect shown calls, imports, or documented capabilities; course retrieval, checkout, and payment wiring are not established by the sampled evidence.

Main entry points: [`click2LearnInstructorClient/src/app/app-routing.module.ts`](https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnInstructorClient/src/app/app-routing.module.ts) (App routing), [`click2learnserver/FunctionalService/FunctionalSvc.cs`](https://github.com/praveenkumarsuggula/click2learn/blob/master/click2learnserver/FunctionalService/FunctionalSvc.cs) (User seeding service), [`click2learnserver/DataService/DbContextInitializer.cs`](https://github.com/praveenkumarsuggula/click2learn/blob/master/click2learnserver/DataService/DbContextInitializer.cs) (Database initializer), [`click2learnserver/DataService/ApplicationDbContext.cs`](https://github.com/praveenkumarsuggula/click2learn/blob/master/click2learnserver/DataService/ApplicationDbContext.cs) (Application context)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Student client"]
  node_angular_app["Angular app<br/>[app.module.ts]"]
  node_routing["App routing"]
  node_login["Login<br/>[login.component.ts]"]
  node_auth_guard["Auth guard"]
  node_auth_service["Authentication service"]
  node_otp["OTP verification"]
  node_dashboard["Dashboard"]
  node_courses["Course browsing"]
  node_shop["Course shop<br/>[shop.component.ts]"]
  node_cart_service["Cart state<br/>[cart.service.ts]"]
  node_cart_view["Cart view<br/>[cart.component.ts]"]
end

subgraph group_node_backend["Node authentication backend"]
  node_node_api["Node API<br/>[index.js]"]
  node_user_routes["User routes<br/>[user.js]"]
  node_user_controller["User controller<br/>[user.js]"]
  node_user_model["User model<br/>[user.js]"]
  node_mongo[("MongoDB<br/>[database.js]")]
end

subgraph group_dotnet["ASP.NET identity services"]
  node_dotnet_app["ASP.NET startup<br/>[Program.cs]"]
  node_initializer["Database initializer"]
  node_functional_svc["User seeding service<br/>[FunctionalSvc.cs]"]
  node_user_options["Identity options"]
  node_app_options["Customer options<br/>[AppUserOptions.cs]"]
end

subgraph group_data["Identity data"]
  node_application_db[("Application context")]
  node_protection_db[("Protection-key context")]
  node_application_user["Application user<br/>[ApplicationUser.cs]"]
  node_address["User address<br/>[AddressModel.cs]"]
end

node_student(("Student"))
node_payment_gateway["Secure payment gateway"]

node_student -->|"uses"| node_angular_app
node_angular_app -->|"registers"| node_routing
node_routing -->|"routes to"| node_login
node_routing -->|"routes to"| node_dashboard
node_routing -->|"routes to"| node_courses
node_routing -->|"routes to"| node_shop
node_routing -->|"routes to"| node_cart_view
node_routing -->|"routes to"| node_otp
node_routing -->|"guards routes"| node_auth_guard
node_login -->|"calls"| node_auth_service
node_otp -->|"calls"| node_auth_service
node_auth_guard -->|"reads login state"| node_auth_service
node_auth_service -->|"posts auth requests"| node_node_api
node_node_api -->|"mounts routes"| node_user_routes
node_user_routes -->|"dispatches"| node_user_controller
node_user_routes -->|"uses model"| node_user_model
node_node_api -->|"connects"| node_mongo
node_courses -->|"updates cart"| node_cart_service
node_cart_view -.->|"reads cart"| node_cart_service
node_student -.->|"purchases courses"| node_payment_gateway
node_dotnet_app -->|"configures"| node_application_db
node_dotnet_app -->|"configures"| node_protection_db
node_dotnet_app -->|"invokes"| node_initializer
node_initializer -->|"checks and seeds"| node_application_db
node_initializer -->|"ensures created"| node_protection_db
node_initializer -->|"creates defaults"| node_functional_svc
node_functional_svc -->|"reads settings"| node_user_options
node_functional_svc -->|"reads settings"| node_app_options
node_functional_svc -->|"creates users"| node_application_user
node_functional_svc -->|"creates addresses"| node_address
node_application_db -->|"maps"| node_application_user
node_application_db -->|"maps"| node_address
node_application_user -->|"has addresses"| node_address

click node_angular_app "https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnInstructorClient/src/app/app.module.ts"
click node_routing "https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnInstructorClient/src/app/app-routing.module.ts"
click node_login "https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnInstructorClient/src/app/login/login.component.ts"
click node_auth_guard "https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnInstructorClient/src/app/services/AuthGuard/auth-guard.service.ts"
click node_auth_service "https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnInstructorClient/src/app/services/authentiication/authentication.service.ts"
click node_otp "https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnInstructorClient/src/app/otp-verification-modal/otp-verification-modal.component.ts"
click node_dashboard "https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnInstructorClient/src/app/dashboard/dashboard.component.ts"
click node_courses "https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnInstructorClient/src/app/courses/courses.component.ts"
click node_shop "https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnInstructorClient/src/app/sidebar/shop/shop.component.ts"
click node_cart_service "https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnInstructorClient/src/app/services/cart.service.ts"
click node_cart_view "https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnInstructorClient/src/app/sidebar/cart/cart.component.ts"
click node_node_api "https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnBackend/index.js"
click node_user_routes "https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnBackend/routes/user.js"
click node_user_controller "https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnBackend/controller/user.js"
click node_user_model "https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnBackend/models/user.js"
click node_mongo "https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnBackend/database.js"
click node_dotnet_app "https://github.com/praveenkumarsuggula/click2learn/blob/master/click2learnserver/click2learnserver/Program.cs"
click node_initializer "https://github.com/praveenkumarsuggula/click2learn/blob/master/click2learnserver/DataService/DbContextInitializer.cs"
click node_functional_svc "https://github.com/praveenkumarsuggula/click2learn/blob/master/click2learnserver/FunctionalService/FunctionalSvc.cs"
click node_user_options "https://github.com/praveenkumarsuggula/click2learn/blob/master/click2learnserver/ModelService/AdminUserOptions.cs"
click node_app_options "https://github.com/praveenkumarsuggula/click2learn/blob/master/click2learnserver/ModelService/AppUserOptions.cs"
click node_application_db "https://github.com/praveenkumarsuggula/click2learn/blob/master/click2learnserver/DataService/ApplicationDbContext.cs"
click node_protection_db "https://github.com/praveenkumarsuggula/click2learn/blob/master/click2learnserver/DataService/DataProtectionKeysContext.cs"
click node_application_user "https://github.com/praveenkumarsuggula/click2learn/blob/master/click2learnserver/ModelService/ApplicationUser.cs"
click node_address "https://github.com/praveenkumarsuggula/click2learn/blob/master/click2learnserver/ModelService/AddressModel.cs"

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_angular_app,node_routing,node_login,node_auth_guard,node_auth_service,node_otp,node_dashboard,node_courses,node_shop,node_cart_service,node_cart_view toneBlue
class node_node_api,node_user_routes,node_user_controller,node_user_model,node_mongo toneAmber
class node_dotnet_app,node_initializer,node_functional_svc,node_user_options,node_app_options toneMint
class node_application_db,node_protection_db,node_application_user,node_address toneRose
class node_student,node_payment_gateway toneIndigo
```

## Components

### Student client

- [Angular app](https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnInstructorClient/src/app/app.module.ts): `click2LearnInstructorClient/src/app/app.module.ts`
- [App routing](https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnInstructorClient/src/app/app-routing.module.ts): `click2LearnInstructorClient/src/app/app-routing.module.ts`
- [Login](https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnInstructorClient/src/app/login/login.component.ts): `click2LearnInstructorClient/src/app/login/login.component.ts`
- [Auth guard](https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnInstructorClient/src/app/services/AuthGuard/auth-guard.service.ts): `click2LearnInstructorClient/src/app/services/AuthGuard/auth-guard.service.ts`
- [Authentication service](https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnInstructorClient/src/app/services/authentiication/authentication.service.ts): `click2LearnInstructorClient/src/app/services/authentiication/authentication.service.ts`
- [OTP verification](https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnInstructorClient/src/app/otp-verification-modal/otp-verification-modal.component.ts): `click2LearnInstructorClient/src/app/otp-verification-modal/otp-verification-modal.component.ts`
- [Dashboard](https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnInstructorClient/src/app/dashboard/dashboard.component.ts): `click2LearnInstructorClient/src/app/dashboard/dashboard.component.ts`
- [Course browsing](https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnInstructorClient/src/app/courses/courses.component.ts): `click2LearnInstructorClient/src/app/courses/courses.component.ts`
- [Course shop](https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnInstructorClient/src/app/sidebar/shop/shop.component.ts): `click2LearnInstructorClient/src/app/sidebar/shop/shop.component.ts`
- [Cart state](https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnInstructorClient/src/app/services/cart.service.ts): `click2LearnInstructorClient/src/app/services/cart.service.ts`
- [Cart view](https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnInstructorClient/src/app/sidebar/cart/cart.component.ts): `click2LearnInstructorClient/src/app/sidebar/cart/cart.component.ts`

### Node authentication backend

- [Node API](https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnBackend/index.js): `click2LearnBackend/index.js`
- [User routes](https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnBackend/routes/user.js): `click2LearnBackend/routes/user.js`
- [User controller](https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnBackend/controller/user.js): `click2LearnBackend/controller/user.js`
- [User model](https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnBackend/models/user.js): `click2LearnBackend/models/user.js`
- [MongoDB](https://github.com/praveenkumarsuggula/click2learn/blob/master/click2LearnBackend/database.js): `click2LearnBackend/database.js`

### ASP.NET identity services

- [ASP.NET startup](https://github.com/praveenkumarsuggula/click2learn/blob/master/click2learnserver/click2learnserver/Program.cs): `click2learnserver/click2learnserver/Program.cs`
- [Database initializer](https://github.com/praveenkumarsuggula/click2learn/blob/master/click2learnserver/DataService/DbContextInitializer.cs): `click2learnserver/DataService/DbContextInitializer.cs`
- [User seeding service](https://github.com/praveenkumarsuggula/click2learn/blob/master/click2learnserver/FunctionalService/FunctionalSvc.cs): `click2learnserver/FunctionalService/FunctionalSvc.cs`
- [Identity options](https://github.com/praveenkumarsuggula/click2learn/blob/master/click2learnserver/ModelService/AdminUserOptions.cs): `click2learnserver/ModelService/AdminUserOptions.cs`
- [Customer options](https://github.com/praveenkumarsuggula/click2learn/blob/master/click2learnserver/ModelService/AppUserOptions.cs): `click2learnserver/ModelService/AppUserOptions.cs`

### Identity data

- [Application context](https://github.com/praveenkumarsuggula/click2learn/blob/master/click2learnserver/DataService/ApplicationDbContext.cs): `click2learnserver/DataService/ApplicationDbContext.cs`
- [Protection-key context](https://github.com/praveenkumarsuggula/click2learn/blob/master/click2learnserver/DataService/DataProtectionKeysContext.cs): `click2learnserver/DataService/DataProtectionKeysContext.cs`
- [Application user](https://github.com/praveenkumarsuggula/click2learn/blob/master/click2learnserver/ModelService/ApplicationUser.cs): `click2learnserver/ModelService/ApplicationUser.cs`
- [User address](https://github.com/praveenkumarsuggula/click2learn/blob/master/click2learnserver/ModelService/AddressModel.cs): `click2learnserver/ModelService/AddressModel.cs`

### Other components

- **Student**
- **Secure payment gateway**

## Connections

- Student → Angular app: uses (evidence: `click2LearnInstructorClient/src/app/app.module.ts`)
- Angular app → App routing: registers (evidence: `click2LearnInstructorClient/src/app/app.module.ts`)
- App routing → Login: routes to (evidence: `click2LearnInstructorClient/src/app/app-routing.module.ts`)
- App routing → Dashboard: routes to (evidence: `click2LearnInstructorClient/src/app/app-routing.module.ts`)
- App routing → Course browsing: routes to (evidence: `click2LearnInstructorClient/src/app/app-routing.module.ts`)
- App routing → Course shop: routes to (evidence: `click2LearnInstructorClient/src/app/app-routing.module.ts`)
- App routing → Cart view: routes to (evidence: `click2LearnInstructorClient/src/app/app-routing.module.ts`)
- App routing → OTP verification: routes to (evidence: `click2LearnInstructorClient/src/app/app-routing.module.ts`)
- App routing → Auth guard: guards routes (evidence: `click2LearnInstructorClient/src/app/app-routing.module.ts`)
- Login → Authentication service: calls (evidence: `click2LearnInstructorClient/src/app/login/login.component.ts`)
- OTP verification → Authentication service: calls (evidence: `click2LearnInstructorClient/src/app/otp-verification-modal/otp-verification-modal.component.ts`)
- Auth guard → Authentication service: reads login state (evidence: `click2LearnInstructorClient/src/app/services/AuthGuard/auth-guard.service.ts`)
- Authentication service → Node API: posts auth requests (evidence: `click2LearnInstructorClient/src/app/services/authentiication/authentication.service.ts`)
- Node API → User routes: mounts routes (evidence: `click2LearnBackend/index.js`)
- User routes → User controller: dispatches (evidence: `click2LearnBackend/routes/user.js`)
- User routes → User model: uses model (evidence: `click2LearnBackend/routes/user.js`)
- Node API → MongoDB: connects (evidence: `click2LearnBackend/index.js`)
- Course browsing → Cart state: updates cart (evidence: `click2LearnInstructorClient/src/app/courses/courses.component.ts`)
- Cart view → Cart state: reads cart
- Student → Secure payment gateway: purchases courses
- ASP.NET startup → Application context: configures (evidence: `click2learnserver/click2learnserver/Program.cs`)
- ASP.NET startup → Protection-key context: configures (evidence: `click2learnserver/click2learnserver/Program.cs`)
- ASP.NET startup → Database initializer: invokes (evidence: `click2learnserver/click2learnserver/Program.cs`)
- Database initializer → Application context: checks and seeds (evidence: `click2learnserver/DataService/DbContextInitializer.cs`)
- Database initializer → Protection-key context: ensures created (evidence: `click2learnserver/DataService/DbContextInitializer.cs`)
- Database initializer → User seeding service: creates defaults (evidence: `click2learnserver/DataService/DbContextInitializer.cs`)
- User seeding service → Identity options: reads settings (evidence: `click2learnserver/FunctionalService/FunctionalSvc.cs`)
- User seeding service → Customer options: reads settings (evidence: `click2learnserver/FunctionalService/FunctionalSvc.cs`)
- User seeding service → Application user: creates users (evidence: `click2learnserver/FunctionalService/FunctionalSvc.cs`)
- User seeding service → User address: creates addresses (evidence: `click2learnserver/FunctionalService/FunctionalSvc.cs`)
- Application context → Application user: maps (evidence: `click2learnserver/DataService/ApplicationDbContext.cs`)
- Application context → User address: maps (evidence: `click2learnserver/DataService/ApplicationDbContext.cs`)
- Application user → User address: has addresses (evidence: `click2learnserver/ModelService/ApplicationUser.cs`)
