# gopikrishna7733/pmm architecture

> Architecture diagram of the GitHub repository gopikrishna7733/pmm, 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/gopikrishna7733/pmm
- Repository: https://github.com/gopikrishna7733/pmm

## Overview

PMM combines a static browser-based scholar portal with a Streamlit learning workspace. The browser workflow is landing or account access, authentication and route checks, then a protected dashboard backed by service facades and local mock adapters. The Streamlit app separately presents dashboard telemetry, pharmacy disciplines, and interactive quizzes. README documents the browser architecture and capabilities; sampled Python excerpts show the Streamlit views and embedded web app, but not all their internal wiring.

Main entry points: [`app.py`](https://github.com/gopikrishna7733/pmm/blob/main/app.py) (Streamlit Workspace), [`js/utils/guard.js`](https://github.com/gopikrishna7733/pmm/blob/main/js/utils/guard.js) (Route Guard), [`login.html`](https://github.com/gopikrishna7733/pmm/blob/main/login.html) (Login View), [`register.html`](https://github.com/gopikrishna7733/pmm/blob/main/register.html) (Registration View)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Browser Portal"]
  node_landing["Educational Landing<br/>[index.html]"]
  node_landing_interactions["Landing Interactions<br/>[pmm-landing.js]"]
  node_login["Login View<br/>[login.html]"]
  node_register["Registration View<br/>[register.html]"]
  node_dashboard["Scholar Dashboard<br/>[dashboard.html]"]
end

subgraph group_services["Auth and Data"]
  node_auth_guard["Route Guard<br/>[guard.js]"]
  node_validation["Input Validation<br/>[validation.js]"]
  node_auth_service["Auth Service<br/>[auth-service.js]"]
  node_auth_adapter[("Mock Auth Adapter")]
  node_data_service["Data Service<br/>[data-service.js]"]
  node_data_adapter[("Mock Data Adapter")]
end

subgraph group_learning["Learning Workspace"]
  node_streamlit_app["Streamlit Workspace<br/>[app.py]"]
  node_telemetry["Scholar Telemetry<br/>[app.py]"]
  node_quiz["Interactive Quiz<br/>[app.py]"]
  node_disciplines["Pharmacy Disciplines<br/>[app.py]"]
end

subgraph group_ui["Shared UI"]
  node_components["Interactive Components<br/>[pmm-components.js]"]
  node_js_entry["JavaScript Entry<br/>[pmm.js]"]
end

node_scholar(("Scholar"))

node_scholar -->|"opens"| node_landing
node_scholar -->|"signs in"| node_login
node_scholar -->|"creates account"| node_register
node_landing -->|"enables interactions"| node_landing_interactions
node_login -->|"checks guest access"| node_auth_guard
node_register -->|"checks guest access"| node_auth_guard
node_dashboard -->|"requires session"| node_auth_guard
node_login -->|"validates credentials"| node_validation
node_register -->|"validates inputs"| node_validation
node_auth_guard -->|"checks session"| node_auth_service
node_auth_service -->|"delegates auth"| node_auth_adapter
node_dashboard -->|"loads dashboard data"| node_data_service
node_data_service -->|"delegates data"| node_data_adapter
node_scholar -->|"opens workspace"| node_streamlit_app
node_streamlit_app -->|"presents"| node_telemetry
node_streamlit_app -->|"routes to"| node_quiz
node_streamlit_app -->|"routes to"| node_disciplines
node_js_entry -->|"imports"| node_components

click node_landing "https://github.com/gopikrishna7733/pmm/blob/main/index.html"
click node_landing_interactions "https://github.com/gopikrishna7733/pmm/blob/main/js/pmm-landing.js"
click node_login "https://github.com/gopikrishna7733/pmm/blob/main/login.html"
click node_register "https://github.com/gopikrishna7733/pmm/blob/main/register.html"
click node_dashboard "https://github.com/gopikrishna7733/pmm/blob/main/dashboard.html"
click node_auth_guard "https://github.com/gopikrishna7733/pmm/blob/main/js/utils/guard.js"
click node_validation "https://github.com/gopikrishna7733/pmm/blob/main/js/utils/validation.js"
click node_auth_service "https://github.com/gopikrishna7733/pmm/blob/main/js/services/auth-service.js"
click node_auth_adapter "https://github.com/gopikrishna7733/pmm/blob/main/js/services/mock-auth-adapter.js"
click node_data_service "https://github.com/gopikrishna7733/pmm/blob/main/js/services/data-service.js"
click node_data_adapter "https://github.com/gopikrishna7733/pmm/blob/main/js/services/mock-data-adapter.js"
click node_streamlit_app "https://github.com/gopikrishna7733/pmm/blob/main/app.py"
click node_telemetry "https://github.com/gopikrishna7733/pmm/blob/main/app.py"
click node_quiz "https://github.com/gopikrishna7733/pmm/blob/main/app.py"
click node_disciplines "https://github.com/gopikrishna7733/pmm/blob/main/app.py"
click node_components "https://github.com/gopikrishna7733/pmm/blob/main/js/pmm-components.js"
click node_js_entry "https://github.com/gopikrishna7733/pmm/blob/main/js/pmm.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_landing,node_landing_interactions,node_login,node_register,node_dashboard toneBlue
class node_auth_guard,node_validation,node_auth_service,node_auth_adapter,node_data_service,node_data_adapter toneAmber
class node_streamlit_app,node_telemetry,node_quiz,node_disciplines toneMint
class node_components,node_js_entry toneRose
class node_scholar toneIndigo
```

## Components

### Browser Portal

- [Educational Landing](https://github.com/gopikrishna7733/pmm/blob/main/index.html): `index.html`
- [Landing Interactions](https://github.com/gopikrishna7733/pmm/blob/main/js/pmm-landing.js): `js/pmm-landing.js`
- [Login View](https://github.com/gopikrishna7733/pmm/blob/main/login.html): `login.html`
- [Registration View](https://github.com/gopikrishna7733/pmm/blob/main/register.html): `register.html`
- [Scholar Dashboard](https://github.com/gopikrishna7733/pmm/blob/main/dashboard.html): `dashboard.html`

### Auth and Data

- [Route Guard](https://github.com/gopikrishna7733/pmm/blob/main/js/utils/guard.js): `js/utils/guard.js`
- [Input Validation](https://github.com/gopikrishna7733/pmm/blob/main/js/utils/validation.js): `js/utils/validation.js`
- [Auth Service](https://github.com/gopikrishna7733/pmm/blob/main/js/services/auth-service.js): `js/services/auth-service.js`
- [Mock Auth Adapter](https://github.com/gopikrishna7733/pmm/blob/main/js/services/mock-auth-adapter.js): `js/services/mock-auth-adapter.js`
- [Data Service](https://github.com/gopikrishna7733/pmm/blob/main/js/services/data-service.js): `js/services/data-service.js`
- [Mock Data Adapter](https://github.com/gopikrishna7733/pmm/blob/main/js/services/mock-data-adapter.js): `js/services/mock-data-adapter.js`

### Learning Workspace

- [Streamlit Workspace](https://github.com/gopikrishna7733/pmm/blob/main/app.py): `app.py`
- [Scholar Telemetry](https://github.com/gopikrishna7733/pmm/blob/main/app.py): `app.py`
- [Interactive Quiz](https://github.com/gopikrishna7733/pmm/blob/main/app.py): `app.py`
- [Pharmacy Disciplines](https://github.com/gopikrishna7733/pmm/blob/main/app.py): `app.py`

### Shared UI

- [Interactive Components](https://github.com/gopikrishna7733/pmm/blob/main/js/pmm-components.js): `js/pmm-components.js`
- [JavaScript Entry](https://github.com/gopikrishna7733/pmm/blob/main/js/pmm.js): `js/pmm.js`

### Other components

- **Scholar**

## Connections

- Scholar → Educational Landing: opens (evidence: `README.md`)
- Scholar → Login View: signs in (evidence: `README.md`)
- Scholar → Registration View: creates account (evidence: `README.md`)
- Educational Landing → Landing Interactions: enables interactions (evidence: `README.md`)
- Login View → Route Guard: checks guest access (evidence: `README.md`)
- Registration View → Route Guard: checks guest access (evidence: `README.md`)
- Scholar Dashboard → Route Guard: requires session (evidence: `README.md`)
- Login View → Input Validation: validates credentials (evidence: `README.md`)
- Registration View → Input Validation: validates inputs (evidence: `README.md`)
- Route Guard → Auth Service: checks session (evidence: `js/utils/guard.js`)
- Auth Service → Mock Auth Adapter: delegates auth (evidence: `js/services/auth-service.js`)
- Scholar Dashboard → Data Service: loads dashboard data (evidence: `README.md`)
- Data Service → Mock Data Adapter: delegates data (evidence: `js/services/data-service.js`)
- Scholar → Streamlit Workspace: opens workspace (evidence: `README.md`)
- Streamlit Workspace → Scholar Telemetry: presents (evidence: `app.py`)
- Streamlit Workspace → Interactive Quiz: routes to (evidence: `app.py`)
- Streamlit Workspace → Pharmacy Disciplines: routes to (evidence: `app.py`)
- JavaScript Entry → Interactive Components: imports (evidence: `js/pmm.js`)
