# pramodmalogi-007/iamshield architecture

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

- Interactive diagram: https://gitdiagram.com/pramodmalogi-007/iamshield
- Repository: https://github.com/pramodmalogi-007/iamshield

## Overview

IAMShield is an identity-and-access-management assessment and product-recommendation platform. Users choose an assessment category, answer its questions, and receive ranked product recommendations; they can optionally register, save or claim assessments, and review history on a dashboard. Administrators manage users, assessments, products, and questions. The graph follows the sampled Flask routes and browser client; the AI route is shown as a separate capability, but the sampled backend entry point does not register it. The README is empty, and unsampled source limits further relationship detail.

Main entry points: [`frontend/js/api.js`](https://github.com/pramodmalogi-007/iamshield/blob/main/frontend/js/api.js) (API client), [`backend/app.py`](https://github.com/pramodmalogi-007/iamshield/blob/main/backend/app.py) (Flask application), [`backend/models/database.py`](https://github.com/pramodmalogi-007/iamshield/blob/main/backend/models/database.py) (MongoDB access and seed data), [`frontend/index.html`](https://github.com/pramodmalogi-007/iamshield/blob/main/frontend/index.html) (Web interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser application"]
  node_web_ui["Web interface<br/>[index.html]"]
  node_browser_app["Browser workflows<br/>[app.js]"]
  node_api_client["API client<br/>[api.js]"]
end

subgraph group_server["API application"]
  node_flask_app["Flask application<br/>[app.py]"]
end

subgraph group_assessment["Assessment domain"]
  node_assessment_routes["Assessment engine<br/>[assessment.py]"]
  node_dashboard_routes["User dashboard<br/>[dashboard.py]"]
  node_ai_routes["AI analysis<br/>[ai.py]"]
end

subgraph group_accounts["Accounts and administration"]
  node_auth_routes["Authentication<br/>[auth.py]"]
  node_admin_routes["Admin management<br/>[admin.py]"]
end

subgraph group_data["Persistence and integrations"]
  node_mongo_data[("MongoDB access and seed data<br/>[database.py]")]
end

node_visitor(("User"))
node_admin_actor(("Administrator"))
node_anthropic["Anthropic API"]

node_visitor -->|"uses"| node_web_ui
node_admin_actor -->|"uses"| node_web_ui
node_web_ui -->|"loads"| node_browser_app
node_browser_app -->|"requests"| node_api_client
node_api_client -->|"sends API requests"| node_flask_app
node_flask_app -->|"registers"| node_auth_routes
node_flask_app -->|"registers"| node_assessment_routes
node_flask_app -->|"registers"| node_dashboard_routes
node_flask_app -->|"registers"| node_admin_routes
node_api_client -->|"calls auth endpoints"| node_auth_routes
node_api_client -->|"calls assessment endpoints"| node_assessment_routes
node_api_client -->|"calls dashboard endpoint"| node_dashboard_routes
node_api_client -->|"calls admin endpoints"| node_admin_routes
node_auth_routes -->|"reads and writes users"| node_mongo_data
node_assessment_routes -->|"reads catalog; stores results"| node_mongo_data
node_dashboard_routes -->|"reads assessments"| node_mongo_data
node_admin_routes -->|"manages records"| node_mongo_data
node_ai_routes -->|"streams requests"| node_anthropic

click node_web_ui "https://github.com/pramodmalogi-007/iamshield/blob/main/frontend/index.html"
click node_browser_app "https://github.com/pramodmalogi-007/iamshield/blob/main/frontend/js/app.js"
click node_api_client "https://github.com/pramodmalogi-007/iamshield/blob/main/frontend/js/api.js"
click node_flask_app "https://github.com/pramodmalogi-007/iamshield/blob/main/backend/app.py"
click node_auth_routes "https://github.com/pramodmalogi-007/iamshield/blob/main/backend/routes/auth.py"
click node_admin_routes "https://github.com/pramodmalogi-007/iamshield/blob/main/backend/routes/admin.py"
click node_assessment_routes "https://github.com/pramodmalogi-007/iamshield/blob/main/backend/routes/assessment.py"
click node_dashboard_routes "https://github.com/pramodmalogi-007/iamshield/blob/main/backend/routes/dashboard.py"
click node_ai_routes "https://github.com/pramodmalogi-007/iamshield/blob/main/backend/routes/ai.py"
click node_mongo_data "https://github.com/pramodmalogi-007/iamshield/blob/main/backend/models/database.py"

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_web_ui,node_browser_app,node_api_client,node_visitor toneBlue
class node_flask_app toneAmber
class node_assessment_routes,node_dashboard_routes,node_ai_routes,node_anthropic toneMint
class node_auth_routes,node_admin_routes toneRose
class node_mongo_data,node_admin_actor toneIndigo
```

## Components

### Browser application

- [Web interface](https://github.com/pramodmalogi-007/iamshield/blob/main/frontend/index.html): `frontend/index.html`
- [Browser workflows](https://github.com/pramodmalogi-007/iamshield/blob/main/frontend/js/app.js): `frontend/js/app.js`
- [API client](https://github.com/pramodmalogi-007/iamshield/blob/main/frontend/js/api.js): `frontend/js/api.js`

### API application

- [Flask application](https://github.com/pramodmalogi-007/iamshield/blob/main/backend/app.py): `backend/app.py`

### Assessment domain

- [Assessment engine](https://github.com/pramodmalogi-007/iamshield/blob/main/backend/routes/assessment.py): `backend/routes/assessment.py`
- [User dashboard](https://github.com/pramodmalogi-007/iamshield/blob/main/backend/routes/dashboard.py): `backend/routes/dashboard.py`
- [AI analysis](https://github.com/pramodmalogi-007/iamshield/blob/main/backend/routes/ai.py): `backend/routes/ai.py`

### Accounts and administration

- [Authentication](https://github.com/pramodmalogi-007/iamshield/blob/main/backend/routes/auth.py): `backend/routes/auth.py`
- [Admin management](https://github.com/pramodmalogi-007/iamshield/blob/main/backend/routes/admin.py): `backend/routes/admin.py`

### Persistence and integrations

- [MongoDB access and seed data](https://github.com/pramodmalogi-007/iamshield/blob/main/backend/models/database.py): `backend/models/database.py`

### Other components

- **User**
- **Administrator**
- **Anthropic API**

## Connections

- User → Web interface: uses
- Administrator → Web interface: uses
- Web interface → Browser workflows: loads
- Browser workflows → API client: requests (evidence: `frontend/js/app.js`)
- API client → Flask application: sends API requests (evidence: `frontend/js/api.js`)
- Flask application → Authentication: registers (evidence: `backend/app.py`)
- Flask application → Assessment engine: registers (evidence: `backend/app.py`)
- Flask application → User dashboard: registers (evidence: `backend/app.py`)
- Flask application → Admin management: registers (evidence: `backend/app.py`)
- API client → Authentication: calls auth endpoints (evidence: `frontend/js/api.js`)
- API client → Assessment engine: calls assessment endpoints (evidence: `frontend/js/api.js`)
- API client → User dashboard: calls dashboard endpoint (evidence: `frontend/js/api.js`)
- API client → Admin management: calls admin endpoints (evidence: `frontend/js/api.js`)
- Authentication → MongoDB access and seed data: reads and writes users (evidence: `backend/routes/auth.py`)
- Assessment engine → MongoDB access and seed data: reads catalog; stores results (evidence: `backend/routes/assessment.py`)
- User dashboard → MongoDB access and seed data: reads assessments (evidence: `backend/routes/dashboard.py`)
- Admin management → MongoDB access and seed data: manages records (evidence: `backend/routes/admin.py`)
- AI analysis → Anthropic API: streams requests (evidence: `backend/routes/ai.py`)
