# oynet54-afk/digital-warenition architecture

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

- Interactive diagram: https://gitdiagram.com/oynet54-afk/digital-warenition
- Repository: https://github.com/oynet54-afk/digital-warenition

## Overview

Digital-Warenition is a browser-based scam-awareness and prevention site. A visitor navigates by URL hash; the client router resolves views, including scam profiles, and renders them into the page. Visitors can also use safety-tip checklists, a knowledge quiz, and a message-scam simulation, with interaction and feedback handled in the client. Scam profiles are supplied as global data, while page renderers provide educational content. The supplied excerpts do not show the full route table or page-loading setup, so those relationships are not inferred.

Main entry points: [`pages.js`](https://github.com/oynet54-afk/digital-warenition/blob/main/pages.js) (Page renderers), [`app.js`](https://github.com/oynet54-afk/digital-warenition/blob/main/app.js) (Learning interactions), [`icons.js`](https://github.com/oynet54-afk/digital-warenition/blob/main/icons.js) (Icon library), [`scams-a.js`](https://github.com/oynet54-afk/digital-warenition/blob/main/scams-a.js) (Profiles 1–10)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["Navigation and rendering"]
  node_router["Hash router<br/>[app.js]"]
  node_page_renderers["Page renderers<br/>[pages.js]"]
  node_icon_library["Icon library<br/>[icons.js]"]
end

subgraph group_learning["Awareness and practice"]
  node_prevention_tips["Safety checklist<br/>[pages.js]"]
  node_knowledge_quiz["Knowledge quiz<br/>[pages.js]"]
  node_message_simulation["Message simulation<br/>[pages.js]"]
  node_interaction_logic["Learning interactions<br/>[app.js]"]
end

subgraph group_content["Scam knowledge"]
  node_scam_list["Scam directory<br/>[pages.js]"]
  node_scam_profiles_a["Profiles 1–10<br/>[scams-a.js]"]
  node_scam_profiles_b["Profiles 11–21<br/>[scams-b.js]"]
end

node_visitor(("Visitor"))

node_visitor -->|"selects route"| node_router
node_router -->|"requests detail"| node_page_renderers
node_router -->|"handles interactions"| node_interaction_logic
node_interaction_logic -->|"reads tip total"| node_prevention_tips
node_interaction_logic -->|"calls icons"| node_icon_library
node_page_renderers -->|"renders cards"| node_scam_list
node_page_renderers -.->|"reads profiles"| node_scam_profiles_a
node_page_renderers -.->|"reads profiles"| node_scam_profiles_b
node_page_renderers -->|"defines content"| node_prevention_tips
node_page_renderers -->|"defines questions"| node_knowledge_quiz
node_page_renderers -->|"defines scenarios"| node_message_simulation
node_interaction_logic -->|"scores answers"| node_knowledge_quiz
node_interaction_logic -->|"scores choices"| node_message_simulation

click node_router "https://github.com/oynet54-afk/digital-warenition/blob/main/app.js"
click node_page_renderers "https://github.com/oynet54-afk/digital-warenition/blob/main/pages.js"
click node_icon_library "https://github.com/oynet54-afk/digital-warenition/blob/main/icons.js"
click node_scam_list "https://github.com/oynet54-afk/digital-warenition/blob/main/pages.js"
click node_scam_profiles_a "https://github.com/oynet54-afk/digital-warenition/blob/main/scams-a.js"
click node_scam_profiles_b "https://github.com/oynet54-afk/digital-warenition/blob/main/scams-b.js"
click node_prevention_tips "https://github.com/oynet54-afk/digital-warenition/blob/main/pages.js"
click node_knowledge_quiz "https://github.com/oynet54-afk/digital-warenition/blob/main/pages.js"
click node_message_simulation "https://github.com/oynet54-afk/digital-warenition/blob/main/pages.js"
click node_interaction_logic "https://github.com/oynet54-afk/digital-warenition/blob/main/app.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_router,node_page_renderers,node_icon_library toneBlue
class node_prevention_tips,node_knowledge_quiz,node_message_simulation,node_interaction_logic toneAmber
class node_scam_list,node_scam_profiles_a,node_scam_profiles_b toneMint
class node_visitor toneIndigo
```

## Components

### Navigation and rendering

- [Hash router](https://github.com/oynet54-afk/digital-warenition/blob/main/app.js): `app.js`
- [Page renderers](https://github.com/oynet54-afk/digital-warenition/blob/main/pages.js): `pages.js`
- [Icon library](https://github.com/oynet54-afk/digital-warenition/blob/main/icons.js): `icons.js`

### Awareness and practice

- [Safety checklist](https://github.com/oynet54-afk/digital-warenition/blob/main/pages.js): `pages.js`
- [Knowledge quiz](https://github.com/oynet54-afk/digital-warenition/blob/main/pages.js): `pages.js`
- [Message simulation](https://github.com/oynet54-afk/digital-warenition/blob/main/pages.js): `pages.js`
- [Learning interactions](https://github.com/oynet54-afk/digital-warenition/blob/main/app.js): `app.js`

### Scam knowledge

- [Scam directory](https://github.com/oynet54-afk/digital-warenition/blob/main/pages.js): `pages.js`
- [Profiles 1–10](https://github.com/oynet54-afk/digital-warenition/blob/main/scams-a.js): `scams-a.js`
- [Profiles 11–21](https://github.com/oynet54-afk/digital-warenition/blob/main/scams-b.js): `scams-b.js`

### Other components

- **Visitor**

## Connections

- Visitor → Hash router: selects route (evidence: `app.js`)
- Hash router → Page renderers: requests detail (evidence: `app.js`)
- Hash router → Learning interactions: handles interactions (evidence: `app.js`)
- Learning interactions → Safety checklist: reads tip total (evidence: `app.js`)
- Learning interactions → Icon library: calls icons (evidence: `app.js`)
- Page renderers → Scam directory: renders cards (evidence: `pages.js`)
- Page renderers → Profiles 1–10: reads profiles
- Page renderers → Profiles 11–21: reads profiles
- Page renderers → Safety checklist: defines content (evidence: `pages.js`)
- Page renderers → Knowledge quiz: defines questions (evidence: `pages.js`)
- Page renderers → Message simulation: defines scenarios (evidence: `pages.js`)
- Learning interactions → Knowledge quiz: scores answers (evidence: `app.js`)
- Learning interactions → Message simulation: scores choices (evidence: `app.js`)
