# codex75/wastewise architecture

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

- Interactive diagram: https://gitdiagram.com/codex75/wastewise
- Repository: https://github.com/codex75/wastewise

## Overview

Waste Wise is a browser-based waste-sorting education site with account access, learning content, games, quizzes, reuse-project ideas, rewards, and feedback. The visible account flow sends successful users to the front page (or admins to the admin page); quiz scores use shared points functions. Feedback and administration share browser storage. Other page-to-script wiring is not shown in the excerpts, so those capabilities are represented without inferred page-entry edges.

Main entry points: [`login_script.js`](https://github.com/codex75/wastewise/blob/main/login_script.js) (Login and signup), [`admin.js`](https://github.com/codex75/wastewise/blob/main/admin.js) (Admin console), [`script.js`](https://github.com/codex75/wastewise/blob/main/script.js) (Points and rewards), [`rrr.js`](https://github.com/codex75/wastewise/blob/main/rrr.js) (Reuse projects)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Accounts and administration"]
  node_accounts["Login and signup<br/>[login_script.js]"]
  node_admin["Admin console<br/>[admin.js]"]
  node_storage[("Browser storage")]
end

subgraph group_learning["Waste learning"]
  node_home["Home experience<br/>[front.js]"]
  node_wasteguide["Waste guide<br/>[know.js]"]
  node_reuseideas["Reuse projects<br/>[rrr.js]"]
end

subgraph group_practice["Interactive practice"]
  node_sortinggame["Sorting game<br/>[game.js]"]
  node_quiz["Knowledge quiz<br/>[quiz.js]"]
end

subgraph group_engagement["Rewards and feedback"]
  node_points["Points and rewards<br/>[script.js]"]
  node_feedback["Feedback form<br/>[feedback.js]"]
end

node_visitor(("Visitor"))
node_youtube["YouTube"]

node_visitor -->|"signs in"| node_accounts
node_accounts -->|"redirects users"| node_home
node_accounts -->|"redirects admins"| node_admin
node_accounts -->|"stores accounts"| node_storage
node_quiz -->|"adds points"| node_points
node_points -->|"stores points"| node_storage
node_admin -->|"reads and updates"| node_storage
node_feedback -->|"stores feedback"| node_storage
node_storage -->|"supplies feedback"| node_admin
node_reuseideas -->|"links videos"| node_youtube

click node_accounts "https://github.com/codex75/wastewise/blob/main/login_script.js"
click node_admin "https://github.com/codex75/wastewise/blob/main/admin.js"
click node_home "https://github.com/codex75/wastewise/blob/main/front.js"
click node_wasteguide "https://github.com/codex75/wastewise/blob/main/know.js"
click node_sortinggame "https://github.com/codex75/wastewise/blob/main/game.js"
click node_quiz "https://github.com/codex75/wastewise/blob/main/quiz.js"
click node_reuseideas "https://github.com/codex75/wastewise/blob/main/rrr.js"
click node_points "https://github.com/codex75/wastewise/blob/main/script.js"
click node_feedback "https://github.com/codex75/wastewise/blob/main/feedback.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_accounts,node_admin,node_storage toneBlue
class node_home,node_wasteguide,node_reuseideas toneAmber
class node_sortinggame,node_quiz toneMint
class node_points,node_feedback toneRose
class node_visitor,node_youtube toneIndigo
```

## Components

### Accounts and administration

- [Login and signup](https://github.com/codex75/wastewise/blob/main/login_script.js): `login_script.js`
- [Admin console](https://github.com/codex75/wastewise/blob/main/admin.js): `admin.js`
- **Browser storage**

### Waste learning

- [Home experience](https://github.com/codex75/wastewise/blob/main/front.js): `front.js`
- [Waste guide](https://github.com/codex75/wastewise/blob/main/know.js): `know.js`
- [Reuse projects](https://github.com/codex75/wastewise/blob/main/rrr.js): `rrr.js`

### Interactive practice

- [Sorting game](https://github.com/codex75/wastewise/blob/main/game.js): `game.js`
- [Knowledge quiz](https://github.com/codex75/wastewise/blob/main/quiz.js): `quiz.js`

### Rewards and feedback

- [Points and rewards](https://github.com/codex75/wastewise/blob/main/script.js): `script.js`
- [Feedback form](https://github.com/codex75/wastewise/blob/main/feedback.js): `feedback.js`

### Other components

- **Visitor**
- **YouTube**

## Connections

- Visitor → Login and signup: signs in (evidence: `login_script.js`)
- Login and signup → Home experience: redirects users (evidence: `login_script.js`)
- Login and signup → Admin console: redirects admins (evidence: `login_script.js`)
- Login and signup → Browser storage: stores accounts (evidence: `login_script.js`)
- Knowledge quiz → Points and rewards: adds points (evidence: `quiz.js`)
- Points and rewards → Browser storage: stores points (evidence: `script.js`)
- Admin console → Browser storage: reads and updates (evidence: `admin.js`)
- Feedback form → Browser storage: stores feedback (evidence: `feedback.js`)
- Browser storage → Admin console: supplies feedback (evidence: `admin.js`)
- Reuse projects → YouTube: links videos (evidence: `rrr.js`)
